mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-06 06:28:13 +01:00
emit_x64: bug: OP m/r64, imm32 form instructions sign-extend their immediate on x64
This commit is contained in:
parent
989d036e65
commit
e4615a4562
4 changed files with 29 additions and 8 deletions
|
|
@ -180,8 +180,8 @@ void A64EmitX64::EmitA64SetX(A64EmitContext& ctx, IR::Inst* inst) {
|
|||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||
A64::Reg reg = inst->GetArg(0).GetA64RegRef();
|
||||
auto addr = qword[r15 + offsetof(A64JitState, reg) + sizeof(u64) * static_cast<size_t>(reg)];
|
||||
if (args[1].FitsInImmediateU32()) {
|
||||
code->mov(addr, args[1].GetImmediateU32());
|
||||
if (args[1].FitsInImmediateS32()) {
|
||||
code->mov(addr, args[1].GetImmediateS32());
|
||||
} else if (args[1].IsInXmm()) {
|
||||
Xbyak::Xmm to_store = ctx.reg_alloc.UseXmm(args[1]);
|
||||
code->movq(addr, to_store);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue