diff options
author | Yury Khrustalev <yury.khrustalev@arm.com> | 2024-02-21 12:52:23 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2024-03-18 16:54:06 +0000 |
commit | 4792a423d264cfb6dbb656ea97b1c84d1b4e55b6 (patch) | |
tree | b9ed74a4a37b8e8881e533325a9fa8777949532c /opcodes/aarch64-dis.c | |
parent | ee0fa6627079ebd16843d9d3fb4e24a5af545ded (diff) | |
download | binutils-4792a423d264cfb6dbb656ea97b1c84d1b4e55b6.zip binutils-4792a423d264cfb6dbb656ea97b1c84d1b4e55b6.tar.gz binutils-4792a423d264cfb6dbb656ea97b1c84d1b4e55b6.tar.bz2 |
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.
Diffstat (limited to 'opcodes/aarch64-dis.c')
-rw-r--r-- | opcodes/aarch64-dis.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 82d2f8f..96f42ae 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -1526,6 +1526,23 @@ aarch64_ext_reg_shifted (const aarch64_operand *self ATTRIBUTE_UNUSED, return true; } +/* Decode the LSL-shifted register operand for e.g. + ADDPT <Xd|SP>, <Xn|SP>, <Xm>{, LSL #<amount>}. */ +bool +aarch64_ext_reg_lsl_shifted (const aarch64_operand *self ATTRIBUTE_UNUSED, + aarch64_opnd_info *info, + aarch64_insn code, + const aarch64_inst *inst ATTRIBUTE_UNUSED, + aarch64_operand_error *errors ATTRIBUTE_UNUSED) +{ + /* Rm */ + info->reg.regno = extract_field (FLD_Rm, code, 0); + /* imm3 */ + info->shifter.kind = AARCH64_MOD_LSL; + info->shifter.amount = extract_field (FLD_imm3_10, code, 0); + return true; +} + /* Decode an SVE address [<base>, #<offset>*<factor>, MUL VL], where <offset> is given by the OFFSET parameter and where <factor> is 1 plus SELF's operand-dependent value. fields[0] specifies the field |