Skip to content

Commit 0a8afe7

Browse files
clazissartemiy-volkov
authored andcommitted
Handle 64bit constants for CMP instructions
1 parent 7e371ad commit 0a8afe7

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

gcc/config/arc64/arc64.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,10 +802,20 @@ unknown, xor, xorl"
802802
;; Comparison insns
803803
;; -------------------------------------------------------------------
804804

805-
(define_insn "cmp<mode>"
805+
(define_expand "cmp<mode>"
806806
[(set (reg:CC CC_REGNUM)
807-
(compare:CC (match_operand:GPI 0 "nonmemory_operand" "r, r, r,U06S0,S12S0,i,r")
808-
(match_operand:GPI 1 "nonmemory_operand" "r,U06S0,S12S0, r, r,r,i")))]
807+
(compare:CC (match_operand:GPI 0 "register_operand" "")
808+
(match_operand:GPI 1 "nonmemory_operand" "")))]
809+
""
810+
{
811+
if (!register_operand (operands[2], DImode))
812+
operands[2] = force_reg (DImode, operands[2]);
813+
})
814+
815+
(define_insn "*cmp<mode>"
816+
[(set (reg:CC CC_REGNUM)
817+
(compare:CC (match_operand:GPI 0 "nonmemory_operand" "r, r, r,U06S0,S12S0,S32S0,r")
818+
(match_operand:GPI 1 "nonmemory_operand" "r,U06S0,S12S0, r, r, r,S32S0")))]
809819
"register_operand (operands[0], <MODE>mode)
810820
|| register_operand (operands[1], <MODE>mode)"
811821
"@

0 commit comments

Comments
 (0)