From 202687fb7c65fa951f7ffd39c0a4a651ab753daf Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Tue, 6 Dec 2016 00:58:40 +0000 Subject: [PATCH] re PR target/78688 (PowerPC fails bootstrap) 2016-12-05 Michael Meissner 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 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/rs6000.h | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index beef9212587..672b6040fb5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-12-05 Michael Meissner + + 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 Stefan Freudenberger diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index d1e36d96003..5d56927f6f7 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 -- 2.30.2