* config/i386/i386.c (x86_output_mi_thunk): Fix x86_64 pic jump.
authorRichard Henderson <rth@redhat.com>
Thu, 24 Oct 2002 22:36:25 +0000 (15:36 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 24 Oct 2002 22:36:25 +0000 (15:36 -0700)
From-SVN: r58508

gcc/ChangeLog
gcc/config/i386/i386.c

index 38c22877b58ff8f7c590a15880624508923b86f0..72006a2ee5f68384463f5f17ab43b0f4facce0d7 100644 (file)
@@ -1,3 +1,7 @@
+2002-10-24  Richard Henderson  <rth@redhat.com>
+
+       * config/i386/i386.c (x86_output_mi_thunk): Fix x86_64 pic jump.
+
 2002-10-24  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (initial_offset): Simplify by using
index 4b13c46ec9c6c19781cd3650ada0e658c6993ea9..f950198f73b347af91dad00e68e3dca3bba6b7e5 100644 (file)
@@ -14233,7 +14233,14 @@ x86_output_mi_thunk (file, thunk, delta, vcall_offset, function)
       if (!flag_pic || (*targetm.binds_local_p) (function))
        output_asm_insn ("jmp\t%P0", xops);
       else
-       output_asm_insn ("jmp\t*%P0@GOTPCREL(%%rip)", xops);
+       {
+         tmp = XEXP (xops[0], 0);
+         tmp = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, tmp), UNSPEC_GOTPCREL);
+         tmp = gen_rtx_CONST (Pmode, tmp);
+         tmp = gen_rtx_MEM (QImode, tmp);
+         xops[0] = tmp;
+         output_asm_insn ("jmp\t%A0", xops);
+       }
     }
   else
     {