From ef7655568b90129d909739a562186288e308de18 Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Wed, 4 Oct 2023 16:39:28 +0900 Subject: [PATCH] hv_vm: Implement scalar LDNP instructions Signed-off-by: Asahi Lina --- src/hv_vm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hv_vm.c b/src/hv_vm.c index f979633a..58a9a86f 100644 --- a/src/hv_vm.c +++ b/src/hv_vm.c @@ -571,16 +571,16 @@ static bool emulate_load(struct exc_info *ctx, u32 insn, u64 *val, u64 *width, u regs[Rt] = (s64)EXT(*val, (8 << *width)); if (insn & (1 << 22)) regs[Rt] &= 0xffffffff; - } else if ((insn & 0xffc00000) == 0x29400000) { - // LDP (Signed offset, 32-bit) + } else if ((insn & 0xfec00000) == 0x28400000) { + // LD[N]P (Signed offset, 32-bit) *width = 3; *vaddr = regs[Rn] + (imm7 * 4); DECODE_OK; u64 Rt2 = (insn >> 10) & 0x1f; regs[Rt] = val[0] & 0xffffffff; regs[Rt2] = val[0] >> 32; - } else if ((insn & 0xffc00000) == 0xa9400000) { - // LDP (Signed offset, 64-bit) + } else if ((insn & 0xfec00000) == 0xa8400000) { + // LD[N]P (Signed offset, 64-bit) *width = 4; *vaddr = regs[Rn] + (imm7 * 8); DECODE_OK;