提交 218fd730 编写于 作者: A Aurelien Jarno

target-sh4: use deposit in swap.b instruction

Reviewed-by: NRichard Henderson <rth@twiddle.net>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 7f6bdc43
...@@ -612,15 +612,11 @@ static void _decode_opc(DisasContext * ctx) ...@@ -612,15 +612,11 @@ static void _decode_opc(DisasContext * ctx)
return; return;
case 0x6008: /* swap.b Rm,Rn */ case 0x6008: /* swap.b Rm,Rn */
{ {
TCGv high, low; TCGv low = tcg_temp_new();;
high = tcg_temp_new();
tcg_gen_andi_i32(high, REG(B7_4), 0xffff0000);
low = tcg_temp_new();
tcg_gen_ext16u_i32(low, REG(B7_4)); tcg_gen_ext16u_i32(low, REG(B7_4));
tcg_gen_bswap16_i32(low, low); tcg_gen_bswap16_i32(low, low);
tcg_gen_or_i32(REG(B11_8), high, low); tcg_gen_deposit_i32(REG(B11_8), REG(B7_4), low, 0, 16);
tcg_temp_free(low); tcg_temp_free(low);
tcg_temp_free(high);
} }
return; return;
case 0x6009: /* swap.w Rm,Rn */ case 0x6009: /* swap.w Rm,Rn */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册