cb903d803e
The method {SpillAllRegisters} should really just spill registers, and not also constants. Also, since more code is inlined into that method now, we can optimize it to update register use counters only once in the end, since no used register should be left after executing this method. R=titzer@chromium.org Bug: v8:6600, chromium:802244 Change-Id: I737a1a87f8e912151062224952c4f5dffd43f802 Reviewed-on: https://chromium-review.googlesource.com/868022 Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#50644}
23 lines
806 B
JavaScript
23 lines
806 B
JavaScript
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
load('test/mjsunit/wasm/wasm-constants.js');
|
|
load('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
const builder = new WasmModuleBuilder();
|
|
builder.addFunction(undefined, kSig_v_iii).addBody([
|
|
kExprI32Const, 0x41, // i32.const 0x41
|
|
kExprLoop, 0x7c, // loop f64
|
|
kExprGetLocal, 0x00, // get_local 0
|
|
kExprGetLocal, 0x01, // get_local 1
|
|
kExprBrIf, 0x01, // br_if depth=1
|
|
kExprGetLocal, 0x00, // get_local 0
|
|
kExprI32Rol, // i32.rol
|
|
kExprBrIf, 0x00, // br_if depth=0
|
|
kExprUnreachable, // unreachable
|
|
kExprEnd, // end
|
|
kExprUnreachable, // unreachable
|
|
]);
|
|
builder.instantiate();
|