提交 035b2398 编写于 作者: R Richard Henderson

tcg-sparc: Fix small 32-bit movi

We tested imm13 before discarding garbage high bits.
Signed-off-by: NRichard Henderson <rth@twiddle.net>
上级 35e2da15
......@@ -432,6 +432,11 @@ static void tcg_out_movi(TCGContext *s, TCGType type,
{
tcg_target_long hi, lo = (int32_t)arg;
/* Make sure we test 32-bit constants for imm13 properly. */
if (type == TCG_TYPE_I32) {
arg = lo;
}
/* A 13-bit constant sign-extended to 64-bits. */
if (check_fit_tl(arg, 13)) {
tcg_out_movi_imm13(s, ret, arg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册