Commit 4c646291 by Jakub Jelinek Committed by Jakub Jelinek

alpha.h (ASM_OUTPUT_MI_THUNK): Reload gp if needed.

	* config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Reload gp if needed.
	* config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Always use call, make
	sure linker can relax even the delay slot mov %g1,%o7, fix output
	formating.

From-SVN: r36912
parent 07e0fe3d
2000-10-17 Jakub Jelinek <jakub@redhat.com>
* config/alpha/alpha.h (ASM_OUTPUT_MI_THUNK): Reload gp if needed.
* config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Always use call, make
sure linker can relax even the delay slot mov %g1,%o7, fix output
formating.
2000-10-17 Kazu Hirata <kazu@hxi.com> 2000-10-17 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md: Remove an unnecessary zero_extend * config/h8300/h8300.md: Remove an unnecessary zero_extend
......
...@@ -2240,6 +2240,9 @@ do { \ ...@@ -2240,6 +2240,9 @@ do { \
const char *fn_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \ const char *fn_name = XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0); \
int reg; \ int reg; \
\ \
if (! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT) \
fprintf (FILE, "\tldgp $29,0($27)\n"); \
\
/* Mark end of prologue. */ \ /* Mark end of prologue. */ \
output_end_prologue (FILE); \ output_end_prologue (FILE); \
\ \
......
...@@ -3231,42 +3231,15 @@ do { \ ...@@ -3231,42 +3231,15 @@ do { \
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; \ if ((DELTA) >= 4096 || (DELTA) < -4096) \
if (big_delta) \ fprintf (FILE, "\tset\t%d, %%g1\n\tadd\t%%o0, %%g1, %%o0\n", (DELTA));\
fprintf (FILE, "\tset %d,%%g1\n\tadd %%o0,%%g1,%%o0\n", (DELTA)); \
/* Don't use the jmp solution unless we know the target is local to \
the application or shared object. \
XXX: Wimp out and don't actually check anything except if this is \
an embedded target where we assume there are no shared libs. */ \
if (!TARGET_CM_EMBMEDANY || flag_pic) \
{ \
if (! big_delta) \
fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \
fprintf (FILE, "\tmov %%o7,%%g1\n"); \
fprintf (FILE, "\tcall "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, ",0\n"); \
} \
else if (TARGET_CM_EMBMEDANY) \
{ \
fprintf (FILE, "\tsetx "); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, ",%%g5,%%g1\n\tjmp %%g1\n"); \
} \
else \
{ \
fprintf (FILE, "\tsethi %%hi("); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "),%%g1\n\tjmp %%g1+%%lo("); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, ")\n"); \
} \
if (!TARGET_CM_EMBMEDANY || flag_pic) \
fprintf (FILE, "\tmov %%g1,%%o7\n"); \
else if (big_delta) \
fprintf (FILE, "\tnop\n"); \
else \ else \
fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \ fprintf (FILE, "\tadd\t%%o0, %d, %%o0\n", DELTA); \
fprintf (FILE, "\tor\t%%o7, %%g0, %%g1\n"); \
fprintf (FILE, "\tcall\t"); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, ", 0\n"); \
fprintf (FILE, "\t or\t%%g1, %%g0, %%o7\n"); \
} 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