aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1993-01-30 14:10:07 -0700
committerJeff Law <law@gcc.gnu.org>1993-01-30 14:10:07 -0700
commitaf69aabbee1afe45343721264beb098511f1b839 (patch)
treed5a27347ad39be279e3185d1929940c01cc7afe3 /gcc
parentf048ca473feeb440805900e7317caf1d0bb70254 (diff)
downloadgcc-af69aabbee1afe45343721264beb098511f1b839.zip
gcc-af69aabbee1afe45343721264beb098511f1b839.tar.gz
gcc-af69aabbee1afe45343721264beb098511f1b839.tar.bz2
pa.h (CONST_DOUBLE_OK_FOR_LETTER_P): Generalize.
* pa.h (CONST_DOUBLE_OK_FOR_LETTER_P): Generalize. (LEGITIMATE_CONSTANT_P): Allow 0.0. (CONST_COSTS, case CONST_DOUBLE): fp0.0 is free when not used in a SET expression. From-SVN: r3392
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pa/pa.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 51563de..c9c7096 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -577,11 +577,15 @@ enum reg_class { NO_REGS, R1_REGS, GENERAL_REGS, FP_REGS, GENERAL_OR_FP_REGS,
: (C) == 'P' ? and_mask_p (VALUE) \
: 0)
-/* Similar, but for floating constants, and defining letters G and H.
- Here VALUE is the CONST_DOUBLE rtx itself. */
+/* Similar, but for floating or large integer constants, and defining letters
+ G and H. Here VALUE is the CONST_DOUBLE rtx itself.
-#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
- ((C) == 'G' && XINT (VALUE, 0) == 0 && XINT (VALUE, 1) == 0)
+ For PA, `G' is the floating-point constant zero. `H' is undefined. */
+
+#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
+ ((C) == 'G' ? (GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_FLOAT \
+ && (VALUE) == CONST0_RTX (GET_MODE (VALUE))) \
+ : 0)
/* Given an rtx X being reloaded into a reg required to be
in class CLASS, return the class of reg to actually use.
@@ -1015,11 +1019,13 @@ extern union tree_node *current_function_decl;
#define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
-/* Nonzero if the constant value X is a legitimate general operand.
- It is given that X satisfies CONSTANT_P. */
-#define LEGITIMATE_CONSTANT_P(X) \
- (GET_CODE (X) != CONST_DOUBLE)
+/* Include all constant integers and constant doubles, but not
+ floating-point, except for floating-point zero. */
+
+#define LEGITIMATE_CONSTANT_P(X) \
+ (GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \
+ || (X) == CONST0_RTX (GET_MODE (X)))
/* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
and check its validity for a certain class.
@@ -1415,7 +1421,11 @@ while (0)
case SYMBOL_REF: \
return 4; \
case CONST_DOUBLE: \
- return 8;
+ if (RTX == CONST0_RTX (DFmode) || RTX == CONST0_RTX (SFmode)\
+ && OUTER_CODE != SET) \
+ return 0; \
+ else \
+ return 8;
#define ADDRESS_COST(RTX) \
(GET_CODE (RTX) == REG ? 1 : hppa_address_cost (RTX))