From d8a1f0fb6410959cdba82bfc82e0d37bf102fe98 Mon Sep 17 00:00:00 2001 From: Anatoly Sokolov Date: Sun, 8 Apr 2007 14:38:38 +0400 Subject: [PATCH] re PR target/29932 (avr-gcc wrongly optimizes bit sets/resets for IO register 0x20) 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 | 10 ++++++++++ gcc/config/avr/avr.md | 4 ++-- gcc/config/avr/predicates.md | 18 +++++------------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 019d8fd499a..d221bbf1c9b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2007-04-08 Anatoly Sokolov + + 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 Revert change removing staticp. diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index b74f1db3a19..a71e76c9f56 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -2392,7 +2392,7 @@ (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)]) @@ -2413,7 +2413,7 @@ [(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)))] diff --git a/gcc/config/avr/predicates.md b/gcc/config/avr/predicates.md index 291bd85bbe7..914ad9bd47b 100755 --- a/gcc/config/avr/predicates.md +++ b/gcc/config/avr/predicates.md @@ -43,23 +43,15 @@ (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" -- 2.30.2