From 7b060d0d8631b569c60d32a874deb5a5925961f1 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Tue, 30 Sep 2025 20:51:21 -0700 Subject: [PATCH] disasm: show the acquire and release attribute to amo instructions Signed-off-by: Chih-Min Chao --- disasm/disasm.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/disasm/disasm.cc b/disasm/disasm.cc index 49f27943..38da809a 100644 --- a/disasm/disasm.cc +++ b/disasm/disasm.cc @@ -637,7 +637,17 @@ static void NOINLINE add_fstore_insn(disassembler_t* d, const char* name, uint32 static void NOINLINE add_xamo_insn(disassembler_t* d, const char* name, uint32_t match, uint32_t mask) { - d->add_insn(new disasm_insn_t(name, match, mask, {&xrd, &xrs2, &base_only_address})); + const char *suffix[] = {"", ".rl", ".aq", ".aqrl"}; + char new_name[128]; + uint32_t new_mask = mask | (0x3 << 25); + uint32_t new_match; + + for (uint32_t idx = 0; idx < sizeof(suffix) / sizeof(suffix[0]); ++idx) { + snprintf(new_name, sizeof(new_name), "%s%s", name, suffix[idx]); + new_match = match | (idx << 25); + + d->add_insn(new disasm_insn_t(new_name, new_match, new_mask, {&xrd, &xrs2, &base_only_address})); + } } static void NOINLINE add_xlr_insn(disassembler_t* d, const char* name, uint32_t match, uint32_t mask)