Bug 286 - Gas doesn't handle branch hint prefix generated by gcc right
Summary: Gas doesn't handle branch hint prefix generated by gcc right
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-23 18:47 UTC by H.J. Lu
Modified: 2004-07-23 20:30 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2004-07-23 18:47:21 UTC
Gcc generates "ds ; " and "cs ; " as branch hints. But gas doesn't handle them
right:

[hjl@gnu bh]$ for f in 1 2 3 4
> do
> cat $f.s
> gcc -c $f.s
> objdump -dr $f.o
> done
        ds ; je .+2
 
1.o:     file format elf32-i386
 
Disassembly of section .text:
 
00000000 <.text>:
   0:   3e 74 00                je,pt  0x3
        ds/je .+2
 
2.o:     file format elf32-i386
 
Disassembly of section .text:
 
00000000 <.text>:
   0:   3e 74 ff                je,pt  0x2
        ds /je .+2
 
3.o:     file format elf32-i386
 
Disassembly of section .text:
 
00000000 <.text>:
   0:   3e 74 ff                je,pt  0x2
        ds / je .+2
4.s: Assembler messages:
4.s:1: Error: expecting mnemonic; got nothing
objdump: '4.o': No such file
Comment 1 H.J. Lu 2004-07-23 20:30:22 UTC
It looks like a gcc bug. Assembler has a way to define prefixes
for an instruction. Unfortunately, gcc uses something else:

http://sources.redhat.com/ml/binutils/2004-07/msg00350.html

Close it. If necessary, gcc should be fixed.