mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
253 lines
13 KiB
XML
253 lines
13 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="zip_mz_zz" title="ZIP (two registers)" type="instruction">
|
|
<docvars>
|
|
<docvar key="instr-class" value="mortlach2" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="ZIP" />
|
|
</docvars>
|
|
<heading>ZIP (two registers)</heading>
|
|
<desc>
|
|
<brief>Interleave elements from two vectors</brief>
|
|
<description>
|
|
<para>Place the two-way interleaved elements from the first and second source vectors in the corresponding elements of the two destination vectors.</para>
|
|
<para>This instruction is unpredicated.</para>
|
|
</description>
|
|
<status>Green</status>
|
|
<predicated>False</predicated>
|
|
<sm_policy>SM_1_only</sm_policy>
|
|
</desc>
|
|
<alias_list howmany="0"></alias_list>
|
|
<classes>
|
|
<classesintro count="2">
|
|
<txt>It has encodings from 2 classes:</txt>
|
|
<a href="#iclass_8_64_elem">8-bit to 64-bit elements</a>
|
|
<txt> and </txt>
|
|
<a href="#iclass_128_elem">128-bit element</a>
|
|
</classesintro>
|
|
<iclass name="8-bit to 64-bit elements" oneof="2" id="iclass_8_64_elem" no_encodings="1" isa="A64">
|
|
<docvars>
|
|
<docvar key="instr-class" value="mortlach2" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="ZIP" />
|
|
<docvar key="sve-elem-type" value="8-64-elem" />
|
|
</docvars>
|
|
<iclassintro count="1"></iclassintro>
|
|
<arch_variants>
|
|
<arch_variant name="FEAT_SME2" feature="FEAT_SME2" />
|
|
</arch_variants>
|
|
<regdiagram form="32" psname="ZIP-MZ.ZZ-2">
|
|
<box hibit="31" width="8" settings="8">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="23" width="2" name="size" usename="1">
|
|
<c colspan="2"></c>
|
|
</box>
|
|
<box hibit="21" settings="1">
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="20" width="5" name="Zm" usename="1">
|
|
<c colspan="5"></c>
|
|
</box>
|
|
<box hibit="15" width="6" settings="6">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="9" width="5" name="Zn" usename="1">
|
|
<c colspan="5"></c>
|
|
</box>
|
|
<box hibit="4" width="4" name="Zd" usename="1">
|
|
<c colspan="4"></c>
|
|
</box>
|
|
<box hibit="0" name="op" settings="1">
|
|
<c>0</c>
|
|
</box>
|
|
</regdiagram>
|
|
<encoding name="zip_mz_zz_2" oneofinclass="1" oneof="2" label="">
|
|
<docvars>
|
|
<docvar key="instr-class" value="mortlach2" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="ZIP" />
|
|
<docvar key="sve-elem-type" value="8-64-elem" />
|
|
</docvars>
|
|
<asmtemplate><text>ZIP </text><text>{</text><text> </text><a link="sa_zd1" hover="First destination scalable vector register of a multi-vector sequence (field Zd)"><Zd1></a><text>.</text><a link="sa_t" hover="Size specifier (field "size") [B,D,H,S]"><T></a><text>-</text><a link="sa_zd2" hover="Second destination scalable vector register of a multi-vector sequence (field Zd)"><Zd2></a><text>.</text><a link="sa_t" hover="Size specifier (field "size") [B,D,H,S]"><T></a><text> </text><text>}</text><text>, </text><a link="sa_zn" hover="First source scalable vector register (field "Zn")"><Zn></a><text>.</text><a link="sa_t" hover="Size specifier (field "size") [B,D,H,S]"><T></a><text>, </text><a link="sa_zm" hover="Second source scalable vector register (field "Zm")"><Zm></a><text>.</text><a link="sa_t" hover="Size specifier (field "size") [B,D,H,S]"><T></a></asmtemplate>
|
|
</encoding>
|
|
<ps_section howmany="1">
|
|
<ps name="ZIP-MZ.ZZ-2" mylink="ZIP-MZ.ZZ-2" enclabels="" sections="1" secttype="noheading">
|
|
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-aarch64.HaveSME2.0" file="shared_pseudocode.xml" hover="function: boolean HaveSME2()">HaveSME2</a>() then UNDEFINED;
|
|
constant integer esize = 8 << <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(size);
|
|
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zn);
|
|
integer m = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zm);
|
|
integer d = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zd:'0');</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</iclass>
|
|
<iclass name="128-bit element" oneof="2" id="iclass_128_elem" no_encodings="1" isa="A64">
|
|
<docvars>
|
|
<docvar key="instr-class" value="mortlach2" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="ZIP" />
|
|
<docvar key="sve-elem-type" value="128-elem" />
|
|
</docvars>
|
|
<iclassintro count="1"></iclassintro>
|
|
<arch_variants>
|
|
<arch_variant name="FEAT_SME2" feature="FEAT_SME2" />
|
|
</arch_variants>
|
|
<regdiagram form="32" psname="ZIP-MZ.ZZ-2Q">
|
|
<box hibit="31" width="11" settings="11">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="20" width="5" name="Zm" usename="1">
|
|
<c colspan="5"></c>
|
|
</box>
|
|
<box hibit="15" width="6" settings="6">
|
|
<c>1</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="9" width="5" name="Zn" usename="1">
|
|
<c colspan="5"></c>
|
|
</box>
|
|
<box hibit="4" width="4" name="Zd" usename="1">
|
|
<c colspan="4"></c>
|
|
</box>
|
|
<box hibit="0" name="op" settings="1">
|
|
<c>0</c>
|
|
</box>
|
|
</regdiagram>
|
|
<encoding name="zip_mz_zz_2q" oneofinclass="1" oneof="2" label="">
|
|
<docvars>
|
|
<docvar key="instr-class" value="mortlach2" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="ZIP" />
|
|
<docvar key="sve-elem-type" value="128-elem" />
|
|
</docvars>
|
|
<asmtemplate><text>ZIP </text><text>{</text><text> </text><a link="sa_zd1" hover="First destination scalable vector register of a multi-vector sequence (field Zd)"><Zd1></a><text>.Q-</text><a link="sa_zd2" hover="Second destination scalable vector register of a multi-vector sequence (field Zd)"><Zd2></a><text>.Q </text><text>}</text><text>, </text><a link="sa_zn" hover="First source scalable vector register (field "Zn")"><Zn></a><text>.Q, </text><a link="sa_zm" hover="Second source scalable vector register (field "Zm")"><Zm></a><text>.Q</text></asmtemplate>
|
|
</encoding>
|
|
<ps_section howmany="1">
|
|
<ps name="ZIP-MZ.ZZ-2Q" mylink="ZIP-MZ.ZZ-2Q" enclabels="" sections="1" secttype="noheading">
|
|
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-aarch64.HaveSME2.0" file="shared_pseudocode.xml" hover="function: boolean HaveSME2()">HaveSME2</a>() then UNDEFINED;
|
|
constant integer esize = 128;
|
|
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zn);
|
|
integer m = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zm);
|
|
integer d = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Zd:'0');</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</iclass>
|
|
</classes>
|
|
<explanations scope="all">
|
|
<explanation enclist="zip_mz_zz_2, zip_mz_zz_2q" symboldefcount="1">
|
|
<symbol link="sa_zd1"><Zd1></symbol>
|
|
<account encodedin="Zd">
|
|
<intro>
|
|
<para>Is the name of the first destination scalable vector register of a multi-vector sequence, encoded as "Zd" times 2.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="zip_mz_zz_2" symboldefcount="1">
|
|
<symbol link="sa_t"><T></symbol>
|
|
<definition encodedin="size">
|
|
<intro>Is the size specifier, </intro>
|
|
<table class="valuetable">
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry class="bitfield">size</entry>
|
|
<entry class="symbol"><T></entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry class="bitfield">00</entry>
|
|
<entry class="symbol">B</entry>
|
|
</row>
|
|
<row>
|
|
<entry class="bitfield">01</entry>
|
|
<entry class="symbol">H</entry>
|
|
</row>
|
|
<row>
|
|
<entry class="bitfield">10</entry>
|
|
<entry class="symbol">S</entry>
|
|
</row>
|
|
<row>
|
|
<entry class="bitfield">11</entry>
|
|
<entry class="symbol">D</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</definition>
|
|
</explanation>
|
|
<explanation enclist="zip_mz_zz_2, zip_mz_zz_2q" symboldefcount="1">
|
|
<symbol link="sa_zd2"><Zd2></symbol>
|
|
<account encodedin="Zd">
|
|
<intro>
|
|
<para>Is the name of the second destination scalable vector register of a multi-vector sequence, encoded as "Zd" times 2 plus 1.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="zip_mz_zz_2, zip_mz_zz_2q" symboldefcount="1">
|
|
<symbol link="sa_zn"><Zn></symbol>
|
|
<account encodedin="Zn">
|
|
<intro>
|
|
<para>Is the name of the first source scalable vector register, encoded in the "Zn" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="zip_mz_zz_2, zip_mz_zz_2q" symboldefcount="1">
|
|
<symbol link="sa_zm"><Zm></symbol>
|
|
<account encodedin="Zm">
|
|
<intro>
|
|
<para>Is the name of the second source scalable vector register, encoded in the "Zm" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
</explanations>
|
|
<ps_section howmany="1">
|
|
<ps name="ZIP-MZ.ZZ-2" mylink="execute" enclabels="" sections="1" secttype="Operation">
|
|
<pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="impl-aarch64.CheckStreamingSVEEnabled.0" file="shared_pseudocode.xml" hover="function: CheckStreamingSVEEnabled()">CheckStreamingSVEEnabled</a>();
|
|
constant integer VL = <a link="impl-aarch64.CurrentVL.read.none" file="shared_pseudocode.xml" hover="accessor: integer CurrentVL">CurrentVL</a>;
|
|
if VL < esize * 2 then UNDEFINED;
|
|
constant integer pairs = VL DIV (esize * 2);
|
|
bits(VL) operand0 = <a link="impl-aarch64.Z.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) Z[integer n, integer width]">Z</a>[n, VL];
|
|
bits(VL) operand1 = <a link="impl-aarch64.Z.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) Z[integer n, integer width]">Z</a>[m, VL];
|
|
bits(VL) result;
|
|
|
|
for r = 0 to 1
|
|
integer base = r * pairs;
|
|
for p = 0 to pairs-1
|
|
<a link="impl-shared.Elem.write.3" file="shared_pseudocode.xml" hover="accessor: Elem[bits(N) &vector, integer e, integer size] = bits(size) value">Elem</a>[result, 2*p+0, esize] = <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>[operand0, base+p, esize];
|
|
<a link="impl-shared.Elem.write.3" file="shared_pseudocode.xml" hover="accessor: Elem[bits(N) &vector, integer e, integer size] = bits(size) value">Elem</a>[result, 2*p+1, esize] = <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>[operand1, base+p, esize];
|
|
<a link="impl-aarch64.Z.write.2" file="shared_pseudocode.xml" hover="accessor: Z[integer n, integer width] = bits(width) value">Z</a>[d+r, VL] = result;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</instructionsection>
|