summaryrefslogtreecommitdiff
path: root/gcc/config/m68k/linux.h
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-03-19 22:10:39 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-03-19 22:10:39 +0000
commit5cabebbbcfa13e16e7b208814eb4f127793e5664 (patch)
tree09f3b02c4ac58176e768988c4c993142f2346544 /gcc/config/m68k/linux.h
parent78ffd5f3b3307a7eb71367c9aa09d309eba8d67e (diff)
downloadgcc-5cabebbbcfa13e16e7b208814eb4f127793e5664.tar.gz
(ASM_OUTPUT_MI_THUNK): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13750 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m68k/linux.h')
-rw-r--r--gcc/config/m68k/linux.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index 5a53db14ba9..5807597d7bd 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -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"); \
}
+
+/* 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)