mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Reduce my idiocy in register saving code.
(1) Rename ABI_ALL_CALLEE_SAVED to ABI_ALL_CALLER_SAVED, because that's what it was actually defined as (and used as). Derp. (2) RegistersInUse is always used for the purpose of saving registers before calling a C++ function in the middle of a JIT block (without flushing). There is no need to save callee-saved registers in this case. Change the name to CallerSavedRegistersInUse and mask with ABI_ALL_CALLER_SAVED. Nothing obvious broke when starting up a Melee game. (I added a test for anything actually being masked out; it happens, but in this particular case seemed to occur at most a few dozen times per second, so the actual performance benefit is probably negligible.)
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
#define ABI_PARAM3 R8
|
||||
#define ABI_PARAM4 R9
|
||||
|
||||
#define ABI_ALL_CALLEE_SAVED ((1 << RAX) | (1 << RCX) | (1 << RDX) | (1 << R8) | \
|
||||
#define ABI_ALL_CALLER_SAVED ((1 << RAX) | (1 << RCX) | (1 << RDX) | (1 << R8) | \
|
||||
(1 << R9) | (1 << R10) | (1 << R11) | \
|
||||
(1 << XMM0) | (1 << XMM1) | (1 << XMM2) | (1 << XMM3) | \
|
||||
(1 << XMM4) | (1 << XMM5))
|
||||
@ -44,7 +44,7 @@
|
||||
#define ABI_PARAM5 R8
|
||||
#define ABI_PARAM6 R9
|
||||
|
||||
#define ABI_ALL_CALLEE_SAVED ((1 << RAX) | (1 << RCX) | (1 << RDX) | (1 << RDI) | \
|
||||
#define ABI_ALL_CALLER_SAVED ((1 << RAX) | (1 << RCX) | (1 << RDX) | (1 << RDI) | \
|
||||
(1 << RSI) | (1 << R8) | (1 << R9) | (1 << R10) | (1 << R11) | \
|
||||
0xffff0000 /* xmm0..15 */)
|
||||
|
||||
|
Reference in New Issue
Block a user