From: Jim Wilson Date: Wed, 5 Nov 1997 19:29:37 +0000 (+0000) Subject: Fix i386-linux build failure. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f9ca067a1b0f3dcb9d18187726fc7beac791b18;p=gcc.git Fix i386-linux build failure. * i386.c (load_pic_register): Call prologue_get_pc_and_set_got. * i386.md (prologue_set_got, prologue_get_pc): Add UNSPEC_VOLATILE to pattern. (prologue_get_pc_and_set_got): New pattern. From-SVN: r16342 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e275e1795d4..2801ba2280d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Wed Nov 5 11:27:14 1997 Jim Wilson + + * i386.c (load_pic_register): Call prologue_get_pc_and_set_got. + * i386.md (prologue_set_got, prologue_get_pc): Add UNSPEC_VOLATILE + to pattern. + (prologue_get_pc_and_set_got): New pattern. + Tue Nov 4 20:36:50 1997 Richard Henderson (rth@cygnus.com) * alpha.c (summarize_insn): Handle ASM_OPERANDS. Don't recurse diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8516911dd1d..f411aaaa55b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1973,12 +1973,10 @@ load_pic_register (do_rtl) if (do_rtl) { - emit_insn (gen_prologue_get_pc (xops[0], xops[1])); - emit_insn (gen_pop (xops[0])); - emit_insn (gen_prologue_set_got - (xops[0], - gen_rtx (SYMBOL_REF, Pmode, "$_GLOBAL_OFFSET_TABLE_"), - xops[1])); + /* We can't put a raw CODE_LABEL into the RTL, and we can't emit + a new CODE_LABEL after reload, so we need a single pattern to + emit the 3 necessary instructions. */ + emit_insn (gen_prologue_get_pc_and_set_got (xops[0])); } else { diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 64edb555dfb..ea72a98a65e 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6515,9 +6515,10 @@ byte_xor_operation: (define_insn "prologue_set_got" [(set (match_operand:SI 0 "" "") - (plus:SI (match_dup 0) - (plus:SI (match_operand:SI 1 "symbolic_operand" "") - (minus:SI (pc) (match_operand 2 "" "")))))] + (unspec_volatile + [(plus:SI (match_dup 0) + (plus:SI (match_operand:SI 1 "symbolic_operand" "") + (minus:SI (pc) (match_operand 2 "" ""))))] 1))] "" "* { @@ -6538,7 +6539,7 @@ byte_xor_operation: (define_insn "prologue_get_pc" [(set (match_operand:SI 0 "" "") - (plus:SI (pc) (match_operand 1 "" "")))] + (unspec_volatile [(plus:SI (pc) (match_operand 1 "" ""))] 2))] "" "* { @@ -6552,6 +6553,20 @@ byte_xor_operation: RET; }") +(define_insn "prologue_get_pc_and_set_got" + [(unspec_volatile [(match_operand:SI 0 "" "")] 3)] + "" + "* +{ + operands[1] = gen_label_rtx (); + output_asm_insn (AS1 (call,%P1), operands); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", + CODE_LABEL_NUMBER (operands[1])); + output_asm_insn (AS1 (pop%L0,%0), operands); + output_asm_insn (\"addl $_GLOBAL_OFFSET_TABLE_+[.-%P1],%0\", operands); + RET; +}") + (define_expand "epilogue" [(const_int 1)] ""