Commit 3cb32ea3 by Richard Kenner

(ASM_OUTPUT_MI_THUNK): Define.

From-SVN: r13750
parent 641d4443
/* 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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment