<?xml version="1.0" ?><?xml-stylesheet type="text/xsl" encoding="UTF-8" href="iform.xsl" version="1.0"?><!DOCTYPE instructionsection  PUBLIC '-//ARM//DTD instructionsection //EN'  'iform-p.dtd'><!-- Copyright (c) 2010-2026 Arm Limited or its affiliates. All rights reserved. --><!-- This document is Non-Confidential. This document may only be used and distributed in accordance with the terms of the agreement entered into by Arm and the party that Arm delivered this document to. --><instructionsection id="SM3TT1B_advsimd" title="SM3TT1B -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="advsimd"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="SM3TT1B"/>
  </docvars>
  <heading>SM3TT1B</heading>
  <desc>
    <brief>
      <para>SM3TT1B</para>
    </brief>
    <authored>
      <para>This instruction takes three 128-bit vectors from three source SIMD&amp;FP
registers and a 2-bit immediate index value, and returns a 128-bit
result in the destination SIMD&amp;FP register. It performs a 32-bit
majority function between 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:</para>
      <list type="unordered">
        <listitem>
          <content>The bottom 32-bit element of the first source vector, Vd, that was used
  for the 32-bit majority function.</content>
        </listitem>
        <listitem>
          <content>The result of the exclusive-OR of the top 32-bit element of the
  second source vector, Vn, with a rotation left by 12 of the top
  32-bit element of the first source vector.</content>
        </listitem>
        <listitem>
          <content>A 32-bit element indexed out of the third source vector, Vm.</content>
        </listitem>
      </list>
      <para>The result of this addition is returned as the top element of the
result. The other elements of the result are taken from elements of
the first source vector, with the element returned in bits&lt;63:32&gt;
being rotated left by 9.</para>
    </authored>
  </desc>
  <operationalnotes>
    <operationalnote>
      <operationalnote_content>
        <para>This instruction is a data-independent-time instruction as described in <xref linkend="ARMARM_BEICCDDAB3">About PSTATE.DIT</xref>.</para>
      </operationalnote_content>
    </operationalnote>
  </operationalnotes>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="Advanced SIMD" oneof="1" id="iclass_advanced_simd" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="instr-class" value="advsimd"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="SM3TT1B"/>
      </docvars>
      <iclassintro count="1"/>
      <arch_variants>
        <arch_variant feature="FEAT_SM3" name="v8Ap2"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.simd_dp.crypto3_imm2.SM3TT1B_VVV4_crypto3_imm2" tworows="1">
        <box hibit="31" width="4" settings="4">
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="27" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="24" width="2" settings="2">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="22" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="20" width="5" name="Rm" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="15" width="2" settings="2">
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="13" width="2" name="imm2" usename="1">
          <c colspan="2"/>
        </box>
        <box hibit="11" width="2" name="opcode" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="9" width="5" name="Rn" usename="1">
          <c colspan="5"/>
        </box>
        <box hibit="4" width="5" name="Rd" usename="1">
          <c colspan="5"/>
        </box>
      </regdiagram>
      <encoding name="SM3TT1B_VVV4_crypto3_imm2" oneofinclass="1" oneof="1" label="">
        <docvars>
          <docvar key="instr-class" value="advsimd"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="SM3TT1B"/>
        </docvars>
        <asmtemplate><text>SM3TT1B  </text><a hover="Is the name of the SIMD&amp;FP source and destination register, encoded in the &quot;Rd&quot; field." link="Vd__4">&lt;Vd&gt;</a><text>.4S, </text><a hover="Is the name of the second SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field." link="Vn__6">&lt;Vn&gt;</a><text>.4S, </text><a hover="Is the name of the third SIMD&amp;FP source register, encoded in the &quot;Rm&quot; field." link="Vm__7">&lt;Vm&gt;</a><text>.S[</text><a hover="Is a 32-bit element indexed out of &lt;Vm&gt;, encoded in &quot;imm2&quot;." link="index__16">&lt;imm2&gt;</a><text>]</text></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.simd_dp.crypto3_imm2.SM3TT1B_VVV4_crypto3_imm2" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_SM3) then <a link="func_EndOfDecode_1" file="shared_pseudocode.xml">EndOfDecode</a>(<a link="enum_Decode_UNDEF" file="shared_pseudocode.xml">Decode_UNDEF</a>); end;
let d : integer{} = UInt(Rd);
let n : integer{} = UInt(Rn);
let m : integer{} = UInt(Rm);
let i : integer = UInt(imm2);</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="SM3TT1B_VVV4_crypto3_imm2" symboldefcount="1">
      <symbol link="Vd__4">&lt;Vd&gt;</symbol>
      <account encodedin="Rd">
        <intro>
          <para>Is the name of the SIMD&amp;FP source and destination register, encoded in the &quot;Rd&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="SM3TT1B_VVV4_crypto3_imm2" symboldefcount="1">
      <symbol link="Vn__6">&lt;Vn&gt;</symbol>
      <account encodedin="Rn">
        <intro>
          <para>Is the name of the second SIMD&amp;FP source register, encoded in the &quot;Rn&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="SM3TT1B_VVV4_crypto3_imm2" symboldefcount="1">
      <symbol link="Vm__7">&lt;Vm&gt;</symbol>
      <account encodedin="Rm">
        <intro>
          <para>Is the name of the third SIMD&amp;FP source register, encoded in the &quot;Rm&quot; field.</para>
        </intro>
      </account>
    </explanation>
    <explanation enclist="SM3TT1B_VVV4_crypto3_imm2" symboldefcount="1">
      <symbol link="index__16">&lt;imm2&gt;</symbol>
      <account encodedin="imm2">
        <intro>
          <para>Is a 32-bit element indexed out of &lt;Vm&gt;, encoded in &quot;imm2&quot;.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.simd_dp.crypto3_imm2.SM3TT1B_VVV4_crypto3_imm2" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="func_AArch64_CheckFPAdvSIMDEnabled_0" file="shared_pseudocode.xml">AArch64_CheckFPAdvSIMDEnabled</a>();

let Vm : bits(128) = V{}(m);
let Vn : bits(128) = V{}(n);
let Vd : bits(128) = V{}(d);

var WjPrime : bits(32);
var result : bits(128);
var TT1 : bits(32);
var SS2 : bits(32);

WjPrime = Vm[i*:32];
SS2 = Vn[127:96] XOR ROL(Vd[127:96], 12);
TT1 = (Vd[127:96] AND Vd[63:32]) OR (Vd[127:96] AND Vd[95:64]) OR (Vd[63:32] AND Vd[95:64]);
TT1 = (TT1 + Vd[31:0] + SS2 + WjPrime)[31:0];
result[31:0] = Vd[63:32];
result[63:32] = ROL(Vd[95:64], 9);
result[95:64] = Vd[127:96];
result[127:96] = TT1;
<a link="accessor_V_2" file="shared_pseudocode.xml">V</a>{128}(d) = result;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-26 20:27:25</timestamp>
  <commit_id>2026-03_rel</commit_id>
</instructionsection>