"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);
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;
// 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,
// static
constexpr int LiftoffAssembler::StaticStackFrameSize() {
- return kOSRTargetOffset;
+ return v8::internal::wasm::kOSRTargetOffset;
}
int LiftoffAssembler::SlotSizeForType(ValueKind kind) {
}
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,
}
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,
}
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<Address>(Builtin::kWasmOnStackReplace),
RelocInfo::WASM_STUB_CALL);
}