re PR target/29932 (avr-gcc wrongly optimizes bit sets/resets for IO register 0x20)
authorAnatoly Sokolov <aesok@post.ru>
Sun, 8 Apr 2007 10:38:38 +0000 (14:38 +0400)
committerAnatoly Sokolov <aesok@gcc.gnu.org>
Sun, 8 Apr 2007 10:38:38 +0000 (14:38 +0400)
PR target/29932
* config/avr/predicates.md (io_address_operand): Delete predicate.
(low_io_address_operand): Don't use 'mode' argument.
(higth_io_address_operand): Rename ...
(high_io_address_operand): ... to this. Don't use 'mode' argument.
* config/avr/avr.md (*sbix_branch_tmp, *sbix_branch_tmp_bit7): Adjust
for above change.

From-SVN: r123657

gcc/ChangeLog
gcc/config/avr/avr.md
gcc/config/avr/predicates.md

index 019d8fd499af2d1c87c846b9f418b1d95d9ff09d..d221bbf1c9b4fdecff9b37747ae2ad817f745803 100644 (file)
@@ -1,3 +1,13 @@
+2007-04-08  Anatoly Sokolov <aesok@post.ru>
+
+       PR target/29932
+       * config/avr/predicates.md (io_address_operand): Delete predicate.
+       (low_io_address_operand): Don't use 'mode' argument.
+       (higth_io_address_operand): Rename ...
+       (high_io_address_operand): ... to this. Don't use 'mode' argument.
+       * config/avr/avr.md (*sbix_branch_tmp, *sbix_branch_tmp_bit7): Adjust
+       for above change.
+
 2007-04-07  Daniel Berlin  <dberlin@dberlin.org>
 
        Revert change removing staticp.
index b74f1db3a19d5184b3be4f05443bb9e5853d9537..a71e76c9f56e72042fce523d83773c8496a18719 100644 (file)
        (if_then_else
         (match_operator 0 "eqne_operator"
                         [(zero_extract
-                          (mem:QI (match_operand 1 "higth_io_address_operand" "n"))
+                          (mem:QI (match_operand 1 "high_io_address_operand" "n"))
                           (const_int 1)
                           (match_operand 2 "const_int_operand" "n"))
                          (const_int 0)])
   [(set (pc)
        (if_then_else
         (match_operator 0 "gelt_operator"
-                        [(mem:QI (match_operand 1 "higth_io_address_operand" "n"))
+                        [(mem:QI (match_operand 1 "high_io_address_operand" "n"))
                          (const_int 0)])
         (label_ref (match_operand 2 "" ""))
         (pc)))]
index 291bd85bbe7890aa00a6a142cd92f6ac7d419812..914ad9bd47bed2eec900b3936a7a7b23d91a9eb3 100755 (executable)
   (and (match_code "reg")
        (match_test "REGNO (op) == REG_SP")))
 
-;; Return true if OP is a valid address for an I/O register.
-(define_predicate "io_address_operand"
-  (and (match_code "const_int")
-       (match_test "INTVAL (op) >= 0x20 
-                    && INTVAL (op) <= 0x60 - GET_MODE_SIZE (mode)")))
-
 ;; Return true if OP is a valid address for lower half of I/O space.
 (define_predicate "low_io_address_operand"
   (and (match_code "const_int")
-       (match_test "INTVAL (op) >= 0x20 
-                    && INTVAL (op) <= 0x40 - GET_MODE_SIZE (mode)")))
-       
-;; Return true if OP is a valid address for higth half of I/O space.
-(define_predicate "higth_io_address_operand"
+       (match_test "IN_RANGE((INTVAL (op)), 0x20, 0x3F)")))
+
+;; Return true if OP is a valid address for high half of I/O space.
+(define_predicate "high_io_address_operand"
   (and (match_code "const_int")
-       (match_test "INTVAL (op) >= 0x40 
-                    && INTVAL (op) <= 0x60 - GET_MODE_SIZE (mode)")))
+       (match_test "IN_RANGE((INTVAL (op)), 0x40, 0x5F)")))
 
 ;; Return 1 if OP is the zero constant for MODE.
 (define_predicate "const0_operand"