Factor code from ABI_CallFunctionRR and GetWriteTrampoline into a helper, and fix a special case.
The special case is where the registers are actually to be swapped (i.e. func(ABI_PARAM2, ABI_PARAM1); this was previously impossible but would be ugly not to handle anyway.
This commit is contained in:
@@ -753,6 +753,9 @@ public:
|
||||
void ABI_CallFunctionR(void *func, X64Reg reg1);
|
||||
void ABI_CallFunctionRR(void *func, X64Reg reg1, X64Reg reg2, bool noProlog = false);
|
||||
|
||||
// Helper method for the above, or can be used separately.
|
||||
void MOVTwo(int bits, Gen::X64Reg dst1, Gen::X64Reg src1, Gen::X64Reg dst2, Gen::X64Reg src2, Gen::X64Reg temp);
|
||||
|
||||
// A function that doesn't have any control over what it will do to regs,
|
||||
// such as the dispatcher, should be surrounded by these.
|
||||
void ABI_PushAllCalleeSavedRegsAndAdjustStack();
|
||||
|
||||
Reference in New Issue
Block a user