mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
Remove redundant CLC
This commit is contained in:
parent
1e9ca6fb7f
commit
ba545cf83f
1 changed files with 6 additions and 6 deletions
|
@ -308,21 +308,21 @@ static void GenerateBLSI(const ZydisDecodedOperand* operands, Xbyak::CodeGenerat
|
|||
SaveRegisters(c, {scratch});
|
||||
|
||||
// BLSI sets CF to zero if source is zero, otherwise it sets CF to one.
|
||||
Xbyak::Label carrySet, carryNotSet, end;
|
||||
Xbyak::Label set_carry, clear_carry, end;
|
||||
|
||||
c.mov(scratch, *src);
|
||||
c.neg(scratch); // NEG, like BLSI, clears CF if the source is zero and sets it otherwise
|
||||
c.jc(carrySet);
|
||||
c.jmp(carryNotSet);
|
||||
c.jc(set_carry);
|
||||
c.jmp(clear_carry);
|
||||
|
||||
c.L(carrySet);
|
||||
c.L(set_carry);
|
||||
c.and_(scratch, *src);
|
||||
c.stc(); // setting/clearing carry needs to happen after the AND because that clears CF
|
||||
c.jmp(end);
|
||||
|
||||
c.L(carryNotSet);
|
||||
c.L(clear_carry);
|
||||
c.and_(scratch, *src);
|
||||
c.clc();
|
||||
// We don't need to clear carry here since AND does that for us
|
||||
|
||||
c.L(end);
|
||||
c.mov(dst, scratch);
|
||||
|
|
Loading…
Add table
Reference in a new issue