arm: Fix the "c" constraint
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 14 Nov 2019 13:44:05 +0000 (13:44 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 14 Nov 2019 13:44:05 +0000 (05:44 -0800)
The existing definition using register class CC_REG does not
work because CC_REGNUM does not support normal modes, and so
fails to match register_operand.  Use a non-register constraint
and the cc_register predicate instead.

        * config/arm/constraints.md (c): Use cc_register predicate.

From-SVN: r278224

gcc/ChangeLog
gcc/config/arm/constraints.md

index ea547f7cf40748aea7e82eaf3c4df6e2bd04eb00..85fa8924c57bdefe09291768774c549b8aa52c56 100644 (file)
@@ -1,5 +1,7 @@
 2019-11-14  Richard Henderson  <richard.henderson@linaro.org>
 
+       * config/arm/constraints.md (c): Use cc_register predicate.
+
        * config/aarch64/constraints.md (c): New constraint.
 
 2019-11-14  Jan Hubicka  <hubicka@ucw.cz>
index b76de81b85c8ce7a2ca484a750b908b7ca64600a..e02b678d26d01aba80bef52e5e78e749b6fbb6e7 100644 (file)
@@ -94,8 +94,9 @@
  "@internal
   Thumb only.  The union of the low registers and the stack register.")
 
-(define_register_constraint "c" "CC_REG"
- "@internal The condition code register.")
+(define_constraint "c"
+ "@internal The condition code register."
+ (match_operand 0 "cc_register"))
 
 (define_register_constraint "Cs" "CALLER_SAVE_REGS"
  "@internal The caller save registers.  Useful for sibcalls.")