Closed rinon closed 2 weeks ago
Rather than pass the indirect call target in a global static, this change passes the target in the first parameter register to the wrapper
I agree this is a better approach than a thread-local in memory.
I think at some point we'll want to generate scrub registers in GenCallAsm.cpp to avoid the redundant push/pops and avoid spilling the function pointer to the stack in indirect calls, but this is already better than what we currently do since it's only on a protected stack.
Rather than pass the indirect call target in a global static, this change passes the target in the first parameter register to the wrapper. The wrapper then shifts the remaining parameters so that the callee receives the correct parameters.