mirror of https://gitee.com/openkylin/qemu.git
target-sh4: use rotl/rotr when possible
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
4cd31ad264
commit
2411fde9a4
|
@ -1690,14 +1690,12 @@ static void _decode_opc(DisasContext * ctx)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 0x4004: /* rotl Rn */
|
case 0x4004: /* rotl Rn */
|
||||||
gen_copy_bit_i32(cpu_sr, 0, REG(B11_8), 31);
|
tcg_gen_rotli_i32(REG(B11_8), REG(B11_8), 1);
|
||||||
tcg_gen_shli_i32(REG(B11_8), REG(B11_8), 1);
|
gen_copy_bit_i32(cpu_sr, 0, REG(B11_8), 0);
|
||||||
gen_copy_bit_i32(REG(B11_8), 0, cpu_sr, 0);
|
|
||||||
return;
|
return;
|
||||||
case 0x4005: /* rotr Rn */
|
case 0x4005: /* rotr Rn */
|
||||||
gen_copy_bit_i32(cpu_sr, 0, REG(B11_8), 0);
|
gen_copy_bit_i32(cpu_sr, 0, REG(B11_8), 0);
|
||||||
tcg_gen_shri_i32(REG(B11_8), REG(B11_8), 1);
|
tcg_gen_rotri_i32(REG(B11_8), REG(B11_8), 1);
|
||||||
gen_copy_bit_i32(REG(B11_8), 31, cpu_sr, 0);
|
|
||||||
return;
|
return;
|
||||||
case 0x4000: /* shll Rn */
|
case 0x4000: /* shll Rn */
|
||||||
case 0x4020: /* shal Rn */
|
case 0x4020: /* shal Rn */
|
||||||
|
|
Loading…
Reference in New Issue