summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/i386/unix.h8
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index bd392efa639..8e52cfcd62c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2001-07-09 Bo Thorsen <bo@suse.co.uk>
+
+ * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support.
+
2001-07-09 Neil Booth <neil@daikokuya.demon.co.uk>
* final.c (output_addr_const): Use target opening and
diff --git a/gcc/config/i386/unix.h b/gcc/config/i386/unix.h
index 508d4c89ece..25dec9ab358 100644
--- a/gcc/config/i386/unix.h
+++ b/gcc/config/i386/unix.h
@@ -106,7 +106,7 @@ do { \
xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 4)); \
output_asm_insn ("add{l} {%0, %1|%1, %0}", xops); \
\
- if (flag_pic) \
+ if (flag_pic && !TARGET_64BIT) \
{ \
xops[0] = pic_offset_table_rtx; \
xops[1] = gen_label_rtx (); \
@@ -124,6 +124,12 @@ do { \
asm_fprintf (FILE, "\tpop{l\t%%ebx|\t%%ebx}\n"); \
asm_fprintf (FILE, "\tjmp\t{*%%ecx|%%ecx}\n"); \
} \
+ else if (flag_pic && TARGET_64BIT) \
+ { \
+ fprintf (FILE, "\tjmp *"); \
+ assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
+ fprintf (FILE, "@GOTPCREL(%RIP)\n"); \
+ } \
else \
{ \
fprintf (FILE, "\tjmp "); \