MicroBlaze: fix decoding bugs, test every instruction
Fixes four instruction decoding bugs in MicroBlaze binutils and adds a test for all instructions.
This series addresses four bugs in the MicroBlaze instruction decoder and disassembler within binutils. The hand-written opcode table has been corrected, improving the accuracy of objdump and the integrated simulator. A new test suite has been added to cover all 278 instructions, aiming to catch regressions.
- proposer
Submits a series of patches to fix instruction decoding bugs in the MicroBlaze binutils. The series also adds a test to cover every instruction, addressing inaccuracies in objdump and the simulator.
“The MicroBlaze opcode table in opcodes/microblaze-opc.h is written by hand, and the gas testsuite checks the disassembly of only 26 of its 278 instructions. This series fixes four decoding bugs in the table and the disassembler, explains some mbar forms, removes one instruction that no documentation defines, and adds a test that covers every instruction.”
In Details
This series targets the MicroBlaze's instruction decoding logic within binutils, specifically within opcodes/microblaze-opc.h. The bugs affect how objdump and the bundled simulator (sim/microblaze) interpret certain instructions due to errors in the manually maintained opcode table. The fix ensures correct disassembly and simulation, with a new test suite aiming for 100% instruction coverage.
- MicroBlaze
- A soft processor core from Xilinx, commonly used in FPGAs. Binutils provides tools like the assembler (gas), disassembler (objdump), and debugger (GDB) for this architecture.
- opcode table
- A data structure used by assemblers and disassemblers to map instruction mnemonics and their operands to their binary representations (opcodes), and vice versa.
- disassembler
- A tool (like objdump) that converts machine code (binary instructions) back into human-readable assembly language.
- simulator
- A program that mimics the behavior of a hardware processor, allowing software to be run and tested without the actual hardware. In this context, it refers to the MicroBlaze simulator integrated with binutils.
- gas
- The GNU Assembler, part of the GNU Binutils package. It translates assembly code into machine code.
- objdump
- A GNU Binutils tool that displays information from object files, including disassembly of the code sections.