]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(CONST_OK_FOR_LETTER_P): Only allow constants valid when inverted for 'K'.
authorRichard Earnshaw <erich@gnu.org>
Fri, 3 Jun 1994 13:17:55 +0000 (13:17 +0000)
committerRichard Earnshaw <erich@gnu.org>
Fri, 3 Jun 1994 13:17:55 +0000 (13:17 +0000)
Only allow constants valid when negated for 'L'.

From-SVN: r7435

gcc/config/arm/arm.h

index 6a76fa366310087a2059ee2847e715034dd55530..3163cd9e2015f88f7839e0f9f10159ad6a67a508 100644 (file)
@@ -486,13 +486,13 @@ enum reg_class
    Return 1 if VALUE is in the range specified by C.
        I: immediate arithmetic operand (i.e. 8 bits shifted as required).
        J: valid indexing constants.  
-       K: as I but also (not (value)) ok.
-       L: as I but also (neg (value)) ok.*/
-#define CONST_OK_FOR_LETTER_P(VALUE, C)                                      \
-  ((C) == 'I' ? const_ok_for_arm (VALUE) :                                   \
-   (C) == 'J' ? ((VALUE) < 4096 && (VALUE) > -4096) :                        \
-   (C) == 'K' ? (const_ok_for_arm (VALUE) || const_ok_for_arm (~(VALUE))) :   \
-   (C) == 'L' ? (const_ok_for_arm (VALUE) || const_ok_for_arm (-(VALUE))) : 0)
+       K: ~value ok in rhs argument of data operand.
+       L: -value ok in rhs argument of data operand. */
+#define CONST_OK_FOR_LETTER_P(VALUE, C)                \
+  ((C) == 'I' ? const_ok_for_arm (VALUE) :             \
+   (C) == 'J' ? ((VALUE) < 4096 && (VALUE) > -4096) :  \
+   (C) == 'K' ? (const_ok_for_arm (~(VALUE))) :                \
+   (C) == 'L' ? (const_ok_for_arm (-(VALUE))) : 0)
 
 /* For the ARM, `Q' means that this is a memory operand that is just
    an offset from a register.