How can I get a list of legal ARM opcodes from gcc (or elsewhere)?

I would like to generate ARM pseudo-random instructions. Through assembler directives, I can tell gcc which mode I enter and it will complain if I try a set of opcodes and operands that are not legal in this mode, so it should have an internal list of what can be done in which mode Where does it live? Would it be easier to extract this information from LLVM?

Is this question “even wrong”? Should I even try a different approach?

+3
source share
2 answers

, arm.md constraints.md gcc/config/arm/. , , , . , "TARGET_THUMB1", thumb2.

+2

ARM ARM ARM (ARM Architectural Reference Manual). ARM Thumb. , (ARMvX, X - , 4 (arm7), 5 ( arm9) ..). , , , , , (, push pop).

Cortex-m3 thumb2, , TRM ( ). ARM , , , , Thumb, ARM. , ARM :

add r1,r1,r2

add r1,r2

, , , ARM- Thumb ARM . , , thumb2, ( ARM ARM Thumb for Thumb).

, , , binutils. , binutils/gnu.

+1

All Articles