diff mbox

Fix non-biarch sorry diagnostics on unsupported -m64 or -m32 (PR target/60610)

Message ID 20140321203813.GX1817@tucnak.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek March 21, 2014, 8:38 p.m. UTC
Hi!

Prior to r203634 we were comparing TARGET_64BIT with
ix86_isa_flags & OPTION_MASK_ISA_64BIT, which is the same thing for
TARGET_BI_ARCH, otherwise the former is hardcoded constant.
But with r203634, the condition was changed and is now always false
and so e.g. for 32-bit non-multilib i?86 gcc we don't complain about
lack of -m64 support anymore, instead just ICE later on.

Fixed by making TARGET_64BIT_P that the new condition tests also
constant for !TARGET_BI_ARCH.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2014-03-21  Jakub Jelinek  <jakub@redhat.com>

	PR target/60610
	* config/i386/i386.h (TARGET_64BIT_P): If not TARGET_BI_ARCH,
	redefine to 1 or 0.
	* config/i386/darwin.h (TARGET_64BIT_P): Redefine to
	TARGET_ISA_64BIT_P(x).


	Jakub

Comments

Richard Henderson March 21, 2014, 9:20 p.m. UTC | #1
On 03/21/2014 01:38 PM, Jakub Jelinek wrote:
> 	PR target/60610
> 	* config/i386/i386.h (TARGET_64BIT_P): If not TARGET_BI_ARCH,
> 	redefine to 1 or 0.
> 	* config/i386/darwin.h (TARGET_64BIT_P): Redefine to
> 	TARGET_ISA_64BIT_P(x).

Ok.


r~
diff mbox

Patch

--- gcc/config/i386/i386.h.jj	2014-03-18 10:04:14.000000000 +0100
+++ gcc/config/i386/i386.h	2014-03-21 17:50:22.465016379 +0100
@@ -284,10 +284,13 @@  extern const struct processor_costs ix86
 #else
 #ifndef TARGET_BI_ARCH
 #undef TARGET_64BIT
+#undef TARGET_64BIT_P
 #if TARGET_64BIT_DEFAULT
 #define TARGET_64BIT 1
+#define TARGET_64BIT_P(x) 1
 #else
 #define TARGET_64BIT 0
+#define TARGET_64BIT_P(x) 0
 #endif
 #endif
 #endif
--- gcc/config/i386/darwin.h.jj	2014-01-03 11:41:06.000000000 +0100
+++ gcc/config/i386/darwin.h	2014-03-21 17:51:56.492536202 +0100
@@ -26,7 +26,9 @@  along with GCC; see the file COPYING3.
 #define DARWIN_X86 1
 
 #undef  TARGET_64BIT
+#undef	TARGET_64BIT_P
 #define TARGET_64BIT TARGET_ISA_64BIT
+#define	TARGET_64BIT_P(x) TARGET_ISA_64BIT_P(x)
 
 #ifdef IN_LIBGCC2
 #undef TARGET_64BIT