OSDN Git Service

(ASM_OUTPUT_MI_THUNK): Define.
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Mar 1997 22:10:39 +0000 (22:10 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Mar 1997 22:10:39 +0000 (22:10 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13750 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/m68k/linux.h

index 5a53db1..5807597 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for Motorola 68k running Linux with ELF format.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -354,3 +354,30 @@ do {                                                                       \
      : "d" (_beg), "d" (_len)                                          \
      : "%d0", "%d2", "%d3");                                           \
 }
+\f
+/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
+   Used for C++ multiple inheritance.  */
+#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION)       \
+do {                                                                   \
+  if (DELTA > 0 && DELTA <= 8)                                         \
+    asm_fprintf (FILE, "\taddq.l %I%d,4(%Rsp)\n", DELTA);              \
+  else if (DELTA < 0 && DELTA >= -8)                                   \
+    asm_fprintf (FILE, "\tsubq.l %I%d,4(%Rsp)\n", -DELTA);             \
+  else                                                                 \
+    asm_fprintf (FILE, "\tadd.l %I%d,4(%Rsp)\n", DELTA);               \
+                                                                       \
+  if (flag_pic)                                                                \
+    {                                                                  \
+      fprintf (FILE, "\tbra.l ");                                      \
+      assemble_name                                                    \
+       (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION)));    \
+      fprintf (FILE, "@PLTPC\n");                                      \
+    }                                                                  \
+  else                                                                 \
+    {                                                                  \
+      fprintf (FILE, "\tjmp ");                                                \
+      assemble_name                                                    \
+       (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION)));    \
+      fprintf (FILE, "\n");                                            \
+    }                                                                  \
+} while (0)