aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1996-04-21 16:29:26 +0000
committerJason Merrill <merrill@gnu.org>1996-04-21 16:29:26 +0000
commitc94b31794553a054a2204476cb48b0a07f6f863f (patch)
treed784755b7c98cbda3a26c58278f60157e734c760
parentacbdd7dd6711a314102a33c565a4020fbccd0e0b (diff)
downloadgcc-c94b31794553a054a2204476cb48b0a07f6f863f.zip
gcc-c94b31794553a054a2204476cb48b0a07f6f863f.tar.gz
gcc-c94b31794553a054a2204476cb48b0a07f6f863f.tar.bz2
(ASM_EMIT_MI_THUNK): Define.
From-SVN: r11861
-rw-r--r--gcc/config/sparc/sparc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index be31763..84b4811 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -2946,6 +2946,20 @@ do { \
#define ASM_OUTPUT_IDENT(FILE, NAME) \
fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
+/* 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 { \
+ int big_delta = (DELTA) >= 4096 || (DELTA) < -4096; \
+ if (big_delta) \
+ fprintf (FILE, "\tset %d,%%g1\n\tadd %%o0,%%g1,%%o0\n", DELTA); \
+ fprintf (FILE, "\tset "); \
+ assemble_name (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
+ fprintf (FILE, ",%%g1\n\tjmp %%g1\n");\
+ if (big_delta) fprintf (FILE, "\tnop\n"); \
+ else fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \
+} while (0)
+
/* Define the parentheses used to group arithmetic operations
in assembler code. */