Commit 86bc1517 authored by Aseem Garg's avatar Aseem Garg Committed by Commit Bot

[wasm] remove kExecuteSimdLowered mode from wasm cctest

R=clemensh@chromium.org,titzer@chromium.org,bbudge@chromium.org,gdeepti@chromium.org
BUG=v8:7028

Change-Id: Ie0b984ebd18e267cdaf7aaff9f17fb4328d8e5fa
Reviewed-on: https://chromium-review.googlesource.com/849638
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50385}
parent 309944d0
This diff is collapsed.
......@@ -15,7 +15,7 @@ namespace wasm {
TestingModuleBuilder::TestingModuleBuilder(
Zone* zone, WasmExecutionMode mode,
compiler::RuntimeExceptionSupport exception_support)
compiler::RuntimeExceptionSupport exception_support, LowerSimd lower_simd)
: test_module_ptr_(&test_module_),
isolate_(CcTest::InitIsolateOnce()),
global_offset(0),
......@@ -24,7 +24,7 @@ TestingModuleBuilder::TestingModuleBuilder(
interpreter_(nullptr),
execution_mode_(mode),
runtime_exception_support_(exception_support),
lower_simd_(mode == kExecuteSimdLowered) {
lower_simd_(lower_simd) {
WasmJs::Install(isolate_, true);
test_module_.globals_size = kMaxGlobalsSize;
memset(globals_data_, 0, sizeof(globals_data_));
......
......@@ -51,11 +51,11 @@ constexpr uint32_t kMaxGlobalsSize = 128;
enum WasmExecutionMode {
kExecuteInterpreter,
kExecuteTurbofan,
kExecuteLiftoff,
// TODO(bug:7028): Introduce another enum for simd lowering.
kExecuteSimdLowered
kExecuteLiftoff
};
enum LowerSimd : bool { kLowerSimd = true, kNoLowerSimd = false };
using compiler::CallDescriptor;
using compiler::MachineTypeForC;
using compiler::Node;
......@@ -85,7 +85,7 @@ using compiler::Node;
class TestingModuleBuilder {
public:
TestingModuleBuilder(Zone*, WasmExecutionMode,
compiler::RuntimeExceptionSupport);
compiler::RuntimeExceptionSupport, LowerSimd);
void ChangeOriginToAsmjs() { test_module_.set_origin(kAsmJsOrigin); }
......@@ -204,7 +204,7 @@ class TestingModuleBuilder {
WasmInterpreter* interpreter() { return interpreter_; }
bool interpret() { return interpreter_ != nullptr; }
bool lower_simd() { return lower_simd_; }
LowerSimd lower_simd() { return lower_simd_; }
Isolate* isolate() { return isolate_; }
Handle<WasmInstanceObject> instance_object() { return instance_object_; }
WasmCodeWrapper GetFunctionCode(uint32_t index) {
......@@ -252,7 +252,7 @@ class TestingModuleBuilder {
NativeModule* native_module_;
bool linked_ = false;
compiler::RuntimeExceptionSupport runtime_exception_support_;
bool lower_simd_;
LowerSimd lower_simd_;
const WasmGlobal* AddGlobal(ValueType type);
......@@ -373,9 +373,10 @@ class WasmFunctionCompiler : public compiler::GraphAndBuilders {
class WasmRunnerBase : public HandleAndZoneScope {
public:
WasmRunnerBase(WasmExecutionMode execution_mode, int num_params,
compiler::RuntimeExceptionSupport runtime_exception_support)
compiler::RuntimeExceptionSupport runtime_exception_support,
LowerSimd lower_simd)
: zone_(&allocator_, ZONE_NAME),
builder_(&zone_, execution_mode, runtime_exception_support),
builder_(&zone_, execution_mode, runtime_exception_support, lower_simd),
wrapper_(&zone_, num_params) {}
// Builds a graph from the given Wasm code and generates the machine
......@@ -454,15 +455,20 @@ class WasmRunner : public WasmRunnerBase {
WasmRunner(WasmExecutionMode execution_mode,
const char* main_fn_name = "main",
compiler::RuntimeExceptionSupport runtime_exception_support =
compiler::kNoRuntimeExceptionSupport)
compiler::kNoRuntimeExceptionSupport,
LowerSimd lower_simd = kNoLowerSimd)
: WasmRunnerBase(execution_mode, sizeof...(ParamTypes),
runtime_exception_support) {
runtime_exception_support, lower_simd) {
NewFunction<ReturnType, ParamTypes...>(main_fn_name);
if (!interpret()) {
wrapper_.Init<ReturnType, ParamTypes...>(functions_[0]->descriptor());
}
}
WasmRunner(WasmExecutionMode execution_mode, LowerSimd lower_simd)
: WasmRunner(execution_mode, "main", compiler::kNoRuntimeExceptionSupport,
lower_simd) {}
ReturnType Call(ParamTypes... p) {
DCHECK(compiled_);
if (interpret()) return CallInterpreter(p...);
......
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