From 9d0a09368569234a1d1094975e2e92591922cd08 Mon Sep 17 00:00:00 2001 From: Milad Fa Date: Fri, 3 Jun 2022 14:44:53 -0400 Subject: [PATCH] PPC [flags] Protect individual flag updates Port: f149912f337ca7ddb1dad734aab02eaf9bf76dcf Drive-by: Defined EnqueueFunction under baseline-batch-compiler for platforms without spakrplug support, currently getting a link error when making a debug build. Bug: v8:12887 Change-Id: I4fc8584ef09ad024280f7e40554a5e73a207b64f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688474 Reviewed-by: Junliang Yan Commit-Queue: Milad Farazmand Reviewed-by: Leszek Swirski Cr-Commit-Position: refs/heads/main@{#80972} --- src/baseline/baseline-batch-compiler.cc | 4 ++++ src/codegen/ppc/assembler-ppc.h | 7 ++++--- src/execution/ppc/frame-constants-ppc.h | 6 +++--- src/wasm/baseline/ppc/liftoff-assembler-ppc.h | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/baseline/baseline-batch-compiler.cc b/src/baseline/baseline-batch-compiler.cc index 7c98380d56dd..0c4eeb7fc2ee 100644 --- a/src/baseline/baseline-batch-compiler.cc +++ b/src/baseline/baseline-batch-compiler.cc @@ -399,6 +399,10 @@ BaselineBatchCompiler::~BaselineBatchCompiler() { void BaselineBatchCompiler::InstallBatch() { UNREACHABLE(); } +void BaselineBatchCompiler::EnqueueFunction(Handle function) { + UNREACHABLE(); +} + } // namespace baseline } // namespace internal } // namespace v8 diff --git a/src/codegen/ppc/assembler-ppc.h b/src/codegen/ppc/assembler-ppc.h index 83b884c9e8f1..4bed281b6ef4 100644 --- a/src/codegen/ppc/assembler-ppc.h +++ b/src/codegen/ppc/assembler-ppc.h @@ -310,9 +310,10 @@ class Assembler : public AssemblerBase { static constexpr int kMovInstructionsNoConstantPool = 2; static constexpr int kTaggedLoadInstructions = 1; #endif - static constexpr int kMovInstructions = FLAG_enable_embedded_constant_pool - ? kMovInstructionsConstantPool - : kMovInstructionsNoConstantPool; + static constexpr int kMovInstructions = + FLAG_enable_embedded_constant_pool.value() + ? kMovInstructionsConstantPool + : kMovInstructionsNoConstantPool; static inline int encode_crbit(const CRegister& cr, enum CRBit crbit) { return ((cr.code() * CRWIDTH) + crbit); diff --git a/src/execution/ppc/frame-constants-ppc.h b/src/execution/ppc/frame-constants-ppc.h index 076eda358739..3b3591d5da0b 100644 --- a/src/execution/ppc/frame-constants-ppc.h +++ b/src/execution/ppc/frame-constants-ppc.h @@ -16,9 +16,9 @@ namespace internal { class EntryFrameConstants : public AllStatic { public: // Need to take constant pool into account. - static constexpr int kCallerFPOffset = FLAG_enable_embedded_constant_pool - ? -4 * kSystemPointerSize - : -3 * kSystemPointerSize; + static constexpr int kCallerFPOffset = + FLAG_enable_embedded_constant_pool.value() ? -4 * kSystemPointerSize + : -3 * kSystemPointerSize; }; class WasmCompileLazyFrameConstants : public TypedFrameConstants { diff --git a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h index f59610ae0d37..4c0f7aebf344 100644 --- a/src/wasm/baseline/ppc/liftoff-assembler-ppc.h +++ b/src/wasm/baseline/ppc/liftoff-assembler-ppc.h @@ -46,11 +46,11 @@ namespace liftoff { // constexpr int32_t kInstanceOffset = - (FLAG_enable_embedded_constant_pool ? 3 : 2) * kSystemPointerSize; + (FLAG_enable_embedded_constant_pool.value() ? 3 : 2) * kSystemPointerSize; constexpr int kFeedbackVectorOffset = - (FLAG_enable_embedded_constant_pool ? 4 : 3) * kSystemPointerSize; + (FLAG_enable_embedded_constant_pool.value() ? 4 : 3) * kSystemPointerSize; constexpr int kTierupBudgetOffset = - (FLAG_enable_embedded_constant_pool ? 5 : 4) * kSystemPointerSize; + (FLAG_enable_embedded_constant_pool.value() ? 5 : 4) * kSystemPointerSize; inline MemOperand GetHalfStackSlot(int offset, RegPairHalf half) { int32_t half_offset =