summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
diff options
context:
space:
mode:
authorSintendo <bram.speeckaert@gmail.com>2021-04-24 21:31:39 +0200
committerSintendo <bram.speeckaert@gmail.com>2021-04-24 21:32:21 +0200
commit47e16133e5cfb6361b265f1717736b22f896e445 (patch)
tree1064ab324aa30d9b6bd003c595bcdd4ac73a4be3 /Source/Core/InputCommon/ControlReference/ExpressionParser.cpp
parentabc4c8f6017e516818eb301718bf3773f827a35e (diff)
Jit64: divwx - Eliminate XOR for constant dividend
We normally check for division by zero to know if we should set the destination register to zero with a XOR. However, when the divisor and destination registers are the same the explicit zeroing can be omitted. In addition, some of the surrounding branching can be simplified as well. Before: 45 85 FF test r15d,r15d 75 05 jne normal_path 45 33 FF xor r15d,r15d EB 0C jmp done normal_path: B8 5A 00 00 00 mov eax,5Ah 99 cdq 41 F7 FF idiv eax,r15d 44 8B F8 mov r15d,eax done: After: 45 85 FF test r15d,r15d 74 0C je done B8 5A 00 00 00 mov eax,5Ah 99 cdq 41 F7 FF idiv eax,r15d 44 8B F8 mov r15d,eax done:
Diffstat (limited to 'Source/Core/InputCommon/ControlReference/ExpressionParser.cpp')
0 files changed, 0 insertions, 0 deletions