http://codereview.chromium.org/598072/diff/4001/5003 File src/ia32/macro-assembler-ia32.cc (right):
http://codereview.chromium.org/598072/diff/4001/5003#newcode1154 src/ia32/macro-assembler-ia32.cc:1154: // JS caller saved are: eax, ecx, edx, ebx, edi (superset of C++) On 64-bit we have the functions ArgumentStackSlotsForCFunctionCall PrepareCallCFunction CallCfunction in the macro assembler, which abstracts the platform differences of calling a C function. It is currently used by the RegExp (regexp-macro-assembler-x64.cc). It might be an idea to introduce something like that on 32-bit as well. In regexp-macro-assembler-ia32.cc there are local functions FrameAlign and CallCFunction for handling that. This should probably also be used in RegExpExecStub::Generate as this also makes a C call (but not to a real C function, so the frame alignment here is not strictly required). Maybe abstracting it even more by making a stack allocated structure, e.g. CFunctionCall ccall(argc); ccall.PrepareStack(); ... ccall.Call(register); maybe not... http://codereview.chromium.org/598072 -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
