Optimzie brl to br for ia64

H. J. Lu hjl@lucon.org
Wed Mar 12 23:57:00 GMT 2003


On Wed, Mar 12, 2003 at 03:56:24PM -0800, H. J. Lu wrote:
> On ia64, brl, which may be introduced by relaxation, can be optimized
> to br. Here is a testcase:
> 
> # make
> cc -O -S foo.c
> echo "  .align 32" >> foo.s
> echo "  .skip 0xf60000" >> foo.s
> cc -o foo -B./ -static foo.s
> cc: file path prefix `./' never used
> ./foo
> hello
> objdump -d foo > foo.list
> grep brl foo.list
> 4000000000f604a0:       05 00 00 00 01 00       [MLX]       nop.m 0x0
> 4000000000f604a6:       00 00 00 00 00 00                   brl.few 40000000010011c0 <foo>;;
> 4000000000f604ac:       20 0d 0a c0
> 
> This brl can be optimized by br since the dispacement is less than
> 16MB:
> 
> 4000000000f604a0:       13 00 00 00 01 00       [MBB]       nop.m 0x0
> 4000000000f604a6:       00 00 00 00 10 00                   nop.b 0x0
> 4000000000f604ac:       20 0d 0a 40                         br.few 40000000010011c0 <foo>;;
> 
> We can do it automatically or we can turn it on by a switch. ld does
> support -On. But it also turn on other stuff. Any suggestions?
> 
> Thanks.

Oops. Here is the testcase.


H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug.tar.gz
Type: application/x-gzip
Size: 454 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20030312/ceddf588/attachment.bin>


More information about the Binutils mailing list