From b8f4a5f92626ced3a03711ee9c73c428cdbd6f6f Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Mon, 4 Jan 2016 08:14:12 +0000 Subject: [PATCH] PR target/69100 * config/sparc/sparc.h (FUNCTION_ARG_REGNO_P): Return true in 64-bit mode for %f0-%f31 only if TARGET_FPU. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232050 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/sparc/sparc.h | 5 ++--- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.target/sparc/20160104-2.c | 11 +++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.target/sparc/20160104-2.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b29c22..fa7b0c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2016-01-04 Eric Botcazou + 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 + PR target/69072 * config/sparc/sparc.c (scan_record_type): Take into account subfields to compute the PACKED_P predicate. diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index ae8e962..9fa2a5a 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 148ac10..f2f9629 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2016-01-04 Eric Botcazou + * gcc.target/sparc/20160104-2.c: New test. + +2016-01-04 Eric Botcazou + * gcc.target/sparc/20160104-1.c: New test. 2016-01-03 Paul Thomas diff --git a/gcc/testsuite/gcc.target/sparc/20160104-2.c b/gcc/testsuite/gcc.target/sparc/20160104-2.c new file mode 100644 index 0000000..837161d --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/20160104-2.c @@ -0,0 +1,11 @@ +/* PR target/69100 */ +/* Reported by Zdenek Sojka */ + +/* { dg-do compile } */ +/* { dg-options "-mno-fpu" } */ + +void +foo (void) +{ + __builtin_apply (0, 0, 0); +} -- 2.7.4