How to implement saturation instructions in ARMv8 architecture?

Is there a way to write an equivalent of 32-bit saturation instruction such  as QADD or QSUB without using neon saturation instructions for Armv8 architecture?  

Parents
  • Thank you Peter for replying. I know it is pretty straightforward in C but I want to implement it in assembly and that too in ARMv8 architecture. The thing is that in ARMv7 we have a single instruction for that i.e. QADD. But we don't have such instruction in v8 so we need to use neon instruction such as SQADD. Do we have a single instruction to perform such operation in v8?
Reply
  • Thank you Peter for replying. I know it is pretty straightforward in C but I want to implement it in assembly and that too in ARMv8 architecture. The thing is that in ARMv7 we have a single instruction for that i.e. QADD. But we don't have such instruction in v8 so we need to use neon instruction such as SQADD. Do we have a single instruction to perform such operation in v8?
Children