summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1997-06-03 19:20:28 +0000
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1997-06-03 19:20:28 +0000
commitd60d7be7c022fa4d490cb0c085af514eff908c12 (patch)
treef51b444a51b702122f9fdb786e25bf45880673f0
parente5f994bf31f6c458e38155ae33e1cbc71473c1e2 (diff)
downloadgcc-d60d7be7c022fa4d490cb0c085af514eff908c12.tar.gz
x
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14143 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/config/sparc/sparc.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index 708060fc790..f0efe62d09a 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -2982,7 +2982,17 @@ do { \
int big_delta = (DELTA) >= 4096 || (DELTA) < -4096; \
if (big_delta) \
fprintf (FILE, "\tset %d,%%g1\n\tadd %%o0,%%g1,%%o0\n", (DELTA)); \
- if (TARGET_MEDANY || TARGET_FULLANY) \
+ if (flag_pic) \
+ { \
+ if (! big_delta) \
+ fprintf (FILE, "\tadd %%o0,%d,%%o0\n", DELTA); \
+ fprintf (FILE, "\tsave %%sp,-112,%%sp\n"); \
+ fprintf (FILE, "\tcall "); \
+ assemble_name \
+ (FILE, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
+ fprintf (FILE, ",0\n"); \
+ } \
+ else if (TARGET_MEDANY || TARGET_FULLANY) \
{ \
fprintf (FILE, "\tsetx "); \
assemble_name \
@@ -2999,8 +3009,12 @@ do { \
(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); \
+ 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)
/* Define the parentheses used to group arithmetic operations