<?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="AUTIASPPC_imm" title="AUTIASPPC -- A64" type="instruction">
  <docvars>
    <docvar key="instr-class" value="general"/>
    <docvar key="isa" value="A64"/>
    <docvar key="mnemonic" value="AUTIASPPC"/>
  </docvars>
  <heading>AUTIASPPC</heading>
  <desc>
    <brief>
      <para>Authenticate return address using key A, using an immediate offset</para>
    </brief>
    <authored>
      <para>This instruction authenticates an instruction address, using two modifiers and key A.</para>
      <para>If the authentication passes, the upper bits of the address are
restored to enable subsequent use of the address.
For information on behavior if the authentication fails, see
<xref linkend="ARMARM_MDSec.Faulting_on_pointer_authentication">Faulting on pointer authentication</xref>.</para>
      <para>The address is in X30.</para>
      <para>The first modifier is in SP.</para>
      <para>The second modifier is the address of a program label.</para>
    </authored>
  </desc>
  <alias_list howmany="0"/>
  <classes>
    <iclass name="Integer" oneof="1" id="iclass_integer" no_encodings="1" isa="A64">
      <docvars>
        <docvar key="instr-class" value="general"/>
        <docvar key="isa" value="A64"/>
        <docvar key="mnemonic" value="AUTIASPPC"/>
      </docvars>
      <iclassintro count="1"/>
      <arch_variants>
        <arch_variant feature="FEAT_PAuth_LR" name="v9Ap5"/>
      </arch_variants>
      <regdiagram form="32" psname="A64.dpimm.dp_1src_imm.AUTIASPPC_only_dp_1src_imm" tworows="1">
        <box hibit="31" name="sf" usename="1" settings="1" psbits="x">
          <c>1</c>
        </box>
        <box hibit="30" width="2" settings="2">
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="28" width="3" settings="3">
          <c>1</c>
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="25" width="3" settings="3">
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
        <box hibit="22" width="2" name="opc" usename="1" settings="2" psbits="xx">
          <c>0</c>
          <c>0</c>
        </box>
        <box hibit="20" width="16" name="imm16" usename="1">
          <c colspan="16"/>
        </box>
        <box hibit="4" width="5" name="Rd" usename="1" settings="5" psbits="xxxxx">
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
          <c>1</c>
        </box>
      </regdiagram>
      <encoding name="AUTIASPPC_only_dp_1src_imm" oneofinclass="1" oneof="1" label="">
        <docvars>
          <docvar key="instr-class" value="general"/>
          <docvar key="isa" value="A64"/>
          <docvar key="mnemonic" value="AUTIASPPC"/>
        </docvars>
        <asmtemplate><text>AUTIASPPC  </text><a hover="Is the program label whose address is to be calculated. Its negative offset from the address of this instruction, a multiple of 4 in the range -262140 to 0, is encoded as an unsigned value in the &quot;imm16&quot; field as &lt;label&gt;/4." link="imm16_offset">&lt;label&gt;</a></asmtemplate>
      </encoding>
      <ps_section howmany="1">
        <ps name="A64.dpimm.dp_1src_imm.AUTIASPPC_only_dp_1src_imm" sections="1" secttype="noheading">
          <pstext mayhavelinks="1" section="Decode" rep_section="decode">if !IsFeatureImplemented(FEAT_PAuth_LR) then EndOfDecode(Decode_UNDEF); end;

let d : integer = 30;
let offset : bits(64) = ZeroExtend{}(imm16::'00');
let auth_combined : boolean = FALSE;</pstext></ps>
      </ps_section>
    </iclass>
  </classes>
  <explanations scope="all">
    <explanation enclist="AUTIASPPC_only_dp_1src_imm" symboldefcount="1">
      <symbol link="imm16_offset">&lt;label&gt;</symbol>
      <account encodedin="imm16">
        <intro>
          <para>Is the program label whose address is to be calculated. Its negative offset from the address of this instruction, a multiple of 4 in the range -262140 to 0, is encoded as an unsigned value in the "imm16" field as &lt;label&gt;/4.</para>
        </intro>
      </account>
    </explanation>
  </explanations>
  <ps_section howmany="1">
    <ps name="A64.dpimm.dp_1src_imm.AUTIASPPC_only_dp_1src_imm" sections="1" secttype="Operation">
      <pstext mayhavelinks="1" section="Execute" rep_section="execute">let pac_addr : bits(64) = PC64() - offset;

X{64}(d) = AuthIA2(X{64}(d), SP{64}(), pac_addr, auth_combined);</pstext></ps>
  </ps_section>
  <timestamp>2026-03-12 12:23:09</timestamp>
  <commit_id>2025-09_rel_asl1</commit_id>
</instructionsection>
