summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/FileSystemGCWii.cpp
diff options
context:
space:
mode:
authorSintendo <bram.speeckaert@gmail.com>2020-12-13 12:36:07 +0100
committerSintendo <bram.speeckaert@gmail.com>2020-12-25 19:30:51 +0100
commit67d2fa11f122dfd15f157d59356bcfb69d3acc47 (patch)
tree4a96fa30bdd373d16de8a4c8abb332dcc3f03bba /Source/Core/DiscIO/FileSystemGCWii.cpp
parent10d65519f95b33221731aab1b96d98d69e5792f3 (diff)
Jit64: srawx - Handle constant zero input
Shifting zero by any amount always gives zero. Before: 41 B9 00 00 00 00 mov r9d,0 41 8B CF mov ecx,r15d 49 C1 E1 20 shl r9,20h 49 D3 F9 sar r9,cl 49 C1 E9 20 shr r9,20h After: Nothing, register is set to constant zero. Before: 41 B8 00 00 00 00 mov r8d,0 41 8B CF mov ecx,r15d 49 C1 E0 20 shl r8,20h 49 D3 F8 sar r8,cl 41 8B C0 mov eax,r8d 49 C1 E8 20 shr r8,20h 44 85 C0 test eax,r8d 0F 95 45 58 setne byte ptr [rbp+58h] After: C6 45 58 00 mov byte ptr [rbp+58h],0 Occurs a bunch of times in Super Mario Sunshine. Since this is an arithmetic shift a similar optimization can be done for constant -1 (0xFFFFFFFF), but I couldn't find any game where this happens.
Diffstat (limited to 'Source/Core/DiscIO/FileSystemGCWii.cpp')
0 files changed, 0 insertions, 0 deletions