Skip to content

Commit 7e371ad

Browse files
clazissartemiy-volkov
authored andcommitted
fix splitting 64 bit constants
1 parent 0811a63 commit 7e371ad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gcc/config/arc64/arc64.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ arc64_prepare_move_operands (rtx op0, rtx op1, machine_mode mode)
11641164

11651165
HOST_WIDE_INT val = INTVAL (op1);
11661166
unsigned HOST_WIDE_INT lo = sext_hwi (val, 32);
1167-
unsigned HOST_WIDE_INT hi = sext_hwi ((val - lo) >> 32, 32);
1167+
unsigned HOST_WIDE_INT hi = sext_hwi (val >> 32, 32);
11681168
rtx tmp = op0;
11691169

11701170
if (can_create_pseudo_p ())
@@ -1175,7 +1175,9 @@ arc64_prepare_move_operands (rtx op0, rtx op1, machine_mode mode)
11751175
emit_insn (gen_rtx_SET (tmp,
11761176
gen_rtx_ASHIFT (DImode, GEN_INT (hi),
11771177
GEN_INT (32))));
1178-
emit_insn (gen_iordi3 (op0, tmp, GEN_INT (lo)));
1178+
emit_insn (gen_rtx_SET (op0,
1179+
gen_rtx_LO_SUM (mode, tmp,
1180+
GEN_INT (lo))));
11791181
return true;
11801182
}
11811183
break;

0 commit comments

Comments
 (0)