aarch64: Add support for (M)ADDPT and (M)SUBPT instructions

The following instructions are added in this patch:

 - ADDPT and SUBPT - Add/Subtract checked pointer
 - MADDPT and MSUBPT - Multiply Add/Subtract checked pointer

These instructions are part of Checked Pointer Arithmetic extension.
This patch adds assembler and disassembler support for these instructions
with relevant checks. Tests are included as well.

A new flag "+cpa" added to documentation. This flag enables CPA extension.

Regression tested on the aarch64-none-linux-gnu target and no regressions
have been found.
This commit is contained in:
Yury Khrustalev
2024-02-21 12:52:23 +00:00
committed by Nick Clifton
parent ee0fa66270
commit 4792a423d2
16 changed files with 313 additions and 1 deletions

View File

@@ -228,6 +228,8 @@ enum aarch64_feature_bit {
AARCH64_FEATURE_SVE2p1,
/* RCPC3 instructions. */
AARCH64_FEATURE_RCPC3,
/* Checked Pointer Arithmetic instructions. */
AARCH64_FEATURE_CPA,
AARCH64_NUM_FEATURES
};
@@ -490,6 +492,7 @@ enum aarch64_opnd
AARCH64_OPND_PAIRREG_OR_XZR, /* Paired register operand, optionally xzr. */
AARCH64_OPND_Rm_EXT, /* Integer Rm extended. */
AARCH64_OPND_Rm_SFT, /* Integer Rm shifted. */
AARCH64_OPND_Rm_LSL, /* Integer Rm shifted (LSL-only). */
AARCH64_OPND_Fd, /* Floating-point Fd. */
AARCH64_OPND_Fn, /* Floating-point Fn. */