Index: test/cctest/compiler/call-tester.h |
diff --git a/test/cctest/compiler/call-tester.h b/test/cctest/compiler/call-tester.h |
index ffafaf08039224f16422364ad5cec2612ccf422a..199c23c6cec07b0e24efab9a3452d698e3f184a8 100644 |
--- a/test/cctest/compiler/call-tester.h |
+++ b/test/cctest/compiler/call-tester.h |
@@ -128,6 +128,22 @@ struct ParameterTraits<T*> { |
static uintptr_t Cast(void* r) { return reinterpret_cast<uintptr_t>(r); } |
}; |
+#if V8_TARGET_ARCH_MIPS64 |
titzer
2015/03/24 14:37:22
This should be good enough for all architectures,
dusmil.imgtec
2015/03/24 18:41:12
Yes, after all this only concerns simulated archit
titzer
2015/03/24 18:43:33
If you remove the ifdef and it works on all platfo
|
+// Additional template specialization required for mips64 to sign-extend |
+// parameters defined by calling convention. |
+template <> |
+struct ParameterTraits<int32_t> { |
+ static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); } |
+}; |
+ |
+template <> |
+struct ParameterTraits<uint32_t> { |
+ static int64_t Cast(uint32_t r) { |
+ return static_cast<int64_t>(static_cast<int32_t>(r)); |
+ } |
+}; |
+#endif |
+ |
class CallHelper { |
public: |
explicit CallHelper(Isolate* isolate, MachineSignature* machine_sig) |
@@ -214,6 +230,7 @@ class CallHelper { |
return static_cast<uintptr_t>(simulator->Call(f, 4, p1, p2, p3, p4)); |
} |
+ |
template <typename R, typename F> |
R DoCall(F* f) { |
return ReturnValueTraits<R>::Cast(CallSimulator(FUNCTION_ADDR(f))); |