Revert "[wasm] remove kExecuteSimdLowered mode from wasm cctest"

This reverts commit 86bc15174f.

Reason for revert: breaks gcc bot:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20gcc%204.8/builds/17209

Original change's description:
> [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: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#50385}

TBR=bbudge@chromium.org,titzer@chromium.org,gdeepti@chromium.org,aseemgarg@chromium.org,ahaas@chromium.org,clemensh@chromium.org

Change-Id: I890b8810ea802fe2b9273def07c9056d4b904a4e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7028
Reviewed-on: https://chromium-review.googlesource.com/852712
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50386}
This commit is contained in:
Michael Achenbach 2018-01-05 18:12:39 +00:00 committed by Commit Bot
parent 86bc15174f
commit 4eae36ad79
3 changed files with 275 additions and 259 deletions

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ namespace wasm {
TestingModuleBuilder::TestingModuleBuilder(
Zone* zone, WasmExecutionMode mode,
compiler::RuntimeExceptionSupport exception_support, LowerSimd lower_simd)
compiler::RuntimeExceptionSupport exception_support)
: 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_(lower_simd) {
lower_simd_(mode == kExecuteSimdLowered) {
WasmJs::Install(isolate_, true);
test_module_.globals_size = kMaxGlobalsSize;
memset(globals_data_, 0, sizeof(globals_data_));

View File

@ -51,11 +51,11 @@ constexpr uint32_t kMaxGlobalsSize = 128;
enum WasmExecutionMode {
kExecuteInterpreter,
kExecuteTurbofan,
kExecuteLiftoff
kExecuteLiftoff,
// TODO(bug:7028): Introduce another enum for simd lowering.
kExecuteSimdLowered
};
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, LowerSimd);
compiler::RuntimeExceptionSupport);
void ChangeOriginToAsmjs() { test_module_.set_origin(kAsmJsOrigin); }
@ -204,7 +204,7 @@ class TestingModuleBuilder {
WasmInterpreter* interpreter() { return interpreter_; }
bool interpret() { return interpreter_ != nullptr; }
LowerSimd lower_simd() { return lower_simd_; }
bool 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_;
LowerSimd lower_simd_;
bool lower_simd_;
const WasmGlobal* AddGlobal(ValueType type);
@ -373,10 +373,9 @@ class WasmFunctionCompiler : public compiler::GraphAndBuilders {
class WasmRunnerBase : public HandleAndZoneScope {
public:
WasmRunnerBase(WasmExecutionMode execution_mode, int num_params,
compiler::RuntimeExceptionSupport runtime_exception_support,
LowerSimd lower_simd)
compiler::RuntimeExceptionSupport runtime_exception_support)
: zone_(&allocator_, ZONE_NAME),
builder_(&zone_, execution_mode, runtime_exception_support, lower_simd),
builder_(&zone_, execution_mode, runtime_exception_support),
wrapper_(&zone_, num_params) {}
// Builds a graph from the given Wasm code and generates the machine
@ -455,20 +454,15 @@ class WasmRunner : public WasmRunnerBase {
WasmRunner(WasmExecutionMode execution_mode,
const char* main_fn_name = "main",
compiler::RuntimeExceptionSupport runtime_exception_support =
compiler::kNoRuntimeExceptionSupport,
LowerSimd lower_simd = kNoLowerSimd)
compiler::kNoRuntimeExceptionSupport)
: WasmRunnerBase(execution_mode, sizeof...(ParamTypes),
runtime_exception_support, lower_simd) {
runtime_exception_support) {
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...);