target/mips: Add emulation of nanoMIPS 16-bit shift instructions

Add emulation of nanoMIPS 16-bit shift instructions.

Backports commit c46562fb2fd41429c7acbf10dedfd5cbe0aa34fa from qemu
This commit is contained in:
Yongbok Kim 2018-08-27 04:29:53 -04:00 committed by Lioncash
parent 2bf4a1b0a8
commit 25d95b6971
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -16877,6 +16877,21 @@ static int decode_nanomips_opc(CPUMIPSState *env, DisasContext *ctx)
case NM_P16_MV:
break;
case NM_P16_SHIFT:
{
int shift = extract32(ctx->opcode, 0, 3);
uint32_t opc = 0;
shift = (shift == 0) ? 8 : shift;
switch (extract32(ctx->opcode, 3, 1)) {
case NM_SLL16:
opc = OPC_SLL;
break;
case NM_SRL16:
opc = OPC_SRL;
break;
}
gen_shift_imm(ctx, opc, rt, rs, shift);
}
break;
case NM_P16C:
break;