Skip to content

Commit

Permalink
Allow movz to work properly when targeting memory
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed Feb 24, 2024
1 parent 7777dfd commit b7b8099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,13 +679,13 @@ static void vm_target8(vm_t *vm, uint8_t prtype, uint8_t value, uint8_t offset)
VM_TARGET_BODY(vm_write8, (*vm_findlocal(vm, local) & 0xFFFFFF00) | (uint32_t) value, offset)
}
static void vm_target8_zero(vm_t *vm, uint8_t prtype, uint8_t value, uint8_t offset) {
VM_TARGET_BODY(vm_write8, (uint32_t) value, offset)
VM_TARGET_BODY(vm_write32, (uint32_t) value, offset)
}
static void vm_target16(vm_t *vm, uint8_t prtype, uint16_t value, uint8_t offset) {
VM_TARGET_BODY(vm_write16, (*vm_findlocal(vm, local) & 0xFFFF0000) | (uint32_t) value, offset)
}
static void vm_target16_zero(vm_t *vm, uint8_t prtype, uint16_t value, uint8_t offset) {
VM_TARGET_BODY(vm_write16, (uint32_t) value, offset)
VM_TARGET_BODY(vm_write32, (uint32_t) value, offset)
}
static void vm_target32(vm_t *vm, uint8_t prtype, uint32_t value, uint8_t offset) {
VM_TARGET_BODY(vm_write32, value, offset)
Expand Down

0 comments on commit b7b8099

Please sign in to comment.