Bug 2101

Summary: misassembly of hex constants that look like local label references.
Product: binutils Reporter: Hans-Peter Nilsson <hp>
Component: gasAssignee: Hans-Peter Nilsson <hp>
Status: RESOLVED FIXED    
Severity: normal CC: bug-binutils
Priority: P2    
Version: 2.17   
Target Milestone: ---   
Host: Target: mmix-knuth-mmixware
Build: Last reconfirmed:

Description Hans-Peter Nilsson 2006-01-03 04:40:07 UTC
For this code:
x:
 swym
0:
 setl $9,#1F
1:
 setl $8,#1B2F
 setl $7,0xFF9F
 setl $6,#1F3A
9:
 setl $5,#1B
 setl $4,#1A1B
 setl $3,0x9F
 setl $2,0x9B
 setl $1,0x1F
 setl $0,0x1b

Assembled with default options, you get this disassembly:
/tmp/x.o:     file format elf64-mmix

Disassembly of section .text:

0000000000000000 <x>:
   0:   fd000000        swym 0,0,0
   4:   e3090000        setl $9,0x0
   8:   e3081b2f        setl $8,0x1b2f
   c:   e307ff9f        setl $7,0xff9f
  10:   e3061f3a        setl $6,0x1f3a
  14:   e3050000        setl $5,0x0
  18:   e3041a1b        setl $4,0x1a1b
  1c:   e303009f        setl $3,0x9f
  20:   e302009b        setl $2,0x9b
  24:   e301001f        setl $1,0x1f
  28:   e300001b        setl $0,0x1b

Note the misassembly of the insns setting $9 and $5 respectively.
Comment 1 Hans-Peter Nilsson 2006-01-03 06:41:14 UTC
See <URL:http://sourceware.org/ml/binutils/2006-01/msg00005.html>.
If there are other misassembled cases, they'll have a new PR.