Index: src/x64/macro-assembler-x64.h |
=================================================================== |
--- src/x64/macro-assembler-x64.h (revision 3911) |
+++ src/x64/macro-assembler-x64.h (working copy) |
@@ -38,6 +38,21 @@ |
// function calling convention. |
static const Register kScratchRegister = r10; |
+// Registers for passing arguments into a C function. |
+#ifdef _WIN64 |
+static const int kCArgRegsCount = 4; |
+static const RegList kCCallerSaved = |
+ rax.bit() | rcx.bit() | rdx.bit() | r8.bit() | |
+ r9.bit() | r10.bit() | r11.bit(); |
+#else |
+static const int kCArgRegsCount = 6; |
+static const RegList kCCallerSaved = |
+ rax.bit() | rcx.bit() | rdx.bit() | rsi.bit() | rdi.bit() | r8.bit() | |
+ r9.bit() | r10.bit() | r11.bit(); |
+#endif |
+extern const Register kCArgRegs[kCArgRegsCount]; |
+ |
+ |
// Convenience for platform-independent signatures. |
typedef Operand MemOperand; |
@@ -655,13 +670,18 @@ |
void CallExternalReference(const ExternalReference& ext, |
int num_arguments); |
- // Tail call of a runtime routine (jump). |
- // Like JumpToRuntime, but also takes care of passing the number |
+ // Tail call of a runtime routine (jump or equivalent if jump is not |
+ // possible). Like JumpToRuntime, but also takes care of passing the number |
// of arguments. |
- void TailCallRuntime(const ExternalReference& ext, |
+ void TailCallRuntime(Runtime::FunctionId id, |
int num_arguments, |
int result_size); |
+ void TailCallExternalReference(const ExternalReference& ext, |
+ int num_arguments, |
+ int result_size); |
+ |
+ |
// Jump to a runtime routine. |
void JumpToRuntime(const ExternalReference& ext, int result_size); |