Is there any instruction decoder for the ARM v7-M Instruction Set, that I can just give it an opcode as parameter and return me with the corresponding instruction type?
For example: MOV Rd, <op2>
has four different versions depending on the <op2>
.
- A simple register specifier, for example Rm.
- An immediate shifted register, for example Rm, LSL #4.
- A register shifted register, for example Rm, LSL Rs.
- An immediate value, for example #0xE000E000.
I want to know which of this version it is from the opcode of the instruction?
Editors note: opcode means the actual 'hex' instruction or machine encoding. The question is about the assembler mnemonic. On many CPUs a leading mnemonic may map to different opcodes (or machine instructions) depending on the arguments.
Yes, it's called a disassembler. Put the op code in an assembly file, build it, and then disassemble it.