Implement MOVUA.L.
SH4A has the new MOVUA.L instruction, capable of accessing non-aligned 32-bit data. This patch makes qemu handle it. To the best of my knowledge, from qemu standpoint this is just like ordinary move, no special handling for non-alignment is necessary.
- Volodya
* target-sh4/translate.c (_decode_opc): Implement MOVUA.L.
--- target-sh4/translate.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
target-sh4/translate.c +12 -0
@@ -1520,6 +1520,18 @@ void _decode_opc(DisasContext * ctx)case 0x00c3 :/* movca.l R0,@Rm */ tcg_gen_qemu_st32 (REG (0 ),REG (B11_8 ), ctx->memidx);return ; +case 0x40a9 : +/* MOVUA.L @Rm,R0 (Rm) -> R0 +Load non-boundary-aligned data */ +tcg_gen_qemu_ld32u (REG (0 ),REG (B11_8 ), ctx->memidx); +return ; +case 0x40e9 : +/* MOVUA.L @Rm+,R0 (Rm) -> R0, Rm + 4 -> Rm +Load non-boundary-aligned +data */ +tcg_gen_qemu_ld32u (REG (0 ),REG (B11_8 ), ctx->memidx); +tcg_gen_addi_i32 (REG (B11_8 ),REG (B11_8 ),4 ); +return ;case 0x0029 :/* movt Rn */ tcg_gen_andi_i32 (REG (B11_8 ), cpu_sr,SR_T );return ;
Signature · 1 line
1.5.3.5
Aurelien Jarno
AppliedQuoted 5 lines · Vladimir Prus
SH4A has the new MOVUA.L instruction, capable of accessing non-aligned 32-bit data. This patch makes qemu handle it. To the best of my knowledge, from qemu standpoint this is just like ordinary move, no special handling for non-alignment is necessary.
Thanks, applied.
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net