forked from v8/v8
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[liftoff] Handle unordered register pairs
For 64-bit binary operations, Liftoff on arm made the assumption that register pairs are always ordered, i.e. the register code for the low word is lower than the register code for the high word. Ensuring this was only implemented in {GetUnusedRegister} in https://crrev.com/c/2168875. Other cases were missing though, e.g. return values, but also different places were we construct register pairs internally. Thus, this CL removes this constraint again and instead handles unordered register pairs in 64-bit binary operations on arm. R=thibaudm@chromium.org Bug: chromium:1101304 Change-Id: I4cd9fb1577f82ab06d34c9dde6533cf04a2cade7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287870 Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#68752}
- Loading branch information
Showing
3 changed files
with
37 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2020 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-module-builder.js'); | ||
|
||
const builder = new WasmModuleBuilder(); | ||
builder.addType(makeSig( | ||
[kWasmI64, kWasmI32, kWasmF64, kWasmI64, kWasmI64, kWasmI32, kWasmI64], | ||
[])); | ||
builder.addFunction(undefined, 0 /* sig */).addBody([ | ||
kExprI32Const, 0, // i32.const | ||
kExprIf, kWasmStmt, // if @3 | ||
kExprI32Const, 1, // i32.const | ||
kExprIf, kWasmStmt, // if @7 | ||
kExprNop, // nop | ||
kExprElse, // else @10 | ||
kExprUnreachable, // unreachable | ||
kExprEnd, // end @12 | ||
kExprLocalGet, 0x06, // local.get | ||
kExprLocalSet, 0x00, // local.set | ||
kExprLocalGet, 0x03, // local.get | ||
kExprLocalGet, 0x00, // local.get | ||
kExprI64Sub, // i64.sub | ||
kExprDrop, // drop | ||
kExprUnreachable, // unreachable | ||
kExprEnd // end @24 | ||
]); | ||
builder.toModule(); |