mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-25 08:44:49 +01:00
emit_x64: Arguments to MostSignificantBit and IsZero are 32-bit
This commit is contained in:
parent
f595f85039
commit
984ce22431
1 changed files with 2 additions and 2 deletions
|
|
@ -578,7 +578,7 @@ void EmitX64::EmitLeastSignificantByte(RegAlloc& reg_alloc, IR::Block&, IR::Inst
|
|||
|
||||
void EmitX64::EmitMostSignificantBit(RegAlloc& reg_alloc, IR::Block&, IR::Inst* inst) {
|
||||
auto args = reg_alloc.GetArgumentInfo(inst);
|
||||
Xbyak::Reg64 result = reg_alloc.UseScratchGpr(args[0]);
|
||||
Xbyak::Reg32 result = reg_alloc.UseScratchGpr(args[0]).cvt32();
|
||||
// TODO: Flag optimization
|
||||
code->shr(result, 31);
|
||||
reg_alloc.DefineValue(inst, result);
|
||||
|
|
@ -586,7 +586,7 @@ void EmitX64::EmitMostSignificantBit(RegAlloc& reg_alloc, IR::Block&, IR::Inst*
|
|||
|
||||
void EmitX64::EmitIsZero(RegAlloc& reg_alloc, IR::Block&, IR::Inst* inst) {
|
||||
auto args = reg_alloc.GetArgumentInfo(inst);
|
||||
Xbyak::Reg64 result = reg_alloc.UseScratchGpr(args[0]);
|
||||
Xbyak::Reg32 result = reg_alloc.UseScratchGpr(args[0]).cvt32();
|
||||
// TODO: Flag optimization
|
||||
code->test(result, result);
|
||||
code->sete(result.cvt8());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue