opcodes: microblaze: annotate mbar sleep modes
Improves MicroBlaze disassembler output for 'mbar' instructions to show sleep modes and skipped waits.
This patch enhances the disassembly output for MicroBlaze ‘mbar’ instructions. It annotates instructions that enter sleep modes (sleep, hibernate, suspend) and indicates which memory waits (instruction-side, data-side) are skipped based on the instruction’s immediate value. This provides clearer information to users when interpreting ‘mbar’ instructions, especially those involving different wait behaviors.
- proposer
Enhances the MicroBlaze disassembler to provide more detailed annotations for 'mbar' instructions related to sleep modes and waits.
“An mbar other than sleep, hibernate and suspend can still enter a sleep mode. In UG984's pseudocode for mbar, IMM & 24 selects the mode, and IMM & 1 and IMM & 2 skip the instruction-side and data-side waits. Print that as a comment, in the "// " form already used for branch targets:”
In Details
This patch modifies the MicroBlaze disassembler's handling of the mbar (memory barrier) instruction in opcodes/microblaze-dis.c. It interprets the instruction's immediate field to identify specific sleep modes (sleep, hibernate, suspend) and whether instruction-side or data-side waits are skipped. This information is appended as comments to the disassembled output, e.g., mbar 17 // sleep, without the instruction-side wait, providing a more precise understanding of the barrier's behavior beyond just the mnemonic.
- mbar
- A memory barrier instruction used in some architectures to enforce ordering of memory operations.
- disassembler
- A program that translates machine code into assembly language.
- MicroBlaze
- A soft processor core from Xilinx, designed to be implemented in FPGAs. It has a RISC-like architecture.
- UG984
- A specific user guide or technical reference manual for the MicroBlaze processor.
- immediate value
- A constant value embedded directly within an instruction.