Assembler
The Patch Instruction action will allow you to edit
the current assembly instruction in the listing. The first time you use the action, it may take
a moment to prepare the assembler for your processor. You can then edit the text of the
instruction, optionally replacing it altogether. As you edit, a content assists will provide
completion suggestions. It will present a list of byte sequences when the text comprises a
complete instruction. Activating a completion suggestion will input that text at your cursor.
Activating a byte sequence will complete the action, replacing the instruction at your cursor.
Pressing ESC or clicking outside of the assembly editor will cancel the action.

Assembly Editor
To edit assembly, select Patch Instruction from the
Listing View context menu or
press CTRL-SHIFT-G on the instruction to modify. Click the plus button below the content
assist to exhaust the undefined bits.
Ghidra's assembler is based on the same SLEIGH modeling that powers the disassembler. This
offers some nice benefits:
- There is no need for an external tool chain.
- The assembler and disassembler share the same mnemonic syntax.
- Most Ghidra-supported processors are also supported by the assembler.
- Processors added to Ghidra automatically get an assembler.
Keep in mind, the above list is in an ideal world. We are in the process of improving the
assembly engine and processor modules to eventually support assembly for all of Ghidra's
processors. In the meantime, we test several popular processors and assign a performance rating
to each. The possible ratings are:
- Platinum: Our automated tests did not find any errors. This offers the best
possible user experience.
- Gold: You will rarely encounter an error. You will find it very useful.
- Silver: You may occasionally encounter an error, but the assembler is still
usable. You will likely find it useful with occasional frustration.
- Bronze: You are likely to encounter errors, but there are enough working
instructions that the assembler is useful. You may find it useful, but it will probably be
frustrating.
- Poor: You are likely to encounter severe errors, and there are few instructions
that assemble. You may or may not find it useful, but we consider it unusable.
- Unrated: The processor is not tested, or the test failed before a rating could be
assigned. You might get lucky, but don't count on it.
As of this release, our tested processors fall under Platinum, Gold, or Poor.
- Platinum
- 68000:BE:32:default
- AARCH64:BE:64:v8A
- AARCH64:LE:64:v8A
- ARM:BE:32:v7
- ARM:LE:32:v7
- avr8:LE:16:extended
- MIPS:BE:32:default
- MIPS:BE:32:micro
- MIPS:BE:32:R6
- MIPS:BE:64:64-32addr
- MIPS:BE:64:R6
- MIPS:BE:64:default
- pa-risc:BE:32:default
- PowerPC:BE:32:default
- PowerPC:BE:64:A2-32addr
- PowerPC:BE:64:A2ALT-32addr
- PowerPC:BE:64:default
- sparc:BE:32:default
- sparc:BE:64:default
- SuperH4:BE:32:default
- SuperH4:LE:32:default
- TI_MSP430X:LE:32:default
- x86:LE:32:default
- Gold
- Bronze
- Poor
Provided by: Assembler plugin
Related Topics: