diff options
author | DJ Delorie <dj@redhat.com> | 2014-08-14 22:48:03 -0400 |
---|---|---|
committer | DJ Delorie <dj@gcc.gnu.org> | 2014-08-14 22:48:03 -0400 |
commit | 7d73b2cb23715236b621e8aa50a4e09934a25543 (patch) | |
tree | 5f9fe7525d2aad0c092eb67356f26d5a14cd01cb /gcc | |
parent | 3230c614e7d67dee0eb5e20bb6c88bbe8393bb3e (diff) | |
download | gcc-7d73b2cb23715236b621e8aa50a4e09934a25543.zip gcc-7d73b2cb23715236b621e8aa50a4e09934a25543.tar.gz gcc-7d73b2cb23715236b621e8aa50a4e09934a25543.tar.bz2 |
predicates.md (rl78_near_mem_operand): New.
* config/rl78/predicates.md (rl78_near_mem_operand): New.
* config/rl78/rl78-virt.md (movqi_virt_mm, movqi_virt)
(movhi_virt_mm): Split out near mem-mem moves to avoid problems
with far-far moves.
From-SVN: r213998
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rl78/predicates.md | 5 | ||||
-rw-r--r-- | gcc/config/rl78/rl78-virt.md | 18 |
3 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1b1733..8b3a4bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -11,6 +11,11 @@ 2014-08-14 DJ Delorie <dj@redhat.com> + * config/rl78/predicates.md (rl78_near_mem_operand): New. + * config/rl78/rl78-virt.md (movqi_virt_mm, movqi_virt) + (movhi_virt_mm): Split out near mem-mem moves to avoid problems + with far-far moves. + * config/rl78/rl78-expand.md (umulqihi3): Disable for G10. * config/rl78/rl78-virt.md (umulhi3_shift_virt): Likewise. (umulqihi3_virt): Likewise. diff --git a/gcc/config/rl78/predicates.md b/gcc/config/rl78/predicates.md index e564f43..f94f124 100644 --- a/gcc/config/rl78/predicates.md +++ b/gcc/config/rl78/predicates.md @@ -33,6 +33,11 @@ (not (match_test "rl78_far_p (op)"))) ) +(define_predicate "rl78_near_mem_operand" + (and (match_code "mem") + (match_test "!rl78_far_p (op) && rl78_as_legitimate_address (VOIDmode, XEXP (op, 0), true, ADDR_SPACE_GENERIC)")) +) + (define_predicate "ubyte_operand" (and (match_code "const_int") (match_test "IN_RANGE (INTVAL (op), 0, 255)"))) diff --git a/gcc/config/rl78/rl78-virt.md b/gcc/config/rl78/rl78-virt.md index 39488af..07e5715 100644 --- a/gcc/config/rl78/rl78-virt.md +++ b/gcc/config/rl78/rl78-virt.md @@ -33,14 +33,30 @@ ;;---------- Moving ------------------------ +(define_insn "*movqi_virt_mm" + [(set (match_operand:QI 0 "rl78_near_mem_operand" "=Y") + (match_operand 1 "rl78_near_mem_operand" "Y"))] + "rl78_virt_insns_ok ()" + "v.mov %0, %1" + [(set_attr "valloc" "op1")] +) + (define_insn "*movqi_virt" [(set (match_operand:QI 0 "nonimmediate_operand" "=vY,v,Wfr") - (match_operand 1 "general_operand" "vInt8JY,Wfr,vInt8J"))] + (match_operand 1 "general_operand" "vInt8J,YWfr,vInt8J"))] "rl78_virt_insns_ok ()" "v.mov %0, %1" [(set_attr "valloc" "op1")] ) +(define_insn "*movhi_virt_mm" + [(set (match_operand:HI 0 "rl78_near_mem_operand" "=Y") + (match_operand:HI 1 "rl78_near_mem_operand" "Y"))] + "rl78_virt_insns_ok ()" + "v.movw %0, %1" + [(set_attr "valloc" "op1")] +) + (define_insn "*movhi_virt" [(set (match_operand:HI 0 "nonimmediate_operand" "=vS, Y, v, Wfr") (match_operand:HI 1 "general_operand" "viYS, viS, Wfr, vi"))] |