Jit64AsmCommon: Micro-optimize GenFrsqrte

Save 2 bytes by testing register against itself and branching on the 
sign flag.

Before:
0:  48 0f ba e0 3f          bt     rax,0x3f

After:
0:  48 85 c0                test   rax,rax
This commit is contained in:
Sintendo 2019-06-05 23:58:44 +02:00
parent 5b5886160e
commit e9d4869965
1 changed files with 2 additions and 2 deletions

View File

@ -101,8 +101,8 @@ void CommonAsmRoutines::GenFrsqrte()
MOVQ_xmm(XMM0, R(RSCRATCH));
RET();
SetJumpTarget(inf);
BT(64, R(RSCRATCH), Imm8(63));
FixupBranch negative = J_CC(CC_C);
TEST(64, R(RSCRATCH), R(RSCRATCH));
FixupBranch negative = J_CC(CC_S);
XORPD(XMM0, R(XMM0));
RET();