Fix out-of-range immediate for large thunk offset.

* config/ia64/ia64.h (ASM_OUTPUT_MI_THUNK): Handle DELTA values
	larger than 14 bits.

From-SVN: r35154
This commit is contained in:
Jim Wilson 2000-07-20 21:27:15 +00:00 committed by Jim Wilson
parent e995813266
commit 591eb4baa8
2 changed files with 16 additions and 4 deletions

View File

@ -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.

View File

@ -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"); \