This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

IT arm asm

Note: This was originally posted on 14th December 2009 at http://forums.arm.com

Hi,

When disassembling with IDA an arm binary I can see the following:

__text:000049CA                 RSBS.W  R3, R2, #1    ;R3 = 1 - var_height
__text:000049CE                 IT CC
__text:000049D0                 MOVCC   R3, #0
__text:000049D2                 CMP     R0, #0
__text:000049D4                 ITE NE
__text:000049D6                 MOVNE   R4, R3
__text:000049D8                 ORREQ.W R4, R3, #1
__text:000049DC                 MOV     R5, R0

I cannot find references about IT/ITE opcode, where can I find it ?

Thanks
  • Note: This was originally posted on 15th December 2009 at http://forums.arm.com

    mosfet,

    "[font="Courier New"]IT CC[/font]" is adding the "[font="Courier New"]CC[/font]" to "[font="Courier New"]MOVCC[/font]", whilst "[font="Courier New"]ITE NE[/font]" is adding the "[font="Courier New"]NE[/font]" to "[font="Courier New"]MOVNE[/font]" and the "[font="Courier New"]EQ[/font]" to "[font="Courier New"]ORREQ[/font]" respectively. Various combinations of "[font="Courier New"]T[/font]" and "[font="Courier New"]E[/font]" can be used, for example, had "[font="Courier New"]ITE NE[/font]" been "[font="Courier New"]ITT NE[/font]", then the "[font="Courier New"]ORREQ[/font]" would have been "[font="Courier New"]ORRNE[/font]", i.e. "[font="Courier New"]T[/font]" implies the given condition, whilst "[font="Courier New"]E[/font]" implies its inverse.

    hth
    s.
  • Note: This was originally posted on 15th December 2009 at http://forums.arm.com

    Hi,

    When disassembling with IDA an arm binary I can see the following:

    __text:000049CA                 RSBS.W  R3, R2, #1    ;R3 = 1 - var_height
    __text:000049CE                 IT CC
    __text:000049D0                 MOVCC   R3, #0
    __text:000049D2                 CMP     R0, #0
    __text:000049D4                 ITE NE
    __text:000049D6                 MOVNE   R4, R3
    __text:000049D8                 ORREQ.W R4, R3, #1
    __text:000049DC                 MOV     R5, R0

    I cannot find references about IT/ITE opcode, where can I find it ?

    Thanks


    Hi,mosfet

        IT means "If-Then",it is a 16-bit new thumb instruction after ARM-v6T2,ARM-v7 architecture.
    you can find it in Cortex-M3 reference maunal or ARM-v7 reference maunal,or Thumb instructions reference maunal.

        best regards!