We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi i am trying to understand ARM NEON instruction and encountered with vqrdmulh instruction.
i am particularly interested in saturation case in instruction i am not getting any case with saturation .
Can any one explain me with an example
for example:
vqrdmulh.s16 d0 d1,d3
in 16 bit element we have a maximum of 0x7FFF (maximum of signed short)
taking an element a max we have 0x7FFF *0x7FFF = 3FFF 0001 and doubling we have 7FFE 0002
so i have left with no case where there is saturation in picture with any set of input if i am wrong explain me with an input
and whats the order of execution is it multiplication followed by rounding ,double, saturation and taking upper high. correct me if wrong
thanking you
Message was edited by: b uma mahesh
Negative minimums are more interesting as they have a larger absolute value. In "real maths" the two minimums will give:
In binary 2's complement this is 0x80000000, so if you don't saturate then the actual signed result effectively inverts the real answer to minus 2147483648 which is very very wrong =) With saturation you will get a positive 0x7FFFFFFF (2147483647) [of which you only keep the high half, so 0x7FFF ends up in registers].
HTH, Pete