mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
181 lines
9.7 KiB
XML
181 lines
9.7 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="brkb_p_p_p" title="BRKB" type="instruction">
|
|
<docvars>
|
|
<docvar key="cond-setting" value="no-s" />
|
|
<docvar key="instr-class" value="sve" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="BRKB" />
|
|
</docvars>
|
|
<heading>BRKB</heading>
|
|
<desc>
|
|
<brief>Break before first true condition</brief>
|
|
<description>
|
|
<para>Sets destination predicate elements up to but not including the first active and true source element to true, then sets subsequent elements to false. Inactive elements in the destination predicate register remain unmodified or are set to zero, depending on whether merging or zeroing predication is selected. Does not set the condition flags.</para>
|
|
</description>
|
|
<status>Green</status>
|
|
<predicated>True</predicated>
|
|
</desc>
|
|
<alias_list howmany="0"></alias_list>
|
|
<classes>
|
|
<iclass name="Not setting the condition flags" oneof="1" id="iclass_no_s" no_encodings="1" isa="A64">
|
|
<docvars>
|
|
<docvar key="cond-setting" value="no-s" />
|
|
<docvar key="instr-class" value="sve" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="BRKB" />
|
|
</docvars>
|
|
<iclassintro count="1"></iclassintro>
|
|
<regdiagram form="32" psname="BRKB-P.P.P-_" tworows="1">
|
|
<box hibit="31" width="8" settings="8">
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
<c>0</c>
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="23" name="B" usename="1" settings="1">
|
|
<c>1</c>
|
|
</box>
|
|
<box hibit="22" name="S" usename="1" settings="1">
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="21" width="8" settings="8">
|
|
<c>0</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="13" width="4" name="Pg" usename="1">
|
|
<c colspan="4"></c>
|
|
</box>
|
|
<box hibit="9" settings="1">
|
|
<c>0</c>
|
|
</box>
|
|
<box hibit="8" width="4" name="Pn" usename="1">
|
|
<c colspan="4"></c>
|
|
</box>
|
|
<box hibit="4" name="M" usename="1">
|
|
<c></c>
|
|
</box>
|
|
<box hibit="3" width="4" name="Pd" usename="1">
|
|
<c colspan="4"></c>
|
|
</box>
|
|
</regdiagram>
|
|
<encoding name="brkb_p_p_p_" oneofinclass="1" oneof="1" label="">
|
|
<docvars>
|
|
<docvar key="cond-setting" value="no-s" />
|
|
<docvar key="instr-class" value="sve" />
|
|
<docvar key="isa" value="A64" />
|
|
<docvar key="mnemonic" value="BRKB" />
|
|
</docvars>
|
|
<asmtemplate><text>BRKB </text><a link="sa_pd" hover="Destination scalable predicate register (field "Pd")"><Pd></a><text>.B, </text><a link="sa_pg" hover="Governing scalable predicate register (field "Pg")"><Pg></a><text>/</text><a link="sa_zm" hover="Predication qualifier (field "M") [M,Z]"><ZM></a><text>, </text><a link="sa_pn" hover="Source scalable predicate register (field "Pn")"><Pn></a><text>.B</text></asmtemplate>
|
|
</encoding>
|
|
<ps_section howmany="1">
|
|
<ps name="BRKB-P.P.P-_" mylink="BRKB-P.P.P-_" enclabels="" sections="1" secttype="noheading">
|
|
<pstext mayhavelinks="1" section="Decode" rep_section="decode">if !<a link="impl-aarch64.HaveSVE.0" file="shared_pseudocode.xml" hover="function: boolean HaveSVE()">HaveSVE</a>() && !<a link="impl-aarch64.HaveSME.0" file="shared_pseudocode.xml" hover="function: boolean HaveSME()">HaveSME</a>() then UNDEFINED;
|
|
constant integer esize = 8;
|
|
integer g = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Pg);
|
|
integer n = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Pn);
|
|
integer d = <a link="impl-shared.UInt.1" file="shared_pseudocode.xml" hover="function: integer UInt(bits(N) x)">UInt</a>(Pd);
|
|
boolean merging = (M == '1');
|
|
boolean setflags = FALSE;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</iclass>
|
|
</classes>
|
|
<explanations scope="all">
|
|
<explanation enclist="brkb_p_p_p_" symboldefcount="1">
|
|
<symbol link="sa_pd"><Pd></symbol>
|
|
<account encodedin="Pd">
|
|
<intro>
|
|
<para>Is the name of the destination scalable predicate register, encoded in the "Pd" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="brkb_p_p_p_" symboldefcount="1">
|
|
<symbol link="sa_pg"><Pg></symbol>
|
|
<account encodedin="Pg">
|
|
<intro>
|
|
<para>Is the name of the governing scalable predicate register, encoded in the "Pg" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
<explanation enclist="brkb_p_p_p_" symboldefcount="1">
|
|
<symbol link="sa_zm"><ZM></symbol>
|
|
<definition encodedin="M">
|
|
<intro>Is the predication qualifier, </intro>
|
|
<table class="valuetable">
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry class="bitfield">M</entry>
|
|
<entry class="symbol"><ZM></entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry class="bitfield">0</entry>
|
|
<entry class="symbol">Z</entry>
|
|
</row>
|
|
<row>
|
|
<entry class="bitfield">1</entry>
|
|
<entry class="symbol">M</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</definition>
|
|
</explanation>
|
|
<explanation enclist="brkb_p_p_p_" symboldefcount="1">
|
|
<symbol link="sa_pn"><Pn></symbol>
|
|
<account encodedin="Pn">
|
|
<intro>
|
|
<para>Is the name of the source scalable predicate register, encoded in the "Pn" field.</para>
|
|
</intro>
|
|
</account>
|
|
</explanation>
|
|
</explanations>
|
|
<ps_section howmany="1">
|
|
<ps name="BRKB-P.P.P-_" mylink="execute" enclabels="" sections="1" secttype="Operation">
|
|
<pstext mayhavelinks="1" section="Execute" rep_section="execute"><a link="impl-aarch64.CheckSVEEnabled.0" file="shared_pseudocode.xml" hover="function: CheckSVEEnabled()">CheckSVEEnabled</a>();
|
|
constant integer VL = <a link="impl-aarch64.CurrentVL.read.none" file="shared_pseudocode.xml" hover="accessor: integer CurrentVL">CurrentVL</a>;
|
|
constant integer PL = VL DIV 8;
|
|
constant integer elements = VL DIV esize;
|
|
bits(PL) mask = <a link="impl-aarch64.P.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) P[integer n, integer width]">P</a>[g, PL];
|
|
bits(PL) operand = <a link="impl-aarch64.P.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) P[integer n, integer width]">P</a>[n, PL];
|
|
bits(PL) operand2 = <a link="impl-aarch64.P.read.2" file="shared_pseudocode.xml" hover="accessor: bits(width) P[integer n, integer width]">P</a>[d, PL];
|
|
boolean break = FALSE;
|
|
bits(PL) result;
|
|
constant integer psize = esize DIV 8;
|
|
|
|
for e = 0 to elements-1
|
|
boolean element = <a link="impl-aarch64.ActivePredicateElement.3" file="shared_pseudocode.xml" hover="function: boolean ActivePredicateElement(bits(N) pred, integer e, integer esize)">ActivePredicateElement</a>(operand, e, esize);
|
|
if <a link="impl-aarch64.ActivePredicateElement.3" file="shared_pseudocode.xml" hover="function: boolean ActivePredicateElement(bits(N) pred, integer e, integer esize)">ActivePredicateElement</a>(mask, e, esize) then
|
|
break = break || element;
|
|
bit pbit = if !break then '1' else '0';
|
|
<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, e, psize] = <a link="impl-shared.ZeroExtend.2" file="shared_pseudocode.xml" hover="function: bits(N) ZeroExtend(bits(M) x, integer N)">ZeroExtend</a>(pbit, psize);
|
|
elsif merging then
|
|
bit pbit = <a link="impl-aarch64.PredicateElement.3" file="shared_pseudocode.xml" hover="function: bit PredicateElement(bits(N) pred, integer e, integer esize)">PredicateElement</a>(operand2, e, 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, e, psize] = <a link="impl-shared.ZeroExtend.2" file="shared_pseudocode.xml" hover="function: bits(N) ZeroExtend(bits(M) x, integer N)">ZeroExtend</a>(pbit, psize);
|
|
else
|
|
<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, e, psize] = <a link="impl-shared.ZeroExtend.2" file="shared_pseudocode.xml" hover="function: bits(N) ZeroExtend(bits(M) x, integer N)">ZeroExtend</a>('0', psize);
|
|
|
|
if setflags then
|
|
PSTATE.<N,Z,C,V> = <a link="impl-aarch64.PredTest.3" file="shared_pseudocode.xml" hover="function: bits(4) PredTest(bits(N) mask, bits(N) result, integer esize)">PredTest</a>(mask, result, esize);
|
|
<a link="impl-aarch64.P.write.2" file="shared_pseudocode.xml" hover="accessor: P[integer n, integer width] = bits(width) value">P</a>[d, PL] = result;</pstext>
|
|
</ps>
|
|
</ps_section>
|
|
</instructionsection>
|