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 PR target/26272 __builtin_setjmp and loops on powerpc-darwin


The problem here is that the patters for the reloading of the PIC register
is being moved before the loop and before the actual setjmp. This causes
gcc.c-torture/execute/built-in-setjmp.c to fail at -O2 and above.


This fixes the problem by adding (pc) so that move loop invariants
don't move the reloading of the PIC register before the loop.


OK? Bootstrapped and tested on powerpc-darwin.


A similar fix for x86-darwin will be needed but I cannot test it.

Thanks,
Andrew Pinski

ChangeLog:
	* config/rs6000/darwin.md (load_macho_picbase_si): Add
	pc to the pattern.
	(load_macho_picbase_di): Likewise.


Attachment: fixsetjmp.diff.txt
Description: Text document


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