diff --git a/src/jit/assembler/block_inst.rs b/src/jit/assembler/block_inst.rs index 6b8978b..d0247ce 100644 --- a/src/jit/assembler/block_inst.rs +++ b/src/jit/assembler/block_inst.rs @@ -596,8 +596,8 @@ impl BlockInstKind { fn save_guest_cpsr(opcodes: &mut Vec, thread_regs_addr_reg: Reg, host_reg: Reg) { opcodes.push(Mrs::cpsr(host_reg, Cond::AL)); // Only copy the cond flags from host cpsr - opcodes.push(AluShiftImm::mov(host_reg, host_reg, ShiftType::Lsr, 16, Cond::AL)); - opcodes.push(LdrStrImmSBHD::strh(host_reg, thread_regs_addr_reg, Reg::CPSR as u8 * 4 + 2, Cond::AL)); + opcodes.push(AluShiftImm::mov(host_reg, host_reg, ShiftType::Lsr, 24, Cond::AL)); + opcodes.push(LdrStrImm::strb_offset_al(host_reg, thread_regs_addr_reg, Reg::CPSR as u16 * 4 + 3)); } pub fn emit_opcode(&mut self, opcodes: &mut Vec, opcode_index: usize, branch_placeholders: &mut Vec, opcodes_offset: usize, used_host_regs: RegReserve) {