Arm Community
Site
Search
User
Site
Search
User
Support forums
Architectures and Processors forum
UXTB only Thumb2?
Jump...
Cancel
State
Accepted Answer
+1
person also asked this
people also asked this
Locked
Locked
Replies
4 replies
Subscribers
348 subscribers
Views
5768 views
Users
0 members are here
Arm9
Thumb
Thumb2
Options
Share
More actions
Cancel
Related
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?
Samar Samar
over 12 years ago
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
Top replies
Peter Harris
over 12 years ago
+1
verified
Note: This was originally posted on 12th February 2009 at http://forums.arm.com UXTB was added in ARMv6 for both ARM and Thumb. It is also in Thumb2, as Thumb2 is a superset of the original Thumb instruction...
Parents
0
Simon Craske
over 12 years ago
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.
Cancel
Vote up
0
Vote down
Cancel
Reply
0
Simon Craske
over 12 years ago
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.
Cancel
Vote up
0
Vote down
Cancel
Children
No data