From db2c7dd43f204f80955b85b6c68a0e6358e3b5d7 Mon Sep 17 00:00:00 2001 From: Yu Yin Date: Wed, 17 Jul 2019 11:09:41 +0800 Subject: [PATCH] [mips][wasm] Fix non-const references in Liftoff. Fix build error which is introduced by 9f8d52d https://crrev.com/c/1701844 Change-Id: I31266daf46ddc67390379f935568e3443593a262 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703988 Reviewed-by: Clemens Hammacher Commit-Queue: Yu Yin Cr-Commit-Position: refs/heads/master@{#62756} --- src/wasm/baseline/mips/liftoff-assembler-mips.h | 16 ++++++++-------- .../baseline/mips64/liftoff-assembler-mips64.h | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/wasm/baseline/mips/liftoff-assembler-mips.h b/src/wasm/baseline/mips/liftoff-assembler-mips.h index 0d3a1a67b4..e82ffe8f67 100644 --- a/src/wasm/baseline/mips/liftoff-assembler-mips.h +++ b/src/wasm/baseline/mips/liftoff-assembler-mips.h @@ -1239,25 +1239,25 @@ inline FPUCondition ConditionToConditionCmpFPU(Condition condition, bool* predicate) { switch (condition) { case kEqual: - predicate = true; + *predicate = true; return EQ; case kUnequal: - predicate = false; + *predicate = false; return EQ; case kUnsignedLessThan: - predicate = true; + *predicate = true; return OLT; case kUnsignedGreaterEqual: - predicate = false; + *predicate = false; return OLT; case kUnsignedLessEqual: - predicate = true; + *predicate = true; return OLE; case kUnsignedGreaterThan: - predicate = false; + *predicate = false; return OLE; default: - predicate = true; + *predicate = true; break; } UNREACHABLE(); @@ -1312,7 +1312,7 @@ void LiftoffAssembler::emit_f64_set_cond(Condition cond, Register dst, TurboAssembler::li(dst, 1); bool predicate; - FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(cond, predicate); + FPUCondition fcond = liftoff::ConditionToConditionCmpFPU(cond, &predicate); TurboAssembler::CompareF64(fcond, lhs, rhs); if (predicate) { TurboAssembler::LoadZeroIfNotFPUCondition(dst); diff --git a/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/src/wasm/baseline/mips64/liftoff-assembler-mips64.h index 55020dc882..9c87dca733 100644 --- a/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +++ b/src/wasm/baseline/mips64/liftoff-assembler-mips64.h @@ -1098,25 +1098,25 @@ inline FPUCondition ConditionToConditionCmpFPU(Condition condition, bool* predicate) { switch (condition) { case kEqual: - predicate = true; + *predicate = true; return EQ; case kUnequal: - predicate = false; + *predicate = false; return EQ; case kUnsignedLessThan: - predicate = true; + *predicate = true; return OLT; case kUnsignedGreaterEqual: - predicate = false; + *predicate = false; return OLT; case kUnsignedLessEqual: - predicate = true; + *predicate = true; return OLE; case kUnsignedGreaterThan: - predicate = false; + *predicate = false; return OLE; default: - predicate = true; + *predicate = true; break; } UNREACHABLE();