Date: Fri, 4 Dec 1998 18:24:04 +0530 (IST) From: Kapil Chowksey <kchowksey@hss.hns.com> To: freebsd-sparc@FreeBSD.ORG Subject: another nitsy patch Message-ID: <199812041254.SAA02983@tarang.hss.hns.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812041254.SAA02983>
