This is the mail archive of the 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]

Re: [Patch x86/darwin] fix PR51784 'PIC register not correctly preserved...'

Hi Uros,

thanks for your reviews,

On 18 Jul 2013, at 12:39, Uros Bizjak wrote:

> On Thu, Jul 18, 2013 at 12:12 PM, Iain Sandoe <> wrote:
>> So, I think we have to use the define_insn_and_split, or am I still missing something?
> Just a wild guess, do you also need "&& reload_completed" in the split
> condition?

good catch, thanks - this got cut erroneously from the last variant of the patch.

Fixed & re-tested on x86_64-darwin12 / x86_64-linux (both at m32 and m64) showing the expected progressions on darwin (and correct behaviour on linux for the shlib example).

OK for trunk?

Ok for open branches? (this is a wrong-code bug)

[N.B. No changes to the darwin-specific portions already approved by Mike]



	PR target/51784
	* config/i386/i386.c (output_set_got) [TARGET_MACHO]: Adjust to emit a second label for
	nonlocal goto receivers. Don't output pic base labels unless we're producing PIC; mark
	that action unreachable().
	(ix86_save_reg): If the function contains a nonlocal label, save the PIC base reg.
	* config/darwin-protos.h (machopic_should_output_picbase_label): New.
	* gcc/config/darwin.c (emitted_pic_label_num): New GTY. 
	(update_pic_label_number_if_needed): New.
	(machopic_output_function_base_name): Adjust for nonlocal receiver case.
	(machopic_should_output_picbase_label): New.
	* config/i386/ (enum unspecv): UNSPECV_NLGR: New.
	(nonlocal_goto_receiver): New insn and split.

Attachment: PR51784-nested-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]