Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
split a 32bit value in 2 16bit value
Jump...
Cancel
Locked
Locked
Replies
2 replies
Subscribers
119 subscribers
Views
2888 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
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
split a 32bit value in 2 16bit value
Etienne SOBOLE
over 12 years ago
Parents
Gilead Kutnick
over 12 years ago
Note: This was originally posted on 22nd July 2011 at
http://forums.arm.com
There's no instruction to split two registers like that.
For parallel comparisons there's a set of instructions that performs add or subtract operations on 8-bit or 16-bit quantities and sets the GE registers based on whether or not the result overflows (there are signed and unsigned versions). Then you can use the sel instruction to conditionally select from two registers based on the GE bits.
You might be able to adapt sasx/ssax/uasx/usax to do what you want. That'll exchange the top and bottom halfwords then add one halfword and subtract the other, while setting GE.
Cancel
Vote up
0
Vote down
Cancel
Reply
Gilead Kutnick
over 12 years ago
Note: This was originally posted on 22nd July 2011 at
http://forums.arm.com
There's no instruction to split two registers like that.
For parallel comparisons there's a set of instructions that performs add or subtract operations on 8-bit or 16-bit quantities and sets the GE registers based on whether or not the result overflows (there are signed and unsigned versions). Then you can use the sel instruction to conditionally select from two registers based on the GE bits.
You might be able to adapt sasx/ssax/uasx/usax to do what you want. That'll exchange the top and bottom halfwords then add one halfword and subtract the other, while setting GE.
Cancel
Vote up
0
Vote down
Cancel
Children
No data