Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 2833463002: [arm64] Support passing more than eight arguments to C functions (Closed)
Patch Set: [arm64] Support passing more than eight arguments to C functions Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-machops.cc
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index acccdfaf996c6b0e2289543541b0276028e9b55a..2092dc9c63631b4494444263245d2db4c33f7c3b 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -6163,6 +6163,11 @@ int32_t foo8(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f,
return a + b + c + d + e + f + g + h;
}
+int32_t foo9(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f,
+ int32_t g, int32_t h, int32_t i) {
+ return a + b + c + d + e + f + g + h + i;
+}
+
} // namespace
@@ -6221,6 +6226,30 @@ TEST(RunCallCFunction8) {
CHECK_EQ(x * 8, m.Call(x));
}
}
+
+TEST(RunCallCFunction9) {
+ auto* foo9_ptr = &foo9;
+ RawMachineAssemblerTester<int32_t> m(MachineType::Int32());
+ Node* function = m.LoadFromPointer(&foo9_ptr, MachineType::Pointer());
+ Node* param = m.Parameter(0);
+ m.Return(m.CallCFunction9(
+ MachineType::Int32(), MachineType::Int32(), MachineType::Int32(),
+ MachineType::Int32(), MachineType::Int32(), MachineType::Int32(),
+ MachineType::Int32(), MachineType::Int32(), MachineType::Int32(),
+ MachineType::Int32(), function, param,
+ m.Int32Add(param, m.Int32Constant(1)),
+ m.Int32Add(param, m.Int32Constant(2)),
+ m.Int32Add(param, m.Int32Constant(3)),
+ m.Int32Add(param, m.Int32Constant(4)),
+ m.Int32Add(param, m.Int32Constant(5)),
+ m.Int32Add(param, m.Int32Constant(6)),
+ m.Int32Add(param, m.Int32Constant(7)),
+ m.Int32Add(param, m.Int32Constant(8))));
+ FOR_INT32_INPUTS(i) {
+ int32_t const x = *i;
+ CHECK_EQ(x * 9 + 36, m.Call(x));
+ }
+}
#endif // USE_SIMULATOR
#if V8_TARGET_ARCH_64_BIT
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698