Article View: gnu.utils.bug
Article #248GAS 1.38 bug report
From: d90-awe
Date: Mon, 10 Aug 1992 17:01
Date: Mon, 10 Aug 1992 17:01
78 lines
2486 bytes
2486 bytes
Bug report for gas.
Version: gas-1.38
Machine: sun4
Operating system: SunOS 4.1.2
file:
------------------------------ cut here ------------------------------
/* unimp.s */
.text
unimp 17
------------------------------ cut here ------------------------------
Options for gas: gas unimp.s -o unimp.o
What's wrong:
unimp.o contains, according to adb, the instruct `unimp 0x4'. The same
source file assembled with SunOS as (/usr/bin/as) produces a file
which isn't identical to unimp.o and with `unimp 0x11'.
My explanation:
Gas thinks unimp takes a 22 bit PC relative operand, when in fact it's
not PC relative.
My patch:
*** sparc-opcode.h.orig Thu Jun 7 22:22:10 1990
--- sparc-opcode.h Sat Aug 8 23:12:55 1992
***************
*** 58,63 ****
--- 58,64 ----
D crsd coprocessor register
h 22 high bits.
i 13 bit Immediate.
+ s 22 bit Immediate.
l 22 bit PC relative immediate.
L 30 bit PC relative immediate.
a Annul. The annul bit is set.
***************
*** 497,503 ****
{ "tsubcctv", 0x80580000, 0x40a00000, "1,2,d", 0 },
{ "tsubcctv", 0x80582000, 0x40a00000, "1,i,d", 0 },
! { "unimp", 0x00000000, 0x00000000, "l", 0 },
{ "iflush", 0x81d80000, 0x40202000, "1+2", 0 },
{ "iflush", 0x81d82000, 0x40200000, "1+i", 0 },
--- 498,504 ----
{ "tsubcctv", 0x80580000, 0x40a00000, "1,2,d", 0 },
{ "tsubcctv", 0x80582000, 0x40a00000, "1,i,d", 0 },
! { "unimp", 0x00000000, 0x00000000, "s", 0 },
{ "iflush", 0x81d80000, 0x40202000, "1+2", 0 },
{ "iflush", 0x81d82000, 0x40200000, "1+i", 0 },
*** sparc.c.orig Mon Oct 22 19:04:04 1990
--- sparc.c Sat Aug 8 23:16:16 1992
***************
*** 665,670 ****
--- 665,674 ----
the_insn.reloc = RELOC_HI22;
goto immediate;
+ case 's': /* 22 bit immediate sak */
+ the_insn.reloc = RELOC_BASE22;
+ goto immediate;
+
case 'l': /* 22 bit PC relative immediate */
the_insn.reloc = RELOC_WDISP22;
the_insn.pcrel = 1;
/assar
Technical Details
Message-ID:
<9208101301.AA04643@flora.nada.kth.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!nada.kth.se!d90-aweShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!nada.kth.se!d90-awe From: d90-awe@nada.kth.se Subject: GAS 1.38 bug report Message-ID: <9208101301.AA04643@flora.nada.kth.se> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Mon, 10 Aug 1992 17:01:11 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 79