aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2007-04-08 14:38:38 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2007-04-08 14:38:38 +0400
commitd8a1f0fb6410959cdba82bfc82e0d37bf102fe98 (patch)
treeaa38b487c8fc15a410916a04e0923acbcc88d381 /gcc
parent92447572b4c59ce6349d01a73032622ba37ff7ac (diff)
downloadgcc-d8a1f0fb6410959cdba82bfc82e0d37bf102fe98.zip
gcc-d8a1f0fb6410959cdba82bfc82e0d37bf102fe98.tar.gz
gcc-d8a1f0fb6410959cdba82bfc82e0d37bf102fe98.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/avr/avr.md4
-rwxr-xr-xgcc/config/avr/predicates.md18
3 files changed, 17 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 019d8fd..d221bbf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index b74f1db..a71e76c 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 291bd85..914ad9b 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"