Commit 6eff269e by Brendan Kehoe

define CONSTANT_ADDRESS_P(X) to not use CONST_DOUBLE

From-SVN: r3954
parent 6ec87b9d
...@@ -582,7 +582,10 @@ enum reg_class { ...@@ -582,7 +582,10 @@ enum reg_class {
/* 1 if X is an rtx for a constant that is a valid address. */ /* 1 if X is an rtx for a constant that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -522,7 +522,10 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES }; ...@@ -522,7 +522,10 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
/* 1 if X is an rtx for a constant that is a valid address. */ /* 1 if X is an rtx for a constant that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -653,7 +653,10 @@ extern enum reg_class regno_reg_class[]; ...@@ -653,7 +653,10 @@ extern enum reg_class regno_reg_class[];
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -918,7 +918,10 @@ extern enum reg_class regno_reg_class[]; ...@@ -918,7 +918,10 @@ extern enum reg_class regno_reg_class[];
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -934,7 +934,10 @@ do { \ ...@@ -934,7 +934,10 @@ do { \
#define MAX_REGS_PER_ADDRESS 2 #define MAX_REGS_PER_ADDRESS 2
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -144,7 +144,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ...@@ -144,7 +144,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#undef CONSTANT_ADDRESS_P #undef CONSTANT_ADDRESS_P
#define CONSTANT_ADDRESS_P(X) \ #define CONSTANT_ADDRESS_P(X) \
(CONSTANT_P (X) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X))) ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -693,7 +693,10 @@ struct cumulative_args { int ints, floats; }; ...@@ -693,7 +693,10 @@ struct cumulative_args { int ints, floats; };
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.
......
...@@ -911,7 +911,10 @@ extern struct rtx_def *i960_function_arg (); ...@@ -911,7 +911,10 @@ extern struct rtx_def *i960_function_arg ();
/* Maximum number of registers that can appear in a valid memory address. */ /* Maximum number of registers that can appear in a valid memory address. */
#define MAX_REGS_PER_ADDRESS 2 #define MAX_REGS_PER_ADDRESS 2
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* LEGITIMATE_CONSTANT_P is nonzero if the constant value X /* LEGITIMATE_CONSTANT_P is nonzero if the constant value X
is a legitimate general operand. is a legitimate general operand.
......
...@@ -1047,7 +1047,10 @@ __transfer_from_trampoline () \ ...@@ -1047,7 +1047,10 @@ __transfer_from_trampoline () \
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -1253,7 +1253,10 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, ...@@ -1253,7 +1253,10 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
/* #define HAVE_PRE_INCREMENT */ /* #define HAVE_PRE_INCREMENT */
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X)) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Maximum number of registers that can appear in a valid memory address. */ /* Maximum number of registers that can appear in a valid memory address. */
#define MAX_REGS_PER_ADDRESS 2 #define MAX_REGS_PER_ADDRESS 2
......
...@@ -2181,17 +2181,12 @@ __enable_execute_stack (addr) \ ...@@ -2181,17 +2181,12 @@ __enable_execute_stack (addr) \
/* A C expression that is 1 if the RTX X is a constant which is a /* A C expression that is 1 if the RTX X is a constant which is a
valid address. On most machines, this can be defined as valid address. This is defined to be the same as `CONSTANT_P (X)',
`CONSTANT_P (X)', but a few machines are more restrictive in but rejecting CONST_DOUBLE. */
which constant addresses are supported.
`CONSTANT_P' accepts integer-values expressions whose values are
not explicitly known, such as `symbol_ref', `label_ref', and
`high' expressions and `const' arithmetic expressions, in
addition to `const_int' and `const_double' expressions. */
#define CONSTANT_ADDRESS_P(X) \ #define CONSTANT_ADDRESS_P(X) \
(CONSTANT_P (X) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X))) ((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH) && (!HALF_PIC_P () || !HALF_PIC_ADDRESS_P (X)))
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
......
...@@ -1056,9 +1056,14 @@ extern union tree_node *current_function_decl; ...@@ -1056,9 +1056,14 @@ extern union tree_node *current_function_decl;
/* Recognize any constant value that is a valid address except /* Recognize any constant value that is a valid address except
for symbolic addresses. We get better CSE by rejecting them for symbolic addresses. We get better CSE by rejecting them
here and allowing hppa_legitimize_address to break them up. */ here and allowing hppa_legitimize_address to break them up. We
use most of the constants accepted by CONSTANT_P, except CONST_DOUBLE. */
#define CONSTANT_ADDRESS_P(X) \ #define CONSTANT_ADDRESS_P(X) \
((GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH) && ! symbolic_expression_p (X))
(CONSTANT_P (X) && ! symbolic_expression_p (X)) (CONSTANT_P (X) && ! symbolic_expression_p (X))
/* Include all constant integers and constant doubles, but not /* Include all constant integers and constant doubles, but not
......
...@@ -829,7 +829,10 @@ extern int current_function_calls_alloca; ...@@ -829,7 +829,10 @@ extern int current_function_calls_alloca;
/* 1 if X is an rtx for a constant that is a valid address. */ /* 1 if X is an rtx for a constant that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -947,7 +947,10 @@ struct rt_cargs {int gregs, fregs; }; ...@@ -947,7 +947,10 @@ struct rt_cargs {int gregs, fregs; };
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.
......
...@@ -969,7 +969,10 @@ struct rs6000_args {int words, fregno, nargs_prototype; }; ...@@ -969,7 +969,10 @@ struct rs6000_args {int words, fregno, nargs_prototype; };
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.
......
...@@ -1135,7 +1135,10 @@ extern struct rtx_def *sparc_builtin_saveregs (); ...@@ -1135,7 +1135,10 @@ extern struct rtx_def *sparc_builtin_saveregs ();
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) (CONSTANT_P (X)) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
Anything can be made to work except floating point constants. */ Anything can be made to work except floating point constants. */
......
...@@ -622,7 +622,10 @@ extern int current_function_pretend_args_size; ...@@ -622,7 +622,10 @@ extern int current_function_pretend_args_size;
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -446,7 +446,10 @@ enum reg_class {NO_REGS,GENERAL_REGS,FPP_REG,ALL_REGS,LIM_REG_CLASSES}; ...@@ -446,7 +446,10 @@ enum reg_class {NO_REGS,GENERAL_REGS,FPP_REG,ALL_REGS,LIM_REG_CLASSES};
/* constant addresses can be treated exactly the same as normal constants */ /* constant addresses can be treated exactly the same as normal constants */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* we can have as many as two regs in any given address */ /* we can have as many as two regs in any given address */
......
...@@ -571,7 +571,10 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12)) ...@@ -571,7 +571,10 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
/* 1 if X is an rtx for a constant that is a valid address. */ /* 1 if X is an rtx for a constant that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
...@@ -533,7 +533,10 @@ enum reg_class { NO_REGS, GENERAL_REGS, ...@@ -533,7 +533,10 @@ enum reg_class { NO_REGS, GENERAL_REGS,
/* Recognize any constant value that is a valid address. */ /* Recognize any constant value that is a valid address. */
#define CONSTANT_ADDRESS_P(X) CONSTANT_P(X) #define CONSTANT_ADDRESS_P(X) \
(GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
|| GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST \
|| GET_CODE (X) == HIGH)
/* Nonzero if the constant value X is a legitimate general operand. /* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
......
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