diff mbox

[SPARC] Fix PR target/69100

Message ID 1774915.RRaPsD4mIS@polaris
State New
Headers show

Commit Message

Eric Botcazou Jan. 4, 2016, 8:14 a.m. UTC
This fixes another ICE on SPARC 64-bit in a corner case where __builtin_apply 
is compiled with -mno-fpu/-msoft-float.

Tested (incl. binary compatibility) on SPARC/Solaris, applied on the mainline.


2016-01-04  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/69100
	* config/sparc/sparc.h (FUNCTION_ARG_REGNO_P): Return true in 64-bit
	mode for %f0-%f31 only if TARGET_FPU.


2016-01-04  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.target/sparc/20160104-2.c: New test.
diff mbox

Patch

Index: config/sparc/sparc.h
===================================================================
--- config/sparc/sparc.h	(revision 231971)
+++ config/sparc/sparc.h	(working copy)
@@ -1176,9 +1176,8 @@  extern char leaf_reg_remap[];
    On SPARC, these are the "output" registers.  v9 also uses %f0-%f31.  */
 
 #define FUNCTION_ARG_REGNO_P(N) \
-(TARGET_ARCH64 \
- ? (((N) >= 8 && (N) <= 13) || ((N) >= 32 && (N) <= 63)) \
- : ((N) >= 8 && (N) <= 13))
+  (((N) >= 8 && (N) <= 13)	\
+   || (TARGET_ARCH64 && TARGET_FPU && (N) >= 32 && (N) <= 63))
 
 /* Define a data type for recording info about an argument list
    during the scan of that argument list.  This data type should