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

What is the equivalent instruction for QSUB in ARMv8?

This is sort of intriguing for me. I couldn't find any saturation instructions using  general purpose register in ARMv8. However, there are saturation instructions for Neon registers I couldn't find the same involving general purpose register. Can anyone suggest the alternative of implementing such instructions such as QSUB in ARMv8 architecture?   

Parents
  • All the saturating and DSP type instructions using the general registers were dropped in the 64 bit ARMv8 instruction set, anything like that has to be done using the SIMD facility or a sequence of instructions. There's been a few queries about that if you search for 'saturating'.

    In C you can use __builtin_ssub_overflow to check for overflow and set the result appropriately without needing strange sequences of logical operations.

Reply
  • All the saturating and DSP type instructions using the general registers were dropped in the 64 bit ARMv8 instruction set, anything like that has to be done using the SIMD facility or a sequence of instructions. There's been a few queries about that if you search for 'saturating'.

    In C you can use __builtin_ssub_overflow to check for overflow and set the result appropriately without needing strange sequences of logical operations.

Children