Index: src/arguments.h |
diff --git a/src/arguments.h b/src/arguments.h |
index f8fb00c57538aeb32b7a0adcfdc40d0796a91332..3475d374cecd49b7d871dd9ac93aaff347bdb753 100644 |
--- a/src/arguments.h |
+++ b/src/arguments.h |
@@ -114,6 +114,27 @@ class CustomArguments : public Relocatable { |
}; |
+#if defined(V8_ARM_ON_X86_64) |
+// In arm/simulator-arm.cc, invocations of runtime functions |
+// assume that adjacent parameters will be automagically coalesced |
+// into call-by-value structures on the stack. This is okay for |
+// 32-bit but fails for 64-bit. We use a small stub routine to |
+// fix this, coalescing the first two parameters into the expected |
+// structure. |
+#define DECLARE_RUNTIME_FUNCTION(Type, Name) \ |
+Type Name(int argslength, Object** argsobject, Isolate* isolate) |
+ |
+#define RUNTIME_FUNCTION(Type, Name) \ |
+static Type __x86_64_impl_##Name(Arguments args, Isolate* isolate); \ |
+Type Name(int argslength, Object** argsobject, Isolate* isolate) { \ |
+ Arguments args(argslength, argsobject); \ |
+ return __x86_64_impl_##Name(args, isolate); \ |
+} \ |
+static Type __x86_64_impl_##Name(Arguments args, Isolate* isolate) |
+ |
+#define RUNTIME_ARGUMENTS(isolate, args) \ |
+ args.length(), args.arguments(), isolate |
+#else |
#define DECLARE_RUNTIME_FUNCTION(Type, Name) \ |
Type Name(Arguments args, Isolate* isolate) |
@@ -123,7 +144,7 @@ Type Name(Arguments args, Isolate* isolate) |
#define RUNTIME_ARGUMENTS(isolate, args) args, isolate |
- |
+#endif // defined(V8_ARM_ON_X86_64) |
} } // namespace v8::internal |