aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1997-11-05 19:29:37 +0000
committerJim Wilson <wilson@gcc.gnu.org>1997-11-05 11:29:37 -0800
commit4f9ca067a1b0f3dcb9d18187726fc7beac791b18 (patch)
tree2166745d91bfdd6a2826552a04c4191fcb9cf87a
parent5b8f8eeb20f2f5582b9393f36a9b0e148f264316 (diff)
downloadgcc-4f9ca067a1b0f3dcb9d18187726fc7beac791b18.zip
gcc-4f9ca067a1b0f3dcb9d18187726fc7beac791b18.tar.gz
gcc-4f9ca067a1b0f3dcb9d18187726fc7beac791b18.tar.bz2
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c10
-rw-r--r--gcc/config/i386/i386.md23
3 files changed, 30 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e275e17..2801ba2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Wed Nov 5 11:27:14 1997 Jim Wilson <wilson@cygnus.com>
+
+ * 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 8516911d..f411aaa 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 64edb55..ea72a98 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)]
""