mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 19:19:55 +08:00
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:
parent
e995813266
commit
591eb4baa8
@ -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.
|
||||
|
@ -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"); \
|
||||
|
Loading…
Reference in New Issue
Block a user