Reputation: 373
I would like to know how vminnm
is working. Since the pseudo-code is bit unclear, I am not able to understand what is the exact function of this instruction.
vminnm.f32 d3, d5, d13
where
d5 = 0xffd5432100000000
d13 = 0x7ff0056000000000
Result:
d3 = 0x7fc0000000000000
How we are arriving with this result ?
Upvotes: 0
Views: 149
Reputation: 1483
This is the definition on the ARM Reference Manual for that instruction. (NaN is Not a Number, that means that the value is not a valid floating point number.)
VMINNM
This instruction determines the floating point minimum number. It handles NaNs in consistence with the IEEE754-2008 specification. It returns the numerical operand when one operand is numerical and the other is a quiet NaN, but otherwise the result is identical to floating-point VMIN . This instruction is not conditional.
vminnm.f32 d3, d5, d13
In your example, the values in d5 and d13 are compared and the result of the comparison is stored in d3. Take into consideration that you are dealing with vectors and you have two elements in each vector, which are 32-bit floating point each.
The value 0xffd5432100000000 is a valid 64-bit double, but not two 32-bit floating point, i.e 0xffd54321 is not a number and 0x00000000 is 0, so when you compare these values you need to be aware of the width of the values you are comparing. (You can check the values of floating points here.)
Upvotes: 1