<?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-2025 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="HINT" title="HINT -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="system"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="HINT"/>
  </docvars>
  <heading>HINT</heading>
  <desc>
    <brief>
      <para>Hint instruction</para>
    </brief>
    <authored>
      <para>This instruction is for the instruction set space that is reserved
for architectural hint instructions.</para>
      <para>Some encodings described here are not allocated in this revision of
the architecture, and behave as NOPs. These encodings might be
allocated to other hint functionality in future revisions of the
architecture and therefore must not be used by software.</para>
    </authored>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="System" oneof="1" id="iclass_system" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="instr-class" value="system"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="HINT"/>
      </docvars>
      <iclassintro count="1"/>
      <regdiagram form="32" psname="A64.control.hints.HINT_HM_hints">
        <box hibit="31" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="28" width="3" settings="3">
          <c>1</c>
          <c>0</c>
          <c>1</c>
        </box>
        <box hibit="25" width="14" settings="14">
          <c>0</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>1</c>
          <c>0</c>
          <c>0</c>
          <c>1</c>
          <c>0</c>
        </box>
        <box hibit="11" width="4" name="CRm" usename="1">
          <c colspan="4"/>
        </box>
        <box hibit="7" width="3" name="op2" usename="1">
          <c colspan="3"/>
        </box>
        <box hibit="4" width="5" settings="5">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
      </regdiagram>
      <encoding name="HINT_HM_hints" oneofinclass="1" oneof="1" label="">
        <docvars>
          <docvar key="instr-class" value="system"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="HINT"/>
        </docvars>
        <asmtemplate><text>HINT  #</text><a hover="Is a 7-bit unsigned immediate, in the range 0 to 127, encoded in the &quot;CRm:op2&quot; field.&#10;&#10;The encodings that are allocated to architectural hint functionality are described in the 'Hints' table in the 'Index by Encoding'.&#10;&#10;&#10;[note]&#10;For allocated encodings of &quot;CRm:op2&quot;:&#10;&#10;  * A disassembler will disassemble the allocated instruction, rather than the HINT instruction.&#10;  * An assembler may support assembly of allocated encodings using HINT with the corresponding &lt;imm&gt; value, but it is not required to do so.&#10;[/note]" link="CRm_op2">&lt;imm&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.control.hints.HINT_HM_hints" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">var op : SystemHintOp;

var stream : boolean;
case CRm::op2 of
    when '0000 000' =&gt; op = SystemHintOp_NOP;
    when '0000 001' =&gt; op = SystemHintOp_YIELD;
    when '0000 010' =&gt; op = SystemHintOp_WFE;
    when '0000 011' =&gt; op = SystemHintOp_WFI;
    when '0000 100' =&gt; op = SystemHintOp_SEV;
    when '0000 101' =&gt; op = SystemHintOp_SEVL;
    when '0000 110' =&gt;
        if !IsFeatureImplemented(FEAT_DGH) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_DGH;
    when '0000 111' =&gt; See("XPACLRI");
    when '0001 xxx' =&gt;
        case op2 of
            when '000' =&gt; See("PACIA1716");
            when '010' =&gt; See("PACIB1716");
            when '100' =&gt; See("AUTIA1716");
            when '110' =&gt; See("AUTIB1716");
            otherwise =&gt; EndOfDecode(Decode_NOP);
        end;
    when '0010 000' =&gt;
        if !IsFeatureImplemented(FEAT_RAS) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_ESB;
    when '0010 001' =&gt;
        if !IsFeatureImplemented(FEAT_SPE) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_PSB;
    when '0010 010' =&gt;
        if !IsFeatureImplemented(FEAT_TRF) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_TSB;
    when '0010 011' =&gt;
        if !IsFeatureImplemented(FEAT_GCS) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_GCSB;
    when '0010 100' =&gt;
        op = SystemHintOp_CSDB;
    when '0010 110' =&gt;
        if !IsFeatureImplemented(FEAT_CLRBHB) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_CLRBHB;
    when '0011 xxx' =&gt;
        case op2 of
            when '000' =&gt; See("PACIAZ");
            when '001' =&gt; See("PACIASP");
            when '010' =&gt; See("PACIBZ");
            when '011' =&gt; See("PACIBSP");
            when '100' =&gt; See("AUTIAZ");
            when '101' =&gt; See("AUTIASP");
            when '110' =&gt; See("AUTIBZ");
            when '111' =&gt; See("AUTIBSP");
        end;
    when '0100 xx0' =&gt;
        if !IsFeatureImplemented(FEAT_BTI) then EndOfDecode(Decode_NOP); end;

        // Check branch target compatibility between BTI instruction and PSTATE.BTYPE
        SetBTypeCompatible(BTypeCompatible_BTI(op2[2:1]));
        op = SystemHintOp_BTI;
    when '0100 111' =&gt; See("PACM");
    when '0101 000' =&gt;
        if !IsFeatureImplemented(FEAT_CHK) then EndOfDecode(Decode_NOP); end;
        op = SystemHintOp_CHKFEAT;
    when '0110 00x' =&gt;
        if !IsFeatureImplemented(FEAT_PCDPHINT) then EndOfDecode(Decode_NOP); end;
        stream = op2[0] == '1';
        op = SystemHintOp_STSHH;
    otherwise =&gt; EndOfDecode(Decode_NOP);
end;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="HINT_HM_hints" symboldefcount="1">
      <symbol link="CRm_op2">&lt;imm&gt;</symbol>
      <account encodedin="(CRm :: op2)">
        <intro>
          <para>Is a 7-bit unsigned immediate, in the range 0 to 127, encoded in the "CRm:op2" field.</para>
          <para>The encodings that are allocated to architectural hint functionality are described in the 'Hints' table in the 'Index by Encoding'.</para>
          <note>
            <para>For allocated encodings of "CRm:op2":</para>
            <list type="unordered">
              <listitem>
                <content>A disassembler will disassemble the allocated instruction, rather than the <instruction>HINT</instruction> instruction.</content>
              </listitem>
              <listitem>
                <content>An assembler may support assembly of allocated encodings using <instruction>HINT</instruction> with the corresponding <syntax>&lt;imm&gt;</syntax> value, but it is not required to do so.</content>
              </listitem>
            </list>
          </note>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.control.hints.HINT_HM_hints" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">case op of
    when SystemHintOp_YIELD =&gt;
        Hint_Yield();

    when SystemHintOp_DGH =&gt;
        Hint_DGH();

    when SystemHintOp_WFE =&gt;
        Hint_WFE();

    when SystemHintOp_WFI =&gt;
        Hint_WFI();

    when SystemHintOp_SEV =&gt;
        SendEvent();

    when SystemHintOp_SEVL =&gt;
        SendEventLocal();

    when SystemHintOp_ESB =&gt;
        SynchronizeErrors();
        AArch64_ESBOperation();
        if PSTATE.EL IN {EL0, EL1} &amp;&amp; EL2Enabled() then
            AArch64_vESBOperation();
        elsif IsFeatureImplemented(FEAT_E3DSE) &amp;&amp; PSTATE.EL != EL3 then
            AArch64_dESBOperation();
        end;
        TakeUnmaskedSErrorInterrupts();

    when SystemHintOp_PSB =&gt;
        if IsFeatureImplemented(FEAT_FGT) &amp;&amp; IsFeatureImplemented(FEAT_SPEv1p5) then
            let trap_to_el2 : boolean = (PSTATE.EL IN {EL0, EL1} &amp;&amp; EL2Enabled() &amp;&amp;
                                            !IsInHost() &amp;&amp;
                                            (!HaveEL(EL3) || SCR_EL3().FGTEn == '1') &amp;&amp;
                                            HFGITR_EL2().PSBCSYNC == '1');
            if trap_to_el2 then
                // to be renamed
                var except : ExceptionRecord = ExceptionSyndrome(Exception_LDST64BTrap);
                except.syndrome.iss = 0x3[24:0];
                let preferred_exception_return : bits(64) = ThisInstrAddr{}();
                let vect_offset : integer = 0x0;
                AArch64_TakeException(EL2, except, preferred_exception_return, vect_offset);
            end;
        end;

        ProfilingSynchronizationBarrier();

    when SystemHintOp_TSB =&gt;
        if IsFeatureImplemented(FEAT_FGT2) &amp;&amp; IsFeatureImplemented(FEAT_TRBEv1p1) then
            let trap_to_el2 : boolean = (PSTATE.EL IN {EL0, EL1} &amp;&amp; EL2Enabled() &amp;&amp;
                                            !IsInHost() &amp;&amp;
                                            (!HaveEL(EL3) || SCR_EL3().FGTEn2 == '1') &amp;&amp;
                                            HFGITR2_EL2().TSBCSYNC == '1');
            if trap_to_el2 then
                // to be renamed
                var except : ExceptionRecord = ExceptionSyndrome(Exception_LDST64BTrap);
                except.syndrome.iss = 0x4[24:0];
                let preferred_exception_return : bits(64) = ThisInstrAddr{}();
                let vect_offset : integer = 0x0;
                AArch64_TakeException(EL2, except, preferred_exception_return, vect_offset);
            end;
        end;

        TraceSynchronizationBarrier();

    when SystemHintOp_GCSB =&gt;
        GCSSynchronizationBarrier();

    when SystemHintOp_CHKFEAT =&gt;
        X{64}(16) = AArch64_ChkFeat(X{64}(16));

    when SystemHintOp_CSDB =&gt;
        ConsumptionOfSpeculativeDataBarrier();

    when SystemHintOp_CLRBHB =&gt;
        Hint_CLRBHB();

    when SystemHintOp_BTI =&gt;
        SetBTypeNext('00');

    when SystemHintOp_STSHH =&gt;
        Hint_StoreShared(stream);

    when SystemHintOp_NOP =&gt;
        return; // Do nothing

    otherwise =&gt;
        unreachable;
end;</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
