diff options
author | Michael Meissner <meissner@linux.vnet.ibm.com> | 2016-12-06 00:58:40 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2016-12-06 00:58:40 +0000 |
commit | 202687fb7c65fa951f7ffd39c0a4a651ab753daf (patch) | |
tree | ac82bae4921773afc10ed72797c7da5c2b762abd /gcc | |
parent | 2d170acb265d0e9e97baf7c06f3efad981077b21 (diff) | |
download | gcc-202687fb7c65fa951f7ffd39c0a4a651ab753daf.zip gcc-202687fb7c65fa951f7ffd39c0a4a651ab753daf.tar.gz gcc-202687fb7c65fa951f7ffd39c0a4a651ab753daf.tar.bz2 |
re PR target/78688 (PowerPC fails bootstrap)
2016-12-05 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/78688
* config/rs6000/rs6000.h (FUNCTION_VALUE_REGNO_P): Use IN_RANGE
instead of ((N) >= (X) && (N) <= (Y-X)) to silence warnings about
comparing signed to unsigned values.
(FUNCTION_ARG_REGNO_P): Likewise.
From-SVN: r243278
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index beef921..672b604 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-12-05 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/78688 + * config/rs6000/rs6000.h (FUNCTION_VALUE_REGNO_P): Use IN_RANGE + instead of ((N) >= (X) && (N) <= (Y-X)) to silence warnings about + comparing signed to unsigned values. + (FUNCTION_ARG_REGNO_P): Likewise. + 2016-12-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Stefan Freudenberger <stefan@reservoir.com> diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index d1e36d9..5d56927 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1866,19 +1866,19 @@ extern enum reg_class rs6000_constraints[RS6000_CONSTRAINT_MAX]; On RS/6000, this is r3, fp1, and v2 (for AltiVec). */ #define FUNCTION_VALUE_REGNO_P(N) \ ((N) == GP_ARG_RETURN \ - || ((N) >= FP_ARG_RETURN && (N) <= FP_ARG_MAX_RETURN \ + || (IN_RANGE ((N), FP_ARG_RETURN, FP_ARG_MAX_RETURN) \ && TARGET_HARD_FLOAT && TARGET_FPRS) \ - || ((N) >= ALTIVEC_ARG_RETURN && (N) <= ALTIVEC_ARG_MAX_RETURN \ + || (IN_RANGE ((N), ALTIVEC_ARG_RETURN, ALTIVEC_ARG_MAX_RETURN) \ && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI)) /* 1 if N is a possible register number for function argument passing. On RS/6000, these are r3-r10 and fp1-fp13. On AltiVec, v2 - v13 are used for passing vectors. */ #define FUNCTION_ARG_REGNO_P(N) \ - ((unsigned) (N) - GP_ARG_MIN_REG < GP_ARG_NUM_REG \ - || ((unsigned) (N) - ALTIVEC_ARG_MIN_REG < ALTIVEC_ARG_NUM_REG \ + (IN_RANGE ((N), GP_ARG_MIN_REG, GP_ARG_MAX_REG) \ + || (IN_RANGE ((N), ALTIVEC_ARG_MIN_REG, ALTIVEC_ARG_MAX_REG) \ && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI) \ - || ((unsigned) (N) - FP_ARG_MIN_REG < FP_ARG_NUM_REG \ + || (IN_RANGE ((N), FP_ARG_MIN_REG, FP_ARG_MAX_REG) \ && TARGET_HARD_FLOAT && TARGET_FPRS)) /* Define a data type for recording info about an argument list |