Page 322 - ARM 64 Bit Assembly Language
P. 322
Floating point 311
9.7.4.3 Examples
1 fmla s1,s6,s8,s1 // Multiply s8 by s6 and add to s1
2 fmla d0,d4,d5,d0 // Multiply d4 by d5 and add to d0
9.7.5 Min and max
The min(x,y) and max(x,y) operations compare two registers and set a third register to the
minimum or maximum of the two values. The instructions are:
fmax Max,
fmaxnm Max Number,
fmin Min, and
fminnm Min Number.
9.7.5.1 Syntax
f<op> Fd, Fn, Fm
• <op> is one of fmax, fmaxnm, min,or minnum.
• Fd, Fn,and Fm must specify either three single precision registers or three double preci-
sion registers.
• If one of the two values is a NaN, then fmaxnm and fminnm return the other value.
• If either of the two values is a NaN, then fmax and fmin return NaN.
• If both values are NaN, then all of these instructions produce a NaN.
9.7.5.2 Operations
Name Effect Description
fmax Fd ← max(Fn,Fm) Maximum
fmaxnm Fd ← maxNum(Fn,Fm) Maximum Number
fmin Fd ← min(Fn,Fm) Minimum
fminnm Fd ← minNum(Fn,Fm) Minimum Number
9.7.5.3 Examples
1 fmin d0, d1, d2 // d0 <- min(d1,d2)
2 fmaxnm s0, s1, s2 // s0 <- max(s1,s2)