mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
159 lines
9.3 KiB
XML
159 lines
9.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<?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-2022 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="SM3TT2A_advsimd" title="SM3TT2A -- A64" type="instruction">
|
|
<docvars>
|
|
<docvar key="instr-class" value="advsimd" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="SM3TT2A" />
|
|
</docvars>
|
|
<heading>SM3TT2A</heading>
|
|
<desc>
|
|
<brief>
|
|
<para>SM3TT2A</para>
|
|
</brief>
|
|
<authored>
|
|
<para>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:</para>
|
|
<list type="unordered">
|
|
<listitem><content>The bottom 32-bit element of the first source vector, Vd, that was used for the three-way exclusive-OR.</content></listitem>
|
|
<listitem><content>The 32-bit element held in the top 32 bits of the second source vector, Vn.</content></listitem>
|
|
<listitem><content>A 32-bit element indexed out of the third source vector, Vm.</content></listitem>
|
|
</list>
|
|
<para>A three-way exclusive-OR is performed of the result of this addition, the result of the addition rotated left by 9, and the result of the addition rotated left by 17. The result of this exclusive-OR is returned as the top element of the returned result. The other elements of this result are taken from elements of the first source vector, with the element returned in bits<63:32> being rotated left by 19.</para>
|
|
<para>This instruction is implemented only when <xref linkend="v8.2.SM3">FEAT_SM3</xref> is implemented.</para>
|
|
</authored>
|
|
</desc>
|
|
<operationalnotes>
|
|
<para>If PSTATE.DIT is 1:</para>
|
|
<list type="unordered">
|
|
<listitem><content>The execution time of this instruction is independent of:<list type="unordered"><listitem><content>The values of the data supplied in any of its registers.</content></listitem><listitem><content>The values of the NZCV flags.</content></listitem></list></content></listitem>
|
|
<listitem><content>The response of this instruction to asynchronous exceptions does not vary based on:<list type="unordered"><listitem><content>The values of the data supplied in any of its registers.</content></listitem><listitem><content>The values of the NZCV flags.</content></listitem></list></content></listitem>
|
|
</list>
|
|
</operationalnotes>
|
|
<alias_list howmany="0"></alias_list>
|
|
<classes>
|
|
<iclass name="Advanced SIMD" oneof="1" id="iclass_advsimd" no_encodings="1" isa="A64">
|
|
<docvars>
|
|
<docvar key="instr-class" value="advsimd" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="SM3TT2A" />
|
|
</docvars>
|
|
<iclassintro count="1"></iclassintro>
|
|
<arch_variants>
|
|
<arch_variant name="ARMv8.2" feature="FEAT_SM3" />
|
|
</arch_variants>
|
|
<regdiagram form="32" psname="aarch64/instrs/vector/crypto/sm3/sm3tt2a">
|
|
<box hibit="31" width="11" settings="11">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="20" width="5" name="Rm" usename="1">
|
|
<c colspan="5"></c>
|
|
</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"></c>
|
|
</box>
|
|
<box hibit="11" width="2" name="opcode" settings="2">
|
|
<c>1</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="9" width="5" name="Rn" usename="1">
|
|
<c colspan="5"></c>
|
|
</box>
|
|
<box hibit="4" width="5" name="Rd" usename="1">
|
|
<c colspan="5"></c>
|
|
</box>
|
|
</regdiagram>
|
|
<encoding name="SM3TT2A_VVV4_crypto3_imm2" oneofinclass="1" oneof="1" label="">
|
|
<docvars>
|
|
<docvar key="instr-class" value="advsimd" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="SM3TT2A" />
|
|
</docvars>
|
|
<asmtemplate><text>SM3TT2A </text><a link="sa_vd" hover="SIMD&FP source and destination register (field "Rd")"><Vd></a><text>.4S, </text><a link="sa_vn" hover="Second SIMD&FP source register (field "Rn")"><Vn></a><text>.4S, </text><a link="sa_vm" hover="Third SIMD&FP source register (field "Rm")"><Vm></a><text>.S[</text><a link="sa_imm2" hover="32-bit element indexed out of <Vm> (field "imm2")"><imm2></a><text>]</text></asmtemplate>
|
|
</encoding>
|
|
<ps_section howmany="1">
|
|
<ps name="aarch64/instrs/vector/crypto/sm3/sm3tt2a" mylink="aarch64.instrs.vector.crypto.sm3.sm3tt2a" enclabels="" sections="1" secttype="noheading">
|
|
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-shared.HaveSM3Ext.0" file="shared_pseudocode.xml" hover="function: boolean HaveSM3Ext()">HaveSM3Ext</a>() then UNDEFINED;
|
|
integer d = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rd);
|
|
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rn);
|
|
integer m = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Rm);
|
|
integer i = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(imm2);</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</iclass>
|
|
</classes>
|
|
<explanations scope="all">
|
|
<explanation enclist="SM3TT2A_VVV4_crypto3_imm2" symboldefcount="1">
|
|
<symbol link="sa_vd"><Vd></symbol>
|
|
<account encodedin="Rd">
|
|
<intro>
|
|
<para>Is the name of the SIMD&FP source and destination register, encoded in the "Rd" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="SM3TT2A_VVV4_crypto3_imm2" symboldefcount="1">
|
|
<symbol link="sa_vn"><Vn></symbol>
|
|
<account encodedin="Rn">
|
|
<intro>
|
|
<para>Is the name of the second SIMD&FP source register, encoded in the "Rn" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="SM3TT2A_VVV4_crypto3_imm2" symboldefcount="1">
|
|
<symbol link="sa_vm"><Vm></symbol>
|
|
<account encodedin="Rm">
|
|
<intro>
|
|
<para>Is the name of the third SIMD&FP source register, encoded in the "Rm" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="SM3TT2A_VVV4_crypto3_imm2" symboldefcount="1">
|
|
<symbol link="sa_imm2"><imm2></symbol>
|
|
<account encodedin="imm2">
|
|
<intro>
|
|
<para>Is a 32-bit element indexed out of <Vm>, encoded in "imm2".</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
</explanations>
|
|
<ps_section howmany="1">
|
|
<ps name="aarch64/instrs/vector/crypto/sm3/sm3tt2a" mylink="execute" enclabels="" sections="1" secttype="Operation">
|
|
<pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="AArch64.CheckFPAdvSIMDEnabled.0" file="shared_pseudocode.xml" hover="function: AArch64.CheckFPAdvSIMDEnabled()">AArch64.CheckFPAdvSIMDEnabled</a>();
|
|
|
|
bits(128) Vm = <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[m, 128];
|
|
bits(128) Vn = <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[n, 128];
|
|
bits(128) Vd = <a link="impl-aarch64.V.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) V[integer n, integer width]">V</a>[d, 128];
|
|
bits(32) Wj;
|
|
bits(128) result;
|
|
bits(32) TT2;
|
|
|
|
Wj = <a link="impl-shared.Elem.read.3" file="shared_pseudocode.xml" hover="accessor: bits(size) Elem[bits(N) vector, integer e, integer size]">Elem</a>[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> = <a link="impl-shared.ROL.2" file="shared_pseudocode.xml" hover="function: bits(N) ROL(bits(N) x, integer shift)">ROL</a>(Vd<95:64>,19);
|
|
result<95:64> = Vd<127:96>;
|
|
result<127:96> = TT2 EOR <a link="impl-shared.ROL.2" file="shared_pseudocode.xml" hover="function: bits(N) ROL(bits(N) x, integer shift)">ROL</a>(TT2,9) EOR <a link="impl-shared.ROL.2" file="shared_pseudocode.xml" hover="function: bits(N) ROL(bits(N) x, integer shift)">ROL</a>(TT2,17);
|
|
<a link="impl-aarch64.V.write.2" file="shared_pseudocode.xml" hover="accessor: V[integer n, integer width] = bits(width) value">V</a>[d, 128] = result;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</instructionsection>
|