From: Daniil Ruban Date: Thu, 7 Mar 2024 12:06:05 +0000 (+0100) Subject: Fix build x86_64 and i586 X-Git-Tag: submit/tizen/20240311.160013~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02c62914cf50fcd4df2eef6550fa0639d3b9303e;p=platform%2Fframework%2Fweb%2Fchromium-efl.git Fix build x86_64 and i586 * Removes constexpr in `v8/src/codegen/x64/assembler-x64.h` and `v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h` Change-Id: I5d50bdf03f544d25d111df83a99dfb10fb362d8d --- diff --git a/v8/src/codegen/x64/assembler-x64.h b/v8/src/codegen/x64/assembler-x64.h index e4ba4541edcf..f7f15969c487 100644 --- a/v8/src/codegen/x64/assembler-x64.h +++ b/v8/src/codegen/x64/assembler-x64.h @@ -219,7 +219,11 @@ class V8_EXPORT_PRIVATE Operand { "Length must be aligned for fast access."); // [base + disp/r] - V8_INLINE constexpr Operand(Register base, int32_t disp) { + V8_INLINE +#if !defined(__GNUC__) || defined(__clang__) + constexpr +#endif + Operand(Register base, int32_t disp) { if (base == rsp || base == r12) { // SIB byte is needed to encode (rsp + offset) or (r12 + offset). set_sib(times_1, rsp, base); @@ -328,7 +332,11 @@ class V8_EXPORT_PRIVATE Operand { memory_.len = 2; } - V8_INLINE constexpr void set_disp8(int disp) { + V8_INLINE +#if !defined(__GNUC__) || defined(__clang__) + constexpr +#endif + void set_disp8(int disp) { V8_ASSUME(memory_.len == 1 || memory_.len == 2); DCHECK(is_int8(disp)); memory_.buf[memory_.len] = disp; diff --git a/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h b/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h index 74b6da2d1d35..fbbc7547b0de 100644 --- a/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h +++ b/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h @@ -48,13 +48,19 @@ constexpr int kInstanceOffset = 16; // rbp-24 is the feedback vector. constexpr int kFeedbackVectorOffset = 24; -inline constexpr Operand GetStackSlot(int offset) { +inline +#if !defined(__GNUC__) || defined(__clang__) + constexpr +#endif +Operand GetStackSlot(int offset) { return Operand(rbp, -offset); } +#if !defined(__GNUC__) || defined(__clang__) constexpr Operand kInstanceOperand = GetStackSlot(kInstanceOffset); constexpr Operand kOSRTargetSlot = GetStackSlot(kOSRTargetOffset); +#endif inline Operand GetMemOp(LiftoffAssembler* assm, Register addr, Register offset_reg, uintptr_t offset_imm, @@ -287,7 +293,7 @@ void LiftoffAssembler::AbortCompilation() {} // static constexpr int LiftoffAssembler::StaticStackFrameSize() { - return kOSRTargetOffset; + return v8::internal::wasm::kOSRTargetOffset; } int LiftoffAssembler::SlotSizeForType(ValueKind kind) { @@ -341,7 +347,11 @@ void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value) { } void LiftoffAssembler::LoadInstanceFromFrame(Register dst) { +#if !defined(__GNUC__) || defined(__clang__) movq(dst, liftoff::kInstanceOperand); +#else + movq(dst, liftoff::GetStackSlot(liftoff::kInstanceOffset)); +#endif } void LiftoffAssembler::LoadFromInstance(Register dst, Register instance, @@ -388,11 +398,19 @@ void LiftoffAssembler::LoadExternalPointer(Register dst, Register src_addr, } void LiftoffAssembler::SpillInstance(Register instance) { +#if !defined(__GNUC__) || defined(__clang__) movq(liftoff::kInstanceOperand, instance); +#else + movq(liftoff::GetStackSlot(liftoff::kInstanceOffset), instance); +#endif } void LiftoffAssembler::ResetOSRTarget() { +#if !defined(__GNUC__) || defined(__clang__) movq(liftoff::kOSRTargetSlot, Immediate(0)); +#else + movq(liftoff::GetStackSlot(v8::internal::wasm::kOSRTargetOffset), Immediate(0)); +#endif } void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, @@ -4360,7 +4378,11 @@ void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { } void LiftoffAssembler::MaybeOSR() { +#if !defined(__GNUC__) || defined(__clang__) cmpq(liftoff::kOSRTargetSlot, Immediate(0)); +#else + cmpq(liftoff::GetStackSlot(v8::internal::wasm::kOSRTargetOffset), Immediate(0)); +#endif j(not_equal, static_cast
(Builtin::kWasmOnStackReplace), RelocInfo::WASM_STUB_CALL); }