Skip to content

Commit

Permalink
PPC [flags] Protect individual flag updates
Browse files Browse the repository at this point in the history
Port: f149912

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 <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80972}
  • Loading branch information
miladfarca authored and V8 LUCI CQ committed Jun 7, 2022
1 parent 4903f94 commit 9d0a093
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/baseline/baseline-batch-compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ BaselineBatchCompiler::~BaselineBatchCompiler() {

void BaselineBatchCompiler::InstallBatch() { UNREACHABLE(); }

void BaselineBatchCompiler::EnqueueFunction(Handle<JSFunction> function) {
UNREACHABLE();
}

} // namespace baseline
} // namespace internal
} // namespace v8
Expand Down
7 changes: 4 additions & 3 deletions src/codegen/ppc/assembler-ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/execution/ppc/frame-constants-ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions src/wasm/baseline/ppc/liftoff-assembler-ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 9d0a093

Please sign in to comment.