Skip to content

Commit 250f96b

Browse files
hoshinolinamarcan
authored andcommitted
hv_vm: Implement scalar LDNP instructions
Signed-off-by: Asahi Lina <[email protected]>
1 parent c3820a5 commit 250f96b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/hv_vm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,16 +571,16 @@ static bool emulate_load(struct exc_info *ctx, u32 insn, u64 *val, u64 *width, u
571571
regs[Rt] = (s64)EXT(*val, (8 << *width));
572572
if (insn & (1 << 22))
573573
regs[Rt] &= 0xffffffff;
574-
} else if ((insn & 0xffc00000) == 0x29400000) {
575-
// LDP (Signed offset, 32-bit)
574+
} else if ((insn & 0xfec00000) == 0x28400000) {
575+
// LD[N]P (Signed offset, 32-bit)
576576
*width = 3;
577577
*vaddr = regs[Rn] + (imm7 * 4);
578578
DECODE_OK;
579579
u64 Rt2 = (insn >> 10) & 0x1f;
580580
regs[Rt] = val[0] & 0xffffffff;
581581
regs[Rt2] = val[0] >> 32;
582-
} else if ((insn & 0xffc00000) == 0xa9400000) {
583-
// LDP (Signed offset, 64-bit)
582+
} else if ((insn & 0xfec00000) == 0xa8400000) {
583+
// LD[N]P (Signed offset, 64-bit)
584584
*width = 4;
585585
*vaddr = regs[Rn] + (imm7 * 8);
586586
DECODE_OK;

0 commit comments

Comments
 (0)