0

I am reading the ARMv7 architecture reference manual in order to implement a arm disassembler. In the annexe P.2.1 about the pseudo code, page 2644, it is written :

"If there are multiple matching encoding diagrams [matching for an instruction], all but one of the corresponding pieces of pseudocode must contain a special case that indicates that it does not apply."

I wonder which special cases are include there. Of course there is the statement "SEE", but is it the only one which dismiss the encoding ? In other words, if there are severals encoding that match the instruction, are all of them but one encounter a "SEE" statement, or could it have also statement like "UNDEFINED", "UNPREDICTABLE", "IMPLEMENTATION_DEFINED" or "SUBARCHITECTURE_DEFINED", or something else that I miss ?

I think "SEE" should be the only one, because the other statements can occurs when there is only one encoding that match, and expect to do some actions to handle it. But then, why it is not specified in the line I have quote above that the special case is the "SEE" statement ? I am afraid of missing something...

Thanks you very much for your help !

  • This is a description of the *pseudo-code* used to describe the ARM instructions with the *reference manual*. See `LDRT` for example; it has lots of special cases. I don't believe it means a different *mnemonic* for disassembly, but a different *pseudo-code* use; Ie, different semantics. The **SEE**, just means look at that one to get a description. – artless noise May 28 '13 at 16:52
  • 1
    I am thinking along the lines of nop vs mov r0,r0. – old_timer May 29 '13 at 03:02
  • In the ARMv7A document, it looks like `nop` is defined as `msr cpsr_null,#0`. Ie, an immediate with a mask that makes the instruction impotent. The `msr` op-code does have *SEE "related encodings"*. Others include `B`, `IT`, `LDRD`, `STRD`,`VABA/VABAL`,`VABD/VABDL`, etc. It looks like the *NEON* op-codes are *rich* in these encodings. – artless noise May 29 '13 at 14:14

0 Answers0