aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1996-04-21 16:56:06 +0000
committerDoug Evans <dje@gnu.org>1996-04-21 16:56:06 +0000
commit88e42c0b29ed136d8579fd445e5f68cb259ea64b (patch)
treeacc500a12a125739f28b985aa8eb12da7a7a2556 /gcc/config/arm
parentc94b31794553a054a2204476cb48b0a07f6f863f (diff)
downloadgcc-88e42c0b29ed136d8579fd445e5f68cb259ea64b.zip
gcc-88e42c0b29ed136d8579fd445e5f68cb259ea64b.tar.gz
gcc-88e42c0b29ed136d8579fd445e5f68cb259ea64b.tar.bz2
* arm/aout.h (ASM_OUTPUT_MI_THUNK): Define.
From-SVN: r11862
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/aout.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h
index 9e7d598..74814a1 100644
--- a/gcc/config/arm/aout.h
+++ b/gcc/config/arm/aout.h
@@ -261,4 +261,25 @@ do { char dstr[30]; \
#define ASM_COMMENT_START "@"
#endif
+/* 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 mi_delta = (DELTA); \
+ char *mi_op = mi_delta < 0 ? "sub" : "add"; \
+ unsigned int mi_mask = 0xff000000; \
+ if (mi_delta < 0) mi_delta = -mi_delta; \
+ while (mi_mask) \
+ { \
+ if (mi_delta & mi_mask) \
+ fprintf (FILE, "\t%s %s, %s, #%d\n", \
+ mi_op, reg_names[0], reg_names[0], mi_delta & mi_mask); \
+ arm_increase_location (4); \
+ mi_mask >>= 8; \
+ } \
+ fprintf (FILE, "\tldr pc, 1f\n1:"); \
+ arm_increase_location (4); \
+ ASM_OUTPUT_INT (FILE, XEXP (DECL_RTL (FUNCTION), 0)); \
+} while (0)
+
#include "arm/arm.h"