Hi,

The patch fixes 1st fail in darwin bootstarp.
When PIC register is pseudo we don't need to init it after setjmp or
non local goto.

Is it ok?

ChangeLog:

2014-10-17  Evgeny Stupachenko  <evstu...@gmail.com>

        PR target/63534
        * config/i386/i386.c (builtin_setjmp_receiver): Delete.
        (nonlocal_goto_receiver): Ditto.

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 624a1c1..fc3776f 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -16927,57 +16927,6 @@
   "* return output_probe_stack_range (operands[0], operands[2]);"
   [(set_attr "type" "multi")])

-(define_expand "builtin_setjmp_receiver"
-  [(label_ref (match_operand 0))]
-  "!TARGET_64BIT && flag_pic"
-{
-#if TARGET_MACHO
-  if (TARGET_MACHO)
-    {
-      rtx xops[3];
-      rtx picreg = gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM);
-      rtx_code_label *label_rtx = gen_label_rtx ();
-      emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx));
-      xops[0] = xops[1] = picreg;
-      xops[2] = machopic_gen_offset (gen_rtx_LABEL_REF (SImode, label_rtx));
-      ix86_expand_binary_operator (MINUS, SImode, xops);
-    }
-  else
-#endif
-    emit_insn (gen_set_got (pic_offset_table_rtx));
-  DONE;
-})
-
-(define_insn_and_split "nonlocal_goto_receiver"
-  [(unspec_volatile [(const_int 0)] UNSPECV_NLGR)]
-  "TARGET_MACHO && !TARGET_64BIT && flag_pic"
-  "#"
-  "&& reload_completed"
-  [(const_int 0)]
-{
-  if (crtl->uses_pic_offset_table)
-    {
-      rtx xops[3];
-      rtx label_rtx = gen_label_rtx ();
-      rtx tmp;
-
-      /* Get a new pic base.  */
-      emit_insn (gen_set_got_labelled (pic_offset_table_rtx, label_rtx));
-      /* Correct this with the offset from the new to the old.  */
-      xops[0] = xops[1] = pic_offset_table_rtx;
-      label_rtx = gen_rtx_LABEL_REF (SImode, label_rtx);
-      tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, label_rtx),
-                           UNSPEC_MACHOPIC_OFFSET);
-      xops[2] = gen_rtx_CONST (Pmode, tmp);
-      ix86_expand_binary_operator (MINUS, SImode, xops);
-    }
-  else
-    /* No pic reg restore needed.  */
-    emit_note (NOTE_INSN_DELETED);
-
-  DONE;
-})
-
 ;; Avoid redundant prefixes by splitting HImode arithmetic to SImode.
 ;; Do not split instructions with mask registers.
 (define_split

Reply via email to