diff options
| author | Sintendo <bram.speeckaert@gmail.com> | 2023-10-24 00:42:30 +0200 |
|---|---|---|
| committer | Sintendo <bram.speeckaert@gmail.com> | 2023-10-24 00:42:35 +0200 |
| commit | 171f76ae07c7895cd91ca4a105572218601b98a5 (patch) | |
| tree | fb54b19b5aca9374aa55ad5c8dc0d164b3ba99c0 /Source/Core/Common/FileUtil.cpp | |
| parent | dd58a8d65e090519107bea3ea0ef12fbcaaaf83a (diff) | |
Jit_LoadStore: Another minor dcbx optimization
The multiplication needs the value from RSCRATCH2, but shouldn't
overwrite it as it is still needed later. The original code solved this
by copying RSCRATCH2 to another register first.
As it turns out, the other register involved in the multiplication can
safely be overwritten, so we can swap the operands around and use
RSCRATCH2 directly without making a copy.
Before:
33 D2 xor edx,edx
8B 45 64 mov eax,dword ptr [rbp+64h]
85 C0 test eax,eax
7E 30 jle 000002D4DF373F6B
44 8B B5 D4 02 00 00 mov r14d,dword ptr [rbp+2D4h]
44 8B E8 mov r13d,eax
BF 07 00 00 00 mov edi,7
F7 F7 div eax,edi
41 8D 56 FF lea edx,[r14-1]
3B C2 cmp eax,edx
0F 42 D0 cmovb edx,eax
44 2B F2 sub r14d,edx
44 89 B5 D4 02 00 00 mov dword ptr [rbp+2D4h],r14d
8B C2 mov eax,edx
0F AF C7 imul eax,edi
44 2B E8 sub r13d,eax
44 89 6D 64 mov dword ptr [rbp+64h],r13d
44 8D 72 01 lea r14d,[rdx+1]
After:
33 D2 xor edx,edx
8B 45 64 mov eax,dword ptr [rbp+64h]
85 C0 test eax,eax
7E 2E jle 0000021C01013F69
44 8B B5 D4 02 00 00 mov r14d,dword ptr [rbp+2D4h]
44 8B E8 mov r13d,eax
BF 07 00 00 00 mov edi,7
F7 F7 div eax,edi
41 8D 56 FF lea edx,[r14-1]
3B C2 cmp eax,edx
0F 42 D0 cmovb edx,eax
44 2B F2 sub r14d,edx
44 89 B5 D4 02 00 00 mov dword ptr [rbp+2D4h],r14d
0F AF FA imul edi,edx
44 2B EF sub r13d,edi
44 89 6D 64 mov dword ptr [rbp+64h],r13d
44 8D 72 01 lea r14d,[rdx+1]
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
0 files changed, 0 insertions, 0 deletions
