Commit 1df8f58f by Jason Merrill

(ASM_OUTPUT_MI_THUNK): Fix for sparc64, optimize.

From-SVN: r11913
parent dd4fd0a0
...@@ -2948,16 +2948,30 @@ do { \ ...@@ -2948,16 +2948,30 @@ do { \
/* Output code to add DELTA to the first argument, and then jump to FUNCTION. /* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */ Used for C++ multiple inheritance. */
#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \ #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
do { \ do { \
int big_delta = (DELTA) >= 4096 || (DELTA) < -4096; \ int big_delta = (DELTA) >= 4096 || (DELTA) < -4096; \
if (big_delta) \ if (big_delta) \
fprintf (FILE, "\tset %d,%%g1\n\tadd %%o0,%%g1,%%o0\n", DELTA); \ fprintf (FILE, "\tset %d,%%g1\n\tadd %%o0,%%g1,%%o0\n", (DELTA)); \
fprintf (FILE, "\tset "); \ if (TARGET_MEDANY || TARGET_FULLANY) \
assemble_name (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \ { \
fprintf (FILE, ",%%g1\n\tjmp %%g1\n");\ fprintf (FILE, "\tsetx "); \
if (big_delta) fprintf (FILE, "\tnop\n"); \ assemble_name \
else fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \ (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
fprintf (FILE, ",%%g5,%%g1\n\tjmp %%g1\n"); \
} \
else \
{ \
fprintf (FILE, "\tsethi %%hi("); \
assemble_name \
(FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
fprintf (FILE, "),%%g1\n\tjmp %%g1+%%lo("); \
assemble_name \
(FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
fprintf (FILE, ")\n"); \
} \
if (big_delta) fprintf (FILE, "\tnop\n"); \
else fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \
} while (0) } while (0)
/* Define the parentheses used to group arithmetic operations /* Define the parentheses used to group arithmetic operations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment