diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-04-27 17:25:20 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-04-27 17:25:20 +0100 |
commit | 53e65d80dd8ac8b5e68fd62a7dd9f3437e1555d3 (patch) | |
tree | 70dffad8b81fd08432921cefabea4cb749b1c04d | |
parent | 3d537943fbdbaa07fdf31555e7f0d6454e4dc12a (diff) | |
download | gcc-53e65d80dd8ac8b5e68fd62a7dd9f3437e1555d3.zip gcc-53e65d80dd8ac8b5e68fd62a7dd9f3437e1555d3.tar.gz gcc-53e65d80dd8ac8b5e68fd62a7dd9f3437e1555d3.tar.bz2 |
arm: Fix an rtl checking failure in cde-errors.c
cde-errors.c and cde-mve-error-2.c were failing with an rtl checking
failure because we applied UINTVAL to a nonconstant argument
(specifically a REG).
2020-04-27 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* config/arm/arm-builtins.c (arm_expand_builtin_args): Only apply
UINTVAL to CONST_INTs.
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/arm/arm-builtins.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ecffa44..64d71d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-04-27 Richard Sandiford <richard.sandiford@arm.com> + + * config/arm/arm-builtins.c (arm_expand_builtin_args): Only apply + UINTVAL to CONST_INTs. + 2020-04-27 Srinath Parvathaneni <srinath.parvathaneni@arm.com> * config/arm/constraints.md (e): Remove constraint. diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index 16d2fb0..aee3fd6 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -3081,7 +3081,8 @@ constant_arg: { if (argc == 0) { - unsigned int cp_bit = UINTVAL (op[argc]); + unsigned int cp_bit = (CONST_INT_P (op[argc]) + ? UINTVAL (op[argc]) : -1); if (IN_RANGE (cp_bit, 0, ARM_CDE_CONST_COPROC)) error ("%Kcoprocessor %d is not enabled " "with +cdecp%d", exp, cp_bit, cp_bit); |