This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

target/4791: gcc 3.0.2 Athlon code generation suggestion



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]