aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1997-12-29 16:02:54 -0800
committerRichard Henderson <rth@gcc.gnu.org>1997-12-29 16:02:54 -0800
commit194faace59fd10e2db5a894f068b1c7f3311a9cd (patch)
treea3ccdcb4525665de79a26a835bf277d52acfd266 /gcc
parent975602f82cff53b6b0829f5e131117ca1f56812d (diff)
downloadgcc-194faace59fd10e2db5a894f068b1c7f3311a9cd.zip
gcc-194faace59fd10e2db5a894f068b1c7f3311a9cd.tar.gz
gcc-194faace59fd10e2db5a894f068b1c7f3311a9cd.tar.bz2
sparc.h (ASM_OUTPUT_MI_THUNK): Move %o7 through %g1 instead of save+restore.
* sparc.h (ASM_OUTPUT_MI_THUNK): Move %o7 through %g1 instead of save+restore. Fix pic+big_offset delay slot. Use "pic" case for unix always, since we want to be able to thunk to functions in a shared library from an application. From-SVN: r17262
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/sparc/sparc.h14
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c619c03..b2043d1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Tue Dec 30 00:04:49 1997 Richard Henderson <rth@cygnus.com>
+
+ * sparc.h (ASM_OUTPUT_MI_THUNK): Move %o7 through %g1 instead of
+ save+restore. Fix pic+big_offset delay slot. Use "pic" case for
+ unix always, since we want to be able to thunk to functions in a
+ shared library from an application.
+
Mon Dec 29 14:37:31 1997 Ian Lance Taylor <ian@cygnus.com>
* mips/t-ecoff (CROSS_LIBGCC1): Define to libgcc1-asm.a.
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index e87058c..2cc8b95 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -3017,11 +3017,15 @@ do { \
int big_delta = (DELTA) >= 4096 || (DELTA) < -4096; \
if (big_delta) \
fprintf (FILE, "\tset %d,%%g1\n\tadd %%o0,%%g1,%%o0\n", (DELTA)); \
- if (flag_pic) \
+ /* 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, "\tsave %%sp,-112,%%sp\n"); \
+ fprintf (FILE, "\tmov %%o7,%%g1\n"); \
fprintf (FILE, "\tcall "); \
assemble_name \
(FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
@@ -3044,10 +3048,10 @@ do { \
(FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
fprintf (FILE, ")\n"); \
} \
- if (big_delta) \
+ if (!TARGET_CM_EMBMEDANY || flag_pic) \
+ fprintf (FILE, "\tmov %%g1,%%o7\n"); \
+ else if (big_delta) \
fprintf (FILE, "\tnop\n"); \
- else if (flag_pic) \
- fprintf (FILE, "\trestore\n"); \
else \
fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \
} while (0)