This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
target/4791: gcc 3.0.2 Athlon code generation suggestion
- To: gcc-gnats at gcc dot gnu dot org
- Subject: target/4791: gcc 3.0.2 Athlon code generation suggestion
- From: leitner at fefe dot de
- Date: 5 Nov 2001 16:08:05 -0000
>Number: 4791
>Category: target
>Synopsis: gcc 3.0.2 x86 PIC code can be improved
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Mon Nov 05 08:15:59 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Felix von Leitner
>Release: 3.0.2
>Organization:
>Environment:
System: Linux beholder 2.4.13-ac4 #5 Mon Oct 29 17:35:30 CET 2001 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-unknown-linux-gnu
configured with: ./configure --prefix=/opt/cross --target=arm-linux : (reconfigured) ./configure --prefix=/opt/cross --target=arm-linux
>Description:
x86 -march=athlon PIC code for
int t; int bla() { return t; }
generates a function called .LPR0 that puts (%esp) into %ebx.
This function is shared by all PIC functions in that object
file. After each call, gcc emits an
"addl $_GLOBAL_OFFSET_TABLE_, %ebx" instruction.
>How-To-Repeat:
compile "int t; int bla() { return t; }" for x86, -fpic,
-march=athlon.
>Fix:
The addl instruction should be moved in the .LPR0 function.
>Release-Note:
>Audit-Trail:
>Unformatted: