Skip to content

Commit 3ee14bb

Browse files
Claudiu Zissulescuartemiy-volkov
authored andcommitted
arc64: Allow store instructions to store an imm.
1 parent d19c902 commit 3ee14bb

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

gcc/config/arc64/arc64.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,9 @@ vfins, vfsub, vfmul, vfdiv, vfrep, vpack, xbfu, xor, xorl"
594594
"register_operand (operands[0], HImode)
595595
|| register_operand (operands[1], HImode)
596596
|| (satisfies_constraint_S06S0 (operands[1])
597-
&& memory_operand (operands[0], HImode))"
597+
&& memory_operand (operands[0], HImode))
598+
|| (CONST_INT_P (operands[1])
599+
&& satisfies_constraint_Ucnst (operands[0]))"
598600
"@
599601
mov_s\\t%0,%1
600602
mov\\t%0,%1
@@ -620,7 +622,9 @@ vfins, vfsub, vfmul, vfdiv, vfrep, vpack, xbfu, xor, xorl"
620622
"register_operand (operands[0], SImode)
621623
|| register_operand (operands[1], SImode)
622624
|| (satisfies_constraint_S06S0 (operands[1])
623-
&& memory_operand (operands[0], SImode))"
625+
&& memory_operand (operands[0], SImode))
626+
|| (CONST_INT_P (operands[1])
627+
&& satisfies_constraint_Ucnst (operands[0]))"
624628
"@
625629
mov_s\\t%0,%1
626630
mov\\t%0,%1
@@ -731,21 +735,24 @@ vfins, vfsub, vfmul, vfdiv, vfrep, vpack, xbfu, xor, xorl"
731735
;; Long insns: movl, stl, ldl
732736
;;
733737
(define_insn "*arc64_movdi"
734-
[(set (match_operand:DI 0 "arc64_dest_operand" "=qh, q,r, r, r, r,r, m")
735-
(match_operand:DI 1 "arc64_movl_operand" "qh,U08S0,r,S12S0,S32S0SymMV,SyPic,m, r"))]
738+
[(set (match_operand:DI 0 "arc64_dest_operand" "=qh, q,r, r, r, r,Ucnst,r, m")
739+
(match_operand:DI 1 "arc64_movl_operand" "qh,U08S0,r,S12S0,S32S0SymMV,SyPic,S32S0,m, r"))]
736740
"register_operand (operands[0], DImode)
737-
|| register_operand (operands[1], DImode)"
741+
|| register_operand (operands[1], DImode)
742+
|| (CONST_INT_P (operands[1])
743+
&& satisfies_constraint_Ucnst (operands[0]))"
738744
"@
739745
movl_s\\t%0,%1
740746
movl_s\\t%0,%1
741747
movl\\t%0,%1
742748
movl\\t%0,%1
743749
movl\\t%0,%1
744750
addl\\t%0,pcl,%1
751+
stl%U0\\t%1,%0
745752
ldl%U1\\t%0,%1
746753
stl%U0\\t%1,%0"
747-
[(set_attr "type" "move,move,move,move,move,addl,ld,st")
748-
(set_attr "length" "2,2,4,4,8,8,*,*")]
754+
[(set_attr "type" "move,move,move,move,move,addl,st,ld,st")
755+
(set_attr "length" "2,2,4,4,8,8,*,*,*")]
749756
)
750757

751758
;; Hi/Low moves for constant and symbol loading.

0 commit comments

Comments
 (0)