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

UXTB only Thumb2?

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

Hi All,

Arm9 crashed on UXTB instruction because it is not able to decode it. It caused Undef-Instruction exception.

I have been trying to find if UXTB which is a Thumb2 instruction (only supported on ARMv7 onwards) is also supported by Thumb. In other words can I actually use UXTB instruction on Arm9 (ARMv5)?

Thanks a lot,
Samar
Parents
  • Note: This was originally posted on 12th February 2009 at http://forums.arm.com

    Samar,

    In ARM state, ARM9 can peform the equivalent to UXTB simply using the immediate variant of AND:
    [font="Courier New"]AND r0,r0,#0xFF[/font]

    ARM9 only implements the v5T/v5TE variant of Thumb, which does not support UXTB, and for which there is no immediate variant of AND; thus the equivalent to UXTB in Thumb state on ARM9 is:
    [font="Courier New"]LSLS r0,r0,#24
    LSRS r0,r0,#24[/font]

    hth
    s.
Reply
  • Note: This was originally posted on 12th February 2009 at http://forums.arm.com

    Samar,

    In ARM state, ARM9 can peform the equivalent to UXTB simply using the immediate variant of AND:
    [font="Courier New"]AND r0,r0,#0xFF[/font]

    ARM9 only implements the v5T/v5TE variant of Thumb, which does not support UXTB, and for which there is no immediate variant of AND; thus the equivalent to UXTB in Thumb state on ARM9 is:
    [font="Courier New"]LSLS r0,r0,#24
    LSRS r0,r0,#24[/font]

    hth
    s.
Children
No data