aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr
diff options
context:
space:
mode:
authorGeorg-Johann Lay <gjl@gcc.gnu.org>2012-10-04 17:02:27 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2012-10-04 17:02:27 +0000
commitaf2e10ee707f0d8884e652fe8e9a9a8489fb2fa4 (patch)
tree66b8df9d95f6ae92f2f3fe5e8afa6c2a48e7c26a /gcc/config/avr
parentdb7f5754860be307762eb44ad2a175d568646121 (diff)
downloadgcc-af2e10ee707f0d8884e652fe8e9a9a8489fb2fa4.zip
gcc-af2e10ee707f0d8884e652fe8e9a9a8489fb2fa4.tar.gz
gcc-af2e10ee707f0d8884e652fe8e9a9a8489fb2fa4.tar.bz2
predicates.md (flash_operand): New predicate.
* config/avr/predicates.md (flash_operand): New predicate. * config/avr/avr.md (reload_in<mode>): Use it in operand 1 instead of memory_operand. From-SVN: r192090
Diffstat (limited to 'gcc/config/avr')
-rw-r--r--gcc/config/avr/avr.md2
-rw-r--r--gcc/config/avr/predicates.md7
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 284860e..d3ffd1a 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -395,7 +395,7 @@
;; Secondary input reload from non-generic 16-bit address spaces
(define_insn "reload_in<mode>"
[(set (match_operand:MOVMODE 0 "register_operand" "=r")
- (match_operand:MOVMODE 1 "memory_operand" "m"))
+ (match_operand:MOVMODE 1 "flash_operand" "m"))
(clobber (match_operand:QI 2 "d_register_operand" "=d"))]
;; Fixme: The insn condition must not test the address space.
;; Because the gen tools refuse to generate insns for address spaces
diff --git a/gcc/config/avr/predicates.md b/gcc/config/avr/predicates.md
index 04587ae..fc4ca03 100644
--- a/gcc/config/avr/predicates.md
+++ b/gcc/config/avr/predicates.md
@@ -72,6 +72,13 @@
(not (match_test "avr_load_libgcc_p (op)"))
(not (match_test "avr_mem_memx_p (op)"))))
+;; Return 1 if OP is a memory operand in one of the __flash* address spaces
+(define_predicate "flash_operand"
+ (and (match_operand 0 "memory_operand")
+ (match_test "Pmode == mode")
+ (ior (match_test "!MEM_P (op)")
+ (match_test "avr_mem_flash_p (op)"))))
+
;; Return 1 if OP is the zero constant for MODE.
(define_predicate "const0_operand"
(and (match_code "const_int,const_fixed,const_double")