Page 368 - ARM 64 Bit Assembly Language
P. 368

358 Chapter 10

                  10.6.7.1 Syntax

                       (s|u)<op>{p}     Vd.T, Vn.T, Vm.T
                       f<op>{p}         Vd.Tf, Vn.Tf, Vm.Tf



                  •  <op> is either max or min.
                  •  T must be 8b, 16b, 4h, 8h, 2s,or 4s.
                  •  Tf must be 2s, 4s,or 2d.
                  •  If nm is present, then the result is as described in Chapter 9, Section 9.7.5,onpage 311.


                  10.6.7.2 Operations

                   Name            Effect                           Description
                   (s|u|f)max      n ← # of elements                Compare corresponding elements
                                   for 0 ≤ i< n do                  and copy the greater of each pair
                                     if Vn[i] > Vm[i] then          into the corresponding element in
                                      Vd[i]← Vn[i]                  the destination vector.
                                     else
                                      Vd[i]← Vm[i]
                                     end if
                                   end for
                   (s|u|f)maxp     n ← # of elements                Compare elements pairwise and
                                   for 0 ≤ i< (n ÷ 2) do            copy the greater of each pair into
                                     if Vm[i] > Vm[i + 1] then      an element in the destination vec-
                                      Vd[i]← Vm[i]                  tor.
                                     else
                                      Vd[i]← Vm[i + 1]
                                     end if
                                   end for
                                   for (n ÷ 2) ≤ i< n do
                                     if Vn[i] > Vn[i + 1] then
                                      Vd[i + (n ÷ 2)]← Vn[i]
                                     else
                                      Vd[i + (n ÷ 2)]←
                                       Vn[i + 1]
                                     end if
                                   end for
                                                                                continued on next page
   363   364   365   366   367   368   369   370   371   372   373