Skip to content

Commit 8292319

Browse files
Claudiu Zissulescuartemiy-volkov
authored andcommitted
arc64: DIV/REM force to reg 64b immediates
1 parent 40e5324 commit 8292319

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gcc/config/arc64/arith.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,14 @@
393393
(DIVREM:GPI (match_operand:GPI 1 "nonmemory_operand")
394394
(match_operand:GPI 2 "nonmemory_operand")))]
395395
"TARGET_ARC64_DIVREM"
396-
""
396+
{
397+
if (<MODE>mode == DImode
398+
&& !register_operand (operands[2], DImode))
399+
operands[2] = force_reg (DImode, operands[2]);
400+
if (<MODE>mode == DImode
401+
&& !register_operand (operands[1], DImode))
402+
operands[1] = force_reg (DImode, operands[1]);
403+
}
397404
)
398405

399406
(define_insn "*<optab><mode>3"

0 commit comments

Comments
 (0)