Commit af2e10ee by Georg-Johann Lay

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
parent db7f5754
2012-10-04 Georg-Johann Lay <avr@gjlay.de>
* config/avr/predicates.md (flash_operand): New predicate.
* config/avr/avr.md (reload_in<mode>): Use it in operand 1 instead
of memory_operand.
2012-10-04 Tobias Burnus <burnus@net-b.de> 2012-10-04 Tobias Burnus <burnus@net-b.de>
* gcc.c (record_temp_file, add_sysrooted_prefix, process_command, * gcc.c (record_temp_file, add_sysrooted_prefix, process_command,
......
...@@ -395,7 +395,7 @@ ...@@ -395,7 +395,7 @@
;; Secondary input reload from non-generic 16-bit address spaces ;; Secondary input reload from non-generic 16-bit address spaces
(define_insn "reload_in<mode>" (define_insn "reload_in<mode>"
[(set (match_operand:MOVMODE 0 "register_operand" "=r") [(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"))] (clobber (match_operand:QI 2 "d_register_operand" "=d"))]
;; Fixme: The insn condition must not test the address space. ;; Fixme: The insn condition must not test the address space.
;; Because the gen tools refuse to generate insns for address spaces ;; Because the gen tools refuse to generate insns for address spaces
......
...@@ -72,6 +72,13 @@ ...@@ -72,6 +72,13 @@
(not (match_test "avr_load_libgcc_p (op)")) (not (match_test "avr_load_libgcc_p (op)"))
(not (match_test "avr_mem_memx_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. ;; Return 1 if OP is the zero constant for MODE.
(define_predicate "const0_operand" (define_predicate "const0_operand"
(and (match_code "const_int,const_fixed,const_double") (and (match_code "const_int,const_fixed,const_double")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment