demand_empty_rest_of_line ();
}
+/* Parse an unwind_pacspval directive. */
+
+static void
+s_arm_unwind_pacspval (int ignored ATTRIBUTE_UNUSED)
+{
+ valueT op;
+
+ if (!unwind.proc_start)
+ as_bad (MISSING_FNSTART);
+
+ demand_empty_rest_of_line ();
+
+ op = 0xb5;
+ add_unwind_opcode (op, 1);
+}
+
/* Parse an unwind_setfp directive. */
static void
{ "vsave", s_arm_unwind_save, 1 },
{ "movsp", s_arm_unwind_movsp, 0 },
{ "pad", s_arm_unwind_pad, 0 },
+ { "pacspval", s_arm_unwind_pacspval, 0 },
{ "setfp", s_arm_unwind_setfp, 0 },
{ "unwind_raw", s_arm_unwind_raw, 0 },
{ "eabi_attribute", s_arm_eabi_attribute, 0 },
output section. These are not compatible with current ARM processors
or ABIs.
+@anchor{arm_pacspval}
+@cindex @code{.pacspval} directive, ARM
+@item .pacspval
+Generate unwinder annotations to use effective vsp as modifier in PAC
+validation.
+
@anchor{arm_pad}
@cindex @code{.pad} directive, ARM
@item .pad #@var{count}
--- /dev/null
+# name: Unwind Stack Frame information for Armv8.1-M.Mainline PAC extension
+# source: ehabi-pacbti-m.s
+# as: -march=armv8.1-m.main+mve+pacbti
+# readelf: -u
+
+Unwind section '.ARM.exidx' at offset 0x5c contains 1 entry:
+
+0x0: @0x0
+ Compact model index: 1
+ 0xb1 0x08 pop {r3}
+ 0x80 0x08 pop {r7}
+ 0xb4 pop {ra_auth_code}
+ 0x84 0x00 pop {r14}
+ 0xb1 0x0f pop {r0, r1, r2, r3}
+ 0xb5 vsp as modifier for PAC validation
--- /dev/null
+ .syntax unified
+ .thumb
+ .thumb_func
+ .fnstart
+ .cfi_startproc
+ .pacspval
+ pac ip, lr, sp
+ .cfi_register 143, 12
+ push {r0, r1, r2, r3}
+ .save {r0, r1, r2, r3}
+ .cfi_def_cfa_offset 16
+ .cfi_offset 0, -16
+ .cfi_offset 1, -12
+ .cfi_offset 2, -8
+ .cfi_offset 3, -4
+ push {r3, r7, ip, lr}
+ .save {r3, r7, ra_auth_code, lr}
+ .cfi_def_cfa_offset 32
+ .cfi_offset 3, -32
+ .cfi_offset 7, -28
+ .cfi_offset 143, -24
+ .cfi_offset 14, -20
+ pop {r3, r7, ip, lr}
+ .cfi_restore 14
+ .cfi_restore 143
+ .cfi_restore 7
+ .cfi_restore 3
+ .cfi_def_cfa_offset 0
+ add sp, sp, #16
+ .cfi_restore 3
+ .cfi_restore 2
+ .cfi_restore 1
+ .cfi_restore 0
+ .cfi_def_cfa_offset -16
+ aut ip, lr, sp
+ bx lr
+ .cfi_endproc
+ .fnend