aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-03-30 17:30:32 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-03-30 17:30:32 -0500
commit1ed37bfd37792f173fb9feb2f2513b72c22930cd (patch)
treea66281fd6cae7f7dd262bf19aef87a706614a0c7 /gcc/config
parent4fa6668b453cff1474cb8b6f5511ad444a306e1f (diff)
downloadgcc-1ed37bfd37792f173fb9feb2f2513b72c22930cd.zip
gcc-1ed37bfd37792f173fb9feb2f2513b72c22930cd.tar.gz
gcc-1ed37bfd37792f173fb9feb2f2513b72c22930cd.tar.bz2
(FUNCTION_PROLOGUE): use __GLOBAL_OFFSET_TABLE_, not _GLOBAL_OFFSET_TABLE_.
(LEGITIMATE_CONSTANT_P, LEGITIMATE_PIC_OPERAND_P): Use LEGITIMATE_PIC_OPERAND_P, not LEGITIMATE_CONSTANT_P, to set current_function_uses_pic_offset_table. (INDIRECTABLE_1_ADDRESS_P): Baseregisters are not legal for {LABEL,SYMBOL}_REFS when emitting pic. (GO_IF_INDEXABLE_ADDRESS): INDIRECTABLE_1_ADDRESSes are indexable too. From-SVN: r6926
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/ns32k/ns32k.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h
index dee0b06..af68772 100644
--- a/gcc/config/ns32k/ns32k.h
+++ b/gcc/config/ns32k/ns32k.h
@@ -603,12 +603,12 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, GEN_AND_FP_REGS,
fprintf (FILE, "\tsprd sb,tos\n"); \
if (TARGET_REGPARM) \
{ \
- fprintf (FILE, "\taddr _GLOBAL_OFFSET_TABLE_(pc),tos\n"); \
+ fprintf (FILE, "\taddr __GLOBAL_OFFSET_TABLE_(pc),tos\n"); \
fprintf (FILE, "\tlprd sb,tos\n"); \
} \
else \
{ \
- fprintf (FILE, "\taddr _GLOBAL_OFFSET_TABLE_(pc),r0\n"); \
+ fprintf (FILE, "\taddr __GLOBAL_OFFSET_TABLE_(pc),r0\n"); \
fprintf (FILE, "\tlprd sb,r0\n"); \
} \
} \
@@ -851,12 +851,7 @@ __transfer_from_trampoline () \
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
-extern int current_function_uses_pic_offset_table, flag_pic;
-#define LEGITIMATE_CONSTANT_P(X) \
- (((flag_pic && ! current_function_uses_pic_offset_table \
- && global_symbolic_reference_mentioned_p (X))? \
- (current_function_uses_pic_offset_table = 1):0 \
- ), 1)
+#define LEGITIMATE_CONSTANT_P(X) 1
/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
and check its validity for a certain class.
@@ -910,7 +905,10 @@ extern int current_function_uses_pic_offset_table, flag_pic;
|| (GET_CODE (X) == PLUS \
&& GET_CODE (XEXP (X, 0)) == REG \
&& REG_OK_FOR_BASE_P (XEXP (X, 0)) \
- && CONSTANT_ADDRESS_P (XEXP (X, 1)) \
+ && (flag_pic ? \
+ CONSTANT_ADDRESS_NO_LABEL_P (XEXP (X, 1)) \
+ : \
+ CONSTANT_ADDRESS_P (XEXP (X, 1))) \
&& (GET_CODE (X) != CONST_INT || NS32K_DISPLACEMENT_P (INTVAL (X)))))
/* 1 if integer I will fit in a 4 byte displacement field.
@@ -963,6 +961,7 @@ extern int current_function_uses_pic_offset_table, flag_pic;
#define GO_IF_INDEXABLE_ADDRESS(X, ADDR) \
{ if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) goto ADDR; \
if (INDIRECTABLE_2_ADDRESS_P (X)) goto ADDR; \
+ if (INDIRECTABLE_1_ADDRESS_P (X)) goto ADDR; \
}
/* 1 if PROD is either a reg times size of mode MODE
@@ -992,7 +991,7 @@ extern int current_function_uses_pic_offset_table, flag_pic;
extern int current_function_uses_pic_offset_table, flag_pic; \
xfooy = X; \
if (flag_pic && ! current_function_uses_pic_offset_table \
- && global_symbolic_reference_mentioned_p (X)) \
+ && global_symbolic_reference_mentioned_p (X, 1)) \
current_function_uses_pic_offset_table = 1; \
GO_IF_NONINDEXED_ADDRESS (xfooy, ADDR); \
if (GET_CODE (xfooy) == PLUS) \
@@ -1029,6 +1028,17 @@ extern int current_function_uses_pic_offset_table, flag_pic;
#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {}
+/* Nonzero if the constant value X is a legitimate general operand
+ when generating PIC code. It is given that flag_pic is on and
+ that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
+
+extern int current_function_uses_pic_offset_table, flag_pic;
+#define LEGITIMATE_PIC_OPERAND_P(X) \
+ (((! current_function_uses_pic_offset_table \
+ && global_symbolic_reference_mentioned_p (X, 1))? \
+ (current_function_uses_pic_offset_table = 1):0 \
+ ), 1)
+
/* Define this macro if references to a symbol must be treated
differently depending on something about the variable or
function named by the symbol (such as what section it is in).