Commit e5a687be authored by Vlad Tsyrklevich's avatar Vlad Tsyrklevich Committed by Commit Bot

[CFI] Refactor test use to use GeneratedCode

Replace direct call to generated code with call using GeneratedCode to
match the rest of v8.

BUG=v8:7164

Change-Id: I3e45d3e7c45f06fc362a22217ee7f0f1b70745e2
Reviewed-on: https://chromium-review.googlesource.com/1002534
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52536}
parent 75da03bc
......@@ -37,6 +37,7 @@
#include "src/heap/factory.h"
#include "src/macro-assembler.h"
#include "src/objects-inl.h"
#include "src/simulator.h"
#include "test/cctest/cctest.h"
#include "test/cctest/test-code-stubs.h"
......@@ -97,7 +98,17 @@ void RunOneTruncationTestWithTest(ConvertDToICallWrapper callWrapper,
int32_t DefaultCallWrapper(ConvertDToIFunc func,
double from) {
return (*func)(from);
if (func == &ConvertDToICVersion) return (*func)(from);
#ifdef USE_SIMULATOR
// Simulator users will require a custom 'RunGeneratedCodeCallWrapper' to
// account for platform-specific floating point calling conventions.
UNREACHABLE();
#else
auto f =
GeneratedCode<int32_t(double)>::FromAddress(CcTest::i_isolate(), func);
return f.Call(from);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment