Skip to content

Commit 2f2ae50

Browse files
clazissartemiy-volkov
authored andcommitted
More on handling 64bit constants
1 parent c9d13d3 commit 2f2ae50

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

gcc/config/arc64/arc64.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,10 @@ unknown, xor, xorl"
906906
(LOGIC:GPI (match_operand:GPI 1 "register_operand")
907907
(match_operand:GPI 2 "nonmemory_operand")))]
908908
""
909-
)
909+
{
910+
if (!register_operand (operands[2], <MODE>mode))
911+
operands[2] = force_reg (<MODE>mode, operands[2]);
912+
})
910913

911914
(define_expand "<optab><mode>2"
912915
[(set (match_operand:GPI 0 "register_operand")

gcc/config/arc64/constraints.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
"@internal
9090
Special constant/symbol which fits in limm field."
9191
(and (match_code "const_int")
92-
(match_test "SIGNED_INT32 (ival)")))
92+
(ior (match_test "UNSIGNED_INT32 (ival)")
93+
(match_test "SIGNED_INT32 (ival)"))))
9394

9495
(define_constraint "U32S0"
9596
"@internal

gcc/config/arc64/predicates.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
(define_predicate "arc64_nonmem_operand"
3131
(ior (match_operand 0 "register_operand")
3232
(and (match_code "const_int")
33-
(match_test "SIGNED_INT32 (INTVAL (op))"))))
33+
(ior (match_test "UNSIGNED_INT32 (INTVAL (op))")
34+
(match_test "SIGNED_INT32 (INTVAL (op))")))))
3435

3536
;; Acceptable arguments for the call insn.
3637
(define_predicate "arc64_call_insn_operand"

0 commit comments

Comments
 (0)