From owner-freebsd-sparc Fri Dec 4 04:10:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA24827 for freebsd-sparc-outgoing; Fri, 4 Dec 1998 04:10:33 -0800 (PST) (envelope-from owner-freebsd-sparc@FreeBSD.ORG) Received: from tapti.hss.hns.com (tapti.hss.hns.com [139.85.242.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA24813 for ; Fri, 4 Dec 1998 04:10:22 -0800 (PST) (envelope-from kchowksey@hss.hns.com) Received: from tarang.hss.hns.com (tarang.hss.hns.com [139.85.242.33]) by tapti.hss.hns.com (8.8.8/8.8.8) with ESMTP id SAA05185 for ; Fri, 4 Dec 1998 18:26:39 +0530 (IST) Received: (from kchowksey@localhost) by tarang.hss.hns.com (8.8.2/8.7.3) id SAA02983; Fri, 4 Dec 1998 18:24:04 +0530 (IST) Date: Fri, 4 Dec 1998 18:24:04 +0530 (IST) Message-Id: <199812041254.SAA02983@tarang.hss.hns.com> From: Kapil Chowksey MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: freebsd-sparc@FreeBSD.ORG Subject: another nitsy patch X-Mailer: VM 6.34 under Emacs 19.34.1 Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Here's a quick fix for a gas bug that bit me recently : --- binutils-2.8.1/gas/config/tc-sparc.c.old Fri Dec 4 15:48:28 1998 +++ binutils-2.8.1/gas/config/tc-sparc.c Fri Dec 4 17:33:15 1998 @@ -702,10 +702,18 @@ int i; for (i = 0; i < count; i += 4) - *p++ = 0x01000000; /* nop */ + if (INSN_BIG_ENDIAN) + number_to_chars_bigendian((char *)p++, NOP_INSN, 4); + else + number_to_chars_littleendian((char *)p++, NOP_INSN, 4); + if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) - *(unsigned *)(fragp->fr_literal + fragp->fr_fix) = - 0x30680000 | (count >> 2); /* ba,a,pt %xcc, 1f */ + if (INSN_BIG_ENDIAN) /* ba,a,pt %xcc, 1f */ + number_to_chars_bigendian((fragp->fr_literal + fragp->fr_fix), + 0x30680000 | (count >> 2), 4); + else + number_to_chars_littleendian((fragp->fr_literal + fragp->fr_fix), + 0x30680000 | (count >> 2), 4); fragp->fr_var = count; } } -- Kapil Chowksey Viva GNU ! kchowksey@hss.hns.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message