diff options
| author | Sintendo <bram.speeckaert@gmail.com> | 2021-02-27 20:51:38 +0100 |
|---|---|---|
| committer | Sintendo <bram.speeckaert@gmail.com> | 2021-03-07 18:27:30 +0100 |
| commit | c9adc60d730812c1cb09bcce9bf7b4ace91883c3 (patch) | |
| tree | ec2e661ffc6ffeee036dedc36f1e774d1fc6f20c /Source/Core/VideoCommon/TextureDecoder_Common.cpp | |
| parent | c081e3f2b35fc5e80ef6d14aa28fcaeb26d9e9af (diff) | |
Jit64: divwx - Special case dividend == 0
Zero divided by any number is still zero. For whatever reason, this case
shows up frequently too.
Before:
B8 00 00 00 00 mov eax,0
85 F6 test esi,esi
74 0C je overflow
3D 00 00 00 80 cmp eax,80000000h
75 0C jne normal_path
83 FE FF cmp esi,0FFFFFFFFh
75 07 jne normal_path
overflow:
C1 F8 1F sar eax,1Fh
8B F8 mov edi,eax
EB 05 jmp done
normal_path:
99 cdq
F7 FE idiv eax,esi
8B F8 mov edi,eax
done:
After:
Nothing!
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp')
0 files changed, 0 insertions, 0 deletions
