Commit 24110ef0 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm][liftoff] Implement atomic.fence

R=clemensb@chromium.org

Bug: v8:10108
Change-Id: I3bdb4c2abe0b1db1babec370921463dbdfcd0a32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2074403
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66544}
parent 8c8bd658
......@@ -582,6 +582,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { dmb(ISH); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -382,6 +382,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { Dmb(InnerShareable, BarrierAll); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -519,6 +519,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { mfence(); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -465,6 +465,8 @@ class LiftoffAssembler : public TurboAssembler {
uint32_t offset_imm, LiftoffRegister result,
StoreType type);
inline void AtomicFence();
inline void LoadCallerFrameSlot(LiftoffRegister, uint32_t caller_slot_idx,
ValueType);
inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
......
......@@ -2564,9 +2564,7 @@ class LiftoffCompiler {
#undef ATOMIC_LOAD_LIST
#undef ATOMIC_BINOP_INSTRUCTION_LIST
void AtomicFence(FullDecoder* decoder) {
unsupported(decoder, kAtomics, "atomic.fence");
}
void AtomicFence(FullDecoder* decoder) { __ AtomicFence(); }
void MemoryInit(FullDecoder* decoder,
const MemoryInitImmediate<validate>& imm, const Value& dst,
const Value& src, const Value& size) {
......
......@@ -568,6 +568,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { sync(); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -484,6 +484,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { sync(); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -170,6 +170,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { sync(); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -169,6 +169,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
bailout(kAtomics, "AtomicXor");
}
void LiftoffAssembler::AtomicFence() { bailout(kAtomics, "AtomicFence"); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
......@@ -573,6 +573,8 @@ void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
offset_reg, offset_imm, value, type);
}
void LiftoffAssembler::AtomicFence() { mfence(); }
void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
uint32_t caller_slot_idx,
ValueType type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment