Commit 9f8d52df authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Fix non-const references in Liftoff

R=ahaas@chromium.org

Bug: v8:9429, v8:9396
Change-Id: I06657a7e339ed2f2c93f560bfcd3413761ad0733
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701844Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62716}
parent 01a80fe3
This diff is collapsed.
...@@ -1235,9 +1235,8 @@ void LiftoffAssembler::emit_i64_set_cond(Condition cond, Register dst, ...@@ -1235,9 +1235,8 @@ void LiftoffAssembler::emit_i64_set_cond(Condition cond, Register dst,
namespace liftoff { namespace liftoff {
inline FPUCondition ConditionToConditionCmpFPU( inline FPUCondition ConditionToConditionCmpFPU(Condition condition,
bool& predicate, // NOLINT(runtime/references) bool* predicate) {
Condition condition) {
switch (condition) { switch (condition) {
case kEqual: case kEqual:
predicate = true; predicate = true;
...@@ -1284,7 +1283,7 @@ void LiftoffAssembler::emit_f32_set_cond(Condition cond, Register dst, ...@@ -1284,7 +1283,7 @@ void LiftoffAssembler::emit_f32_set_cond(Condition cond, Register dst,
TurboAssembler::li(dst, 1); TurboAssembler::li(dst, 1);
bool predicate; bool predicate;
FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(predicate, cond); FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(cond, &predicate);
TurboAssembler::CompareF32(fcond, lhs, rhs); TurboAssembler::CompareF32(fcond, lhs, rhs);
if (predicate) { if (predicate) {
TurboAssembler::LoadZeroIfNotFPUCondition(dst); TurboAssembler::LoadZeroIfNotFPUCondition(dst);
...@@ -1313,7 +1312,7 @@ void LiftoffAssembler::emit_f64_set_cond(Condition cond, Register dst, ...@@ -1313,7 +1312,7 @@ void LiftoffAssembler::emit_f64_set_cond(Condition cond, Register dst,
TurboAssembler::li(dst, 1); TurboAssembler::li(dst, 1);
bool predicate; bool predicate;
FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(predicate, cond); FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(cond, predicate);
TurboAssembler::CompareF64(fcond, lhs, rhs); TurboAssembler::CompareF64(fcond, lhs, rhs);
if (predicate) { if (predicate) {
TurboAssembler::LoadZeroIfNotFPUCondition(dst); TurboAssembler::LoadZeroIfNotFPUCondition(dst);
......
...@@ -1094,9 +1094,8 @@ void LiftoffAssembler::emit_i64_set_cond(Condition cond, Register dst, ...@@ -1094,9 +1094,8 @@ void LiftoffAssembler::emit_i64_set_cond(Condition cond, Register dst,
namespace liftoff { namespace liftoff {
inline FPUCondition ConditionToConditionCmpFPU( inline FPUCondition ConditionToConditionCmpFPU(Condition condition,
bool& predicate, // NOLINT(runtime/references) bool* predicate) {
Condition condition) {
switch (condition) { switch (condition) {
case kEqual: case kEqual:
predicate = true; predicate = true;
...@@ -1143,7 +1142,7 @@ void LiftoffAssembler::emit_f32_set_cond(Condition cond, Register dst, ...@@ -1143,7 +1142,7 @@ void LiftoffAssembler::emit_f32_set_cond(Condition cond, Register dst,
TurboAssembler::li(dst, 1); TurboAssembler::li(dst, 1);
bool predicate; bool predicate;
FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(predicate, cond); FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(cond, &predicate);
TurboAssembler::CompareF32(fcond, lhs, rhs); TurboAssembler::CompareF32(fcond, lhs, rhs);
if (predicate) { if (predicate) {
TurboAssembler::LoadZeroIfNotFPUCondition(dst); TurboAssembler::LoadZeroIfNotFPUCondition(dst);
...@@ -1172,7 +1171,7 @@ void LiftoffAssembler::emit_f64_set_cond(Condition cond, Register dst, ...@@ -1172,7 +1171,7 @@ void LiftoffAssembler::emit_f64_set_cond(Condition cond, Register dst,
TurboAssembler::li(dst, 1); TurboAssembler::li(dst, 1);
bool predicate; bool predicate;
FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(predicate, cond); FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(cond, &predicate);
TurboAssembler::CompareF64(fcond, lhs, rhs); TurboAssembler::CompareF64(fcond, lhs, rhs);
if (predicate) { if (predicate) {
TurboAssembler::LoadZeroIfNotFPUCondition(dst); TurboAssembler::LoadZeroIfNotFPUCondition(dst);
......
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