[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 21/80] target/mips: Add emulation of nanoMIPS 16-
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PATCH v7 21/80] target/mips: Add emulation of nanoMIPS 16-bit shift instructions |
Date: |
Mon, 6 Aug 2018 18:59:48 +0200 |
From: Yongbok Kim <address@hidden>
Add emulation of nanoMIPS 16-bit shift instructions.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Yongbok Kim <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Signed-off-by: Stefan Markovic <address@hidden>
---
target/mips/translate.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index 6a7c31e..c4f1224 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -16615,6 +16615,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;
--
2.7.4
- Re: [Qemu-devel] [PATCH v7 11/80] elf: Add ELF flags for MIPS machine variants, (continued)
- [Qemu-devel] [PATCH v7 12/80] linux-user: Update MIPS syscall numbers up to kernel 4.18 headers, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 13/80] linux-user: Add preprocessor availability control to some syscalls, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 14/80] target/mips: Add preprocessor constants for nanoMIPS, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 15/80] target/mips: Add nanoMIPS base instruction set opcodes, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 16/80] target/mips: Add nanoMIPS DSP ASE opcodes, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 17/80] target/mips: Add placeholder and invocation of decode_nanomips_opc(), Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 18/80] target/mips: Add nanoMIPS decoding and extraction utilities, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 19/80] target/mips: Add emulation of nanoMIPS 16-bit arithmetic instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 20/80] target/mips: Add emulation of nanoMIPS 16-bit branch instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 21/80] target/mips: Add emulation of nanoMIPS 16-bit shift instructions,
Aleksandar Markovic <=
- [Qemu-devel] [PATCH v7 22/80] target/mips: Add emulation of nanoMIPS 16-bit misc instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 23/80] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 24/80] target/mips: Add emulation of nanoMIPS 16-bit logic instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 25/80] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 26/80] target/mips: Add emulation of some common nanoMIPS 32-bit instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 27/80] target/mips: Add emulation of nanoMIPS instructions MOVE.P and MOVE.PREV, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 28/80] target/mips: Add emulation of nanoMIPS 48-bit instructions, Aleksandar Markovic, 2018/08/06
- [Qemu-devel] [PATCH v7 29/80] target/mips: Add emulation of nanoMIPS FP instructions, Aleksandar Markovic, 2018/08/06