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

Parents
  • 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.
Reply
  • 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.
Children
No data