mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-26 09:14:54 +01:00
EmitZeroExtendLongToQuad: Do not rely on register allocator to zero extend 64->128
This commit is contained in:
parent
f4f774f9f6
commit
b2d99eddc6
2 changed files with 10 additions and 5 deletions
|
|
@ -1196,8 +1196,10 @@ void EmitX64::EmitZeroExtendWordToLong(EmitContext& ctx, IR::Inst* inst) {
|
|||
void EmitX64::EmitZeroExtendLongToQuad(EmitContext& ctx, IR::Inst* inst) {
|
||||
auto args = ctx.reg_alloc.GetArgumentInfo(inst);
|
||||
if (args[0].IsInGpr()) {
|
||||
// We let the register allocator automatically zero extend this when necessary
|
||||
ctx.reg_alloc.DefineValue(inst, args[0]);
|
||||
Xbyak::Reg64 source = ctx.reg_alloc.UseGpr(args[0]);
|
||||
Xbyak::Xmm result = ctx.reg_alloc.ScratchXmm();
|
||||
code->movq(result, source);
|
||||
ctx.reg_alloc.DefineValue(inst, result);
|
||||
} else {
|
||||
Xbyak::Xmm result = ctx.reg_alloc.UseScratchXmm(args[0]);
|
||||
code->movq(result, result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue