aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/ia64/ia64.h15
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index af27727..6d316d2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-20 Jim Wilson <wilson@cygnus.com>
+
+ * config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Handle DELTA values
+ larger than 14 bits.
+
2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
* cppmacro.c (CAN_PASTE_AFTER): New macro.
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 1d64e53..f4fa27a 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1486,12 +1486,19 @@ do { \
/* A C compound statement that outputs the assembler code for a thunk function,
used to implement C++ virtual function calls with multiple inheritance. */
-/* ??? This only supports deltas up to 14 bits. If we need more, then we
- must load the delta into a register first. */
-
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \
- fprintf (FILE, "\tadd r32 = %d, r32\n", (DELTA)); \
+ if (CONST_OK_FOR_I (DELTA)) \
+ fprintf (FILE, "\tadds r32 = %d, r32\n", (DELTA)); \
+ else \
+ { \
+ if (CONST_OK_FOR_J (DELTA)) \
+ fprintf (FILE, "\taddl r2 = %d, r0\n", (DELTA)); \
+ else \
+ fprintf (FILE, "\tmovl r2 = %d\n", (DELTA)); \
+ fprintf (FILE, "\t;;\n"); \
+ fprintf (FILE, "\tadd r32 = r2, r32\n"); \
+ } \
fprintf (FILE, "\tbr "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "\n"); \