This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Simplify LEGITIMATE_CONSTANT_P macro in pa.h
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Dec 2006 12:50:23 -0500 (EST)
- Subject: [committed] Simplify LEGITIMATE_CONSTANT_P macro in pa.h
The enclosed patch makes it a bit easier to understand the logic
in LEGITIMATE_CONSTANT_P.
Committed to trunk. Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11
and hppa-unknown-linux-gnu.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2006-12-08 John David Anglin <dave.anglin.@nrc-cnrc.gc.ca>
* pa.h (LEGITIMATE_CONSTANT_P): Simplify.
Index: config/pa/pa.h
===================================================================
--- config/pa/pa.h (revision 119644)
+++ config/pa/pa.h (working copy)
@@ -1119,13 +1119,18 @@
#define LEGITIMATE_CONSTANT_P(X) \
((GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT \
|| (X) == CONST0_RTX (GET_MODE (X))) \
- && (NEW_HP_ASSEMBLER || TARGET_GAS || GET_CODE (X) != LABEL_REF) \
- && !(TARGET_64BIT && GET_CODE (X) == CONST_DOUBLE) \
- && !(TARGET_64BIT && GET_CODE (X) == CONST_INT \
- && !(HOST_BITS_PER_WIDE_INT <= 32 \
- || (reload_in_progress || reload_completed) \
- || LEGITIMATE_64BIT_CONST_INT_P (INTVAL (X)) \
- || cint_ok_for_move (INTVAL (X)))) \
+ && (NEW_HP_ASSEMBLER \
+ || TARGET_GAS \
+ || GET_CODE (X) != LABEL_REF) \
+ && (!TARGET_64BIT \
+ || GET_CODE (X) != CONST_DOUBLE) \
+ && (!TARGET_64BIT \
+ || HOST_BITS_PER_WIDE_INT <= 32 \
+ || GET_CODE (X) != CONST_INT \
+ || reload_in_progress \
+ || reload_completed \
+ || LEGITIMATE_64BIT_CONST_INT_P (INTVAL (X)) \
+ || cint_ok_for_move (INTVAL (X))) \
&& !function_label_operand (X, VOIDmode))
/* Target flags set on a symbol_ref. */