From 69f9b97f67aeb3290677febfe1bbd81e7066f8e2 Mon Sep 17 00:00:00 2001
From: amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 13 Apr 2001 05:34:06 +0000
Subject: [PATCH] 	* pa-hpux10.h (NEW_HP_ASSEMBLER): Define to 1. 	*
 pa-hpux11.h (NEW_HP_ASSEMBLER): Likewise. 	* pa.h (LEGITIMATE_CONSTANT_P)
 Collapse two defines depending on 	NEW_HP_ASSEMBLER into one.  Kill
 warnings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41326 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog             |  5 +++++
 gcc/config/pa/pa-hpux10.h |  3 ++-
 gcc/config/pa/pa-hpux11.h |  3 ++-
 gcc/config/pa/pa.h        | 34 +++++++++++++---------------------
 4 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c37c6fe3a945..0fbc838e575e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
 2001-04-13  Alan Modra  <amodra@one.net.au>
 
+	* pa-hpux10.h (NEW_HP_ASSEMBLER): Define to 1.
+	* pa-hpux11.h (NEW_HP_ASSEMBLER): Likewise.
+	* pa.h (LEGITIMATE_CONSTANT_P) Collapse two defines depending on
+	NEW_HP_ASSEMBLER into one.  Kill warnings.
+
 	* pa-gas.h: Delete file.
 	* config.gcc: Match `parisc' as well as `hppa' for cpu_type=pa.
 	Add new targets hppa*64*-*-linux* and parisc*64*-*-linux*.  Update
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index 22223e10c735..c9322b9ab657 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -60,4 +60,5 @@ Boston, MA 02111-1307, USA.  */
 
 /* hpux10 has the new HP assembler.  It's still lousy, but it's a whole lot
    better than the assembler shipped with older versions of hpux.  */
-#define NEW_HP_ASSEMBLER
+#undef NEW_HP_ASSEMBLER
+#define NEW_HP_ASSEMBLER 1
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index 42858e7246fa..522605453f6f 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -59,7 +59,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* hpux11 has the new HP assembler.  It's still lousy, but it's a whole lot
    better than the assembler shipped with older versions of hpux.  */
-#define NEW_HP_ASSEMBLER
+#undef NEW_HP_ASSEMBLER
+#define NEW_HP_ASSEMBLER 1
 
 /* Make GCC agree with types.h.  */
 #undef SIZE_TYPE
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 74db8a43bf28..7548c1f4d36d 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1116,28 +1116,20 @@ extern int may_call_alloca;
 
    ?!? For now also reject CONST_DOUBLES in 64bit mode.  This will need
    further work.  */
-#ifdef NEW_HP_ASSEMBLER
-#define LEGITIMATE_CONSTANT_P(X)  		\
-  ((GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT	\
-    || (X) == CONST0_RTX (GET_MODE (X)))	\
-   && !(TARGET_64BIT && GET_CODE (X) == CONST_DOUBLE) \
-   && !(TARGET_64BIT && GET_CODE (X) == CONST_INT \
-	&& !(cint_ok_for_move (INTVAL (X))	\
-	     || ((INTVAL (X) & 0xffffffff80000000L) == 0xffffffff80000000L) \
-	     || ((INTVAL (X) & 0xffffffff00000000L) == 0x0000000000000000L))) \
-   && !function_label_operand (X, VOIDmode))
-#else
-#define LEGITIMATE_CONSTANT_P(X)  		\
-  ((GET_MODE_CLASS (GET_MODE (X)) != MODE_FLOAT	\
-    || (X) == CONST0_RTX (GET_MODE (X)))	\
-   && (GET_CODE (X) != LABEL_REF || TARGET_GAS)\
-   && !(TARGET_64BIT && GET_CODE (X) == CONST_DOUBLE) \
-   && !(TARGET_64BIT && GET_CODE (X) == CONST_INT \
-	&& !(cint_ok_for_move (INTVAL (X))	\
-	     || ((INTVAL (X) & 0xffffffff80000000L) == 0xffffffff80000000L) \
-	     || ((INTVAL (X) & 0xffffffff00000000L) == 0x0000000000000000L))) \
-   && !function_label_operand (X, VOIDmode))
+#ifndef NEW_HP_ASSEMBLER
+#define NEW_HP_ASSEMBLER 0
 #endif
+#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			\
+	     || (INTVAL (X) >= (HOST_WIDE_INT) -1 << 31		\
+		 && INTVAL (X) < (HOST_WIDE_INT) 1 << 32)	\
+	     || cint_ok_for_move (INTVAL (X))))			\
+   && !function_label_operand (X, VOIDmode))
 
 /* Subroutine for EXTRA_CONSTRAINT.
 
-- 
GitLab