summaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-03-30 11:09:02 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-03-30 11:09:02 +0100
commit89f55b440abdffea9046e225918b5ceb6a57ab85 (patch)
treebfef21f4762d220433920b1eeb8191adf5bfa117 /opcodes
parentd346e1aafd10442d85fc149a663bb298cebc0fc7 (diff)
downloadbinutils-gdb-89f55b440abdffea9046e225918b5ceb6a57ab85.tar.gz
aarch64: Restrict range of PRFM opcodes
In the register-index forms of PRFM, the unallocated prefetch opcodes 24-31 have been reused for the encoding of the new RPRFM instruction. The PRFM opcode space is now capped at 23 for these forms. The other forms of PRFM are unaffected.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/aarch64-opc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index e271b0d5e8e..a0e6240592c 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -2599,6 +2599,15 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
return 0;
}
break;
+ case AARCH64_OPND_PRFOP:
+ if (opcode->iclass == ldst_regoff && opnd->prfop->value >= 24)
+ {
+ set_other_error (mismatch_detail, idx,
+ _("the register-index form of PRFM does"
+ " not accept opcodes in the range 24-31"));
+ return 0;
+ }
+ break;
default:
break;
}