This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Optimzie brl to br for ia64
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 12 Mar 2003 15:56:24 -0800
- Subject: Optimzie brl to br for ia64
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.
H.J.