diff options
author | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-12-13 14:09:08 +0000 |
---|---|---|
committer | Victor Do Nascimento <victor.donascimento@arm.com> | 2024-01-09 10:16:40 +0000 |
commit | d30eb38d5b4e714153b0084bd8aff237f598fc9d (patch) | |
tree | 8e615529979c0448a99b120b677f136106a3c040 /opcodes/aarch64-tbl.h | |
parent | 2ec6065a4f3fe95d287602cb9158a7ce1fbed2e9 (diff) | |
download | fsf-binutils-gdb-d30eb38d5b4e714153b0084bd8aff237f598fc9d.zip fsf-binutils-gdb-d30eb38d5b4e714153b0084bd8aff237f598fc9d.tar.gz fsf-binutils-gdb-d30eb38d5b4e714153b0084bd8aff237f598fc9d.tar.bz2 |
aarch64: Add support for xzr register in register pair operands
Analysis of the allowed operand values for `sysp' and `tlbip' reveals
a significant departure from the allowed behavior for operand register
pairs (hitherto labeled AARCH64_OPND_PAIRREG) observed for other
insns in this category.
For instructions `casp', `mrrs' and `msrr' the register pair must
always start at an even index and the second register in the pair is
the index + 1. This precludes the use of xzr as the first register,
given it corresponds to register number 31.
This is different in the case of `sysp' and `tlbip', however. These
allow the use of xzr and, where the first operand in the pair is
omitted, this is the default value assigned to it. When this
operand is assigned xzr, it is expected that the second operand will
likewise take on a value of xzr.
These two instructions therefore "break" two rules of register pairs:
* The first of the two registers is odd-numbered.
* The index of the second register is equal to that of the first,
and not n+1.
To allow for this departure from hitherto standard behavior, we
extend the functionality of the assembler by defining an extension of
the AARCH64_OPND_PAIRREG, called AARCH64_OPND_PAIRREG_OR_XZR.
It is used in defining `sysp' and `tlbip' and allows
`operand_general_constraint_met_p' to allow the pair to both take on
the value of xzr.
Diffstat (limited to 'opcodes/aarch64-tbl.h')
-rw-r--r-- | opcodes/aarch64-tbl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h index 47c25d5..b2a8b34 100644 --- a/opcodes/aarch64-tbl.h +++ b/opcodes/aarch64-tbl.h @@ -6174,6 +6174,8 @@ const struct aarch64_opcode aarch64_opcode_table[] = "an integer or stack pointer register") \ X(INT_REG, 0, ext_regno_pair, "PAIRREG", 0, F(), \ "the second reg of a pair") \ + X(INT_REG, 0, ext_regno_pair, "PAIRREG_OR_XZR", 0, F(), \ + "the second reg of a pair") \ Y(MODIFIED_REG, reg_extended, "Rm_EXT", 0, F(), \ "an integer register with optional extension") \ Y(MODIFIED_REG, reg_shifted, "Rm_SFT", 0, F(), \ |