[llvm] [WebAssembly] MC support for acquire-release atomics (PR #183656)
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 13:55:05 PST 2026
================
@@ -370,6 +371,30 @@ void WebAssemblyInstPrinter::printWebAssemblyP2AlignOperand(const MCInst *MI,
O << ":p2align=" << Imm;
}
+void WebAssemblyInstPrinter::printWebAssemblyMemOrderOperand(const MCInst *MI,
----------------
dschuff wrote:
I think the STI field on the InstPrinter was left over from an earlier version where we print the memory ordering when shared-everything is enabled. Later I changed it to always omit the ordering when it's seqcst regardless of whether shared-everything is enabled (for smaller binary encoding and also to get backwards binary compatibility in case all atomics are sqcst; and also do the same for text just for consistency). That made the STI unnecessary (just early-return below) but I failed to completely clean up this function and the leftover field.
You could make a case that the behavior should always reflect the feature enablement (at the cost of the above advantages). Or that the text format should reflect the feature enablement for clarity, (but at the cost of inconsistency with binary). Happy to hear opinions on that.
https://github.com/llvm/llvm-project/pull/183656
More information about the llvm-commits
mailing list