FCMLA (vectors)

Floating-point complex multiply-add with rotate (predicated)

Multiply the duplicated real components for rotations 0 and 180, or imaginary components for rotations 90 and 270, of the floating-point complex numbers in the first source vector by the corresponding complex number in the second source vector rotated by 0, 90, 180 or 270 degrees in the direction from the positive real axis towards the positive imaginary axis, when considered in polar representation.

Then destructively add the products to the corresponding components of the complex numbers in the addend and destination vector, without intermediate rounding.

These transformations permit the creation of a variety of multiply-add and multiply-subtract operations on complex numbers by combining two of these instructions with the same vector operands but with rotations that are 90 degrees apart.

Each complex number is represented in a vector register as an even/odd pair of elements with the real part in the even-numbered element and the imaginary part in the odd-numbered element. Inactive elements in the destination vector register remain unmodified.

313029282726252423222120191817161514131211109876543210
01100100size0Zm0rotPgZnZda

FCMLA <Zda>.<T>, <Pg>/M, <Zn>.<T>, <Zm>.<T>, <const>

if !IsFeatureImplemented(FEAT_SVE) && !IsFeatureImplemented(FEAT_SME) then UNDEFINED; if size == '00' then UNDEFINED; constant integer esize = 8 << UInt(size); constant integer g = UInt(Pg); constant integer n = UInt(Zn); constant integer m = UInt(Zm); constant integer da = UInt(Zda); constant integer sel_a = UInt(rot<0>); constant integer sel_b = UInt(NOT(rot<0>)); constant boolean neg_i = (rot<1> == '1'); constant boolean neg_r = (rot<0> != rot<1>);

Assembler Symbols

<Zda>

Is the name of the third source and destination scalable vector register, encoded in the "Zda" field.

<T>

Is the size specifier, encoded in size:

size <T>
00 RESERVED
01 H
10 S
11 D
<Pg>

Is the name of the governing scalable predicate register P0-P7, encoded in the "Pg" field.

<Zn>

Is the name of the first source scalable vector register, encoded in the "Zn" field.

<Zm>

Is the name of the second source scalable vector register, encoded in the "Zm" field.

<const>

Is the const specifier, encoded in rot:

rot <const>
00 #0
01 #90
10 #180
11 #270

Operation

CheckSVEEnabled(); constant integer VL = CurrentVL; constant integer PL = VL DIV 8; constant integer pairs = VL DIV (2 * esize); constant bits(PL) mask = P[g, PL]; constant bits(VL) op1 = if AnyActiveElement(mask, esize) then Z[n, VL] else Zeros(VL); constant bits(VL) op2 = if AnyActiveElement(mask, esize) then Z[m, VL] else Zeros(VL); constant bits(VL) op3 = Z[da, VL]; bits(VL) result; for p = 0 to pairs-1 addend_r = Elem[op3, 2 * p + 0, esize]; addend_i = Elem[op3, 2 * p + 1, esize]; if ActivePredicateElement(mask, 2 * p + 0, esize) then constant bits(esize) elt1_a = Elem[op1, 2*p + sel_a, esize]; constant bits(esize) elt2_a = (if neg_r then FPNeg(Elem[op2, 2 * p + sel_a, esize], FPCR) else Elem[op2, 2 * p + sel_a, esize]); addend_r = FPMulAdd(addend_r, elt1_a, elt2_a, FPCR); if ActivePredicateElement(mask, 2 * p + 1, esize) then constant bits(esize) elt1_a = Elem[op1, 2 * p + sel_a, esize]; constant bits(esize) elt2_b = (if neg_i then FPNeg(Elem[op2, 2 * p + sel_b, esize], FPCR) else Elem[op2, 2 * p + sel_b, esize]); addend_i = FPMulAdd(addend_i, elt1_a, elt2_b, FPCR); Elem[result, 2 * p + 0, esize] = addend_r; Elem[result, 2 * p + 1, esize] = addend_i; Z[da, VL] = result;

Operational information

This instruction might be immediately preceded in program order by a MOVPRFX instruction. The MOVPRFX must conform to all of the following requirements, otherwise the behavior of the MOVPRFX and this instruction is constrained unpredictable:


Internal version only: aarchmrs v2024-03_relA, pseudocode v2024-03_rel, sve v2024-03_rel ; Build timestamp: 2024-03-26T09:45

Copyright © 2010-2024 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.