From: Bo Thorsen Date: Mon, 9 Jul 2001 09:34:43 +0000 (+0000) Subject: Implement vtable jumps for x86-64. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db42058b0b6754acd596020a42df0253d6fbe1fa;p=gcc.git Implement vtable jumps for x86-64. From-SVN: r43860 --- 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 + + * config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix x86-64 vtable support. + 2001-07-09 Neil Booth * 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 "); \