SIMD ISAReturn TypeNameArgumentsInstruction Group
Neonuint32x4_tvsm3tt2aq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t c, const int imm2)Cryptography / SM3
Description
SM3TT2A takes three 128-bit vectors from three source SIMD&FP register and a 2-bit immediate index value, and returns a 128-bit result in the destination SIMD&FP register. It performs a three-way exclusive OR of the three 32-bit fields held in the upper three elements of the first source vector, and adds the resulting 32-bit value and the following three other 32-bit values:
Results
Vd.4S result
This intrinsic compiles to the following instructions:

SM3TT2A Vd.4S,Vn.4S,Vm.4S[imm2]

Argument Preparation
a register: Vd.4Sb c imm2 minimum: 0; maximum: 3
Architectures
A64

Operation

AArch64.CheckFPAdvSIMDEnabled();

bits(128) Vm = V[m];
bits(128) Vn = V[n];
bits(128) Vd = V[d];
bits(32) Wj;
bits(128) result; 
bits(32) TT2;

Wj = Elem[Vm,i,32];
TT2 = Vd<63:32> EOR (Vd<127:96> EOR Vd<95:64>);
TT2 = (TT2 + Vd<31:0> + Vn<127:96> + Wj)<31:0>;

result<31:0> = Vd<63:32>;
result<63:32> = ROL(Vd<95:64>,19); 
result<95:64> = Vd<127:96>; 
result<127:96> = TT2 EOR ROL(TT2,9) EOR ROL(TT2,17); 
V[d] = result;