mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
arm64ec: Single instruction optimization in EC map lookup
We can merge the lsr+and in to a single lsr by 18 and then use ldr with LSL of 3 to accomplish the same result. Modern Cortex doesn't even generate an additional integer pipeline uop for this ldr+lsl instruction anymore.
This commit is contained in:
2 files changed
+4
-6
No files matched your search
@@ -18,9 +18,8 @@ check_target_ec:
|
||||
// Check if target is in fact x86 code
|
||||
ldr x16, [x18, #0x60] // TEB->PEB
|
||||
ldr x16, [x16, #0x368] // PEB->EcCodeBitMap
|
||||
lsr x17, x9, #15
|
||||
and x17, x17, #0x1fffffffffff8
|
||||
ldr x16, [x16, x17]
|
||||
lsr x17, x9, #18
|
||||
ldr x16, [x16, x17, lsl #3]
|
||||
lsr x17, x9, #12
|
||||
lsr x16, x16, x17
|
||||
tbnz x16, #0, ExitFunctionEC
|
||||
|
||||
Reference in new issue
Block a user