Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Scott Hammond
Fri, 13 Nov 1992 01:34
possible bug in gas-1.38 (m68k configuration)
Author: Scott Hammond
Date: Fri, 13 Nov 1992 01:34
Date: Fri, 13 Nov 1992 01:34
76 lines
2406 bytes
2406 bytes
Configuration: gas-1.38(.1?) m68k.h->m-generic.h
assember is used for cross-assembly
host: sun4, sunos4.1.2
gas run with no options.
It appears there is a bug in gas. In this hand coded routine, the
'movw' and 'jmp' instructions show the wrong address for 'jtab' in the
disassembly.
||| This does not work, in the disassembly following, the references to
||| jtab do not refer to the correct address.
.text
fun:
bfextu sp@(20){#0:#4},d0
movw pc@(jtab,d0:w:2),d0
jmp pc@(jtab,d0:w)
jtab:
.word badframe-jtab
.word threeword-jtab
.word fourword-jtab
.word fpcp-jtab
.word busfault-jtab
.word badframe-jtab
badframe:
illegal
threeword:
rtr
fourword:
illegal
fpcp:
illegal
busfault:
illegal
Disassembly of section .text:
00000000 (jtab-)0016 bfextu sp@(20),0,4,d0
00000006 (jtab-)0010 movew 0x10[d0.w*2],d0 ||| 0x10 should be 0x16
0000000e (jtab-)0008 jmp 0x10[d0.w] ||| 0x10 should be 0x16
00000016 (jtab+)0000 orb #14,a4
0000001a (jtab+)0004 orb #18,a0@
0000001e (jtab+)0008 orb #12,a4@
00000022 (badframe+)0000 illegal
00000024 (threeword+)0000 rtr
00000026 (fourword+)0000 illegal
00000028 (fpcp+)0000 illegal
0000002a (busfault+)0000 illegal
||| Noting that the addresses were off by 6 bytes the following
||| is an evil workaround
.text
fun:
bfextu sp@(20){#0:#4},d0
movw pc@(jtab2,d0:w:2),d0
jmp pc@(jtab2,d0:w)
jtab:
.word badframe-jtab
.word threeword-jtab
.word fourword-jtab
jtab2:
.word fpcp-jtab
.word busfault-jtab
.word badframe-jtab
badframe:
illegal
threeword:
rtr
fourword:
illegal
fpcp:
illegal
busfault:
illegal
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads