This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

[PATCH] Fix gcc.dg/20020312-2.c on powerpc-linux-gnu


Hi,

this patch fixes gcc.dg/20020312-2.c on powerpc-linux-gnu by introducing a 
new macro RS6000_PIC_OFFSET_TABLE_REGNUM, using it thruout and changing 
PIC_OFFSET_TABLE_REGNUM to return INVALID_REGNUM if !flag_pic (btw, this 
requirement isn't documented yet). I looked into changing the various 
flag_pic tests to PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM like Richard 
suggested and did for other targets, but I think with the multiple ABI's we 
support and the differing meanings of flag_pic it would just confuse and 
bloat the tests.

Bootstrapped & regtested on powerpc-linux-gnu.

Stan, David, would you mind to regtest this patch on AIX and Darwin?

OK to commit on mainline and branch after Stan&David signalled OK?

Franz.

	* config/rs6000/rs6000.h (RS6000_PIC_OFFSET_TABLE_REGNUM): New.
	(PIC_OFFSET_TABLE_REGNUM): Use it and return INVALID_REGNUM if
	!flag_pic.
	(CONDITIONAL_REGISTER_USAGE): Adjust accordingly.
	* config/rs6000/rs6000.h: Use RS6000_PIC_OFFSET_TABLE_REGNUM instead
	of PIC_OFFSET_TABLE_REGNUM thruout.
	* config/rs6000/rs6000.md: Likewise.
	* config/rs6000/darwin.h: Likewise.

Attachment: gcc-picreg.patch
Description: Text document


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