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 -m64 on powerpc-darwin for pic code


Even for the following simple code we ICE:
int i = 0;
void f(void)
{
 i = 0;
}

This patch fixes the problem plus adds some needed cleanup
to the darwin code with respect with -m64 and makes it harder
to make the mistake to generate only the 32bit code.

Even though this is a semi big patch, I am either making a new
expand which makes sure that we can just call the non _si/_di
functions versions of the generation of the instructions or
the removal of the code which just to call those functions.

OK? Bootstrapped and tested on powerpc-darwin.

Thanks,
Andrew Pinski

ChangeLog:

	* config/darwin.c (machopic_indirect_data_reference):
	Call gen_macho_high and gen_macho_low instead of
	checking the mode and calling gen_macho_high_di directly.
	* config/rs6000/rs6000.c (rs6000_emit_move): Likewise.
	* config/rs6000/darwin.md (load_macho_picbase_di): Use the MD constant.
	* config/rs6000/rs6000.md (macho_high): New expand, rename old insn to
	(macho_high_si): This.
	(macho_low): New expand, rename old insn to
	(macho_low_si): This.
	(movdf_low): Rename to
	(movdf_low_si): This.
	(movdf_low_st): Rename to
	(movdf_low_st_si): This.
	(movsf_low): Rename to
	(movsf_low_si): This.
	(movsf_low_st): Rename to
	(movsf_low_st_si): This.
	(load_macho_picbase): New expand, rename old insn to
	(load_macho_picbase_si): This.
	(macho_correct_pic): New expand, rename old insn to
	(macho_correct_pic_si): This.
	(builtin_setjmp_receiver): Call gen_macho_high and
	gen_macho_low instead of checking the mode and calling
	gen_macho_high_di directly.


Attachment: temp.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]