* config/i386/i386.c (x86_output_mi_thunk) Add Darwin/x86 support.
authorStuart Hastings <stuart@apple.com>
Sat, 25 Jan 2003 01:35:50 +0000 (01:35 +0000)
committerStuart Hastings <stuart@gcc.gnu.org>
Sat, 25 Jan 2003 01:35:50 +0000 (01:35 +0000)
From-SVN: r61755

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

index 1cb8d9ebb1906e0b1b8284e5d7caaf4ad4d80d3a..4512400bd1a09a329a2d11ec94c09e3852cdbb72 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-24  Stuart Hastings  <stuart@apple.com>
+
+       * config/i386/i386.c (x86_output_mi_thunk) Add Darwin/x86 support.
+
 2003-01-25  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
 
        * config/c4x/c4x.md (UNSPEC_BU): New constants.
index 45165f48c97a3c9da9fce0efdddb4c56978550d2..eaaf4abef8cf3e6c561bc936571e60eb2455ee19 100644 (file)
@@ -14801,6 +14801,17 @@ 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
+#if defined TARGET_MACHO
+       if (TARGET_MACHO)
+         {
+           char *ip = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (function));
+           tmp = gen_rtx_SYMBOL_REF (Pmode, machopic_stub_name (ip));
+           tmp = gen_rtx_MEM (QImode, tmp);
+           xops[0] = tmp;
+           output_asm_insn ("jmp\t%0", xops);
+         }
+       else
+#endif /* TARGET_MACHO */
        {
          tmp = gen_rtx_REG (SImode, 2 /* ECX */);
          output_set_got (tmp);