[AArch64] Reject invalid immediate operands to MSR PAN

Matthew Wahab matthew.wahab@foss.arm.com
Mon Nov 9 12:44:00 GMT 2015


Hello,

The support for accessing the ARMv8.1 PSTATE field PAN allows
instructions of the form MSR PAN, #<imm> with <imm> any unsigned 4-bit
integer. However, the architecture specification requires that the
immediate is either 0 or 1.

This patch implements the constraint on the immediate, generating an
error if the immediate operand is invalid, and adds tests for the
illegal forms.

Tested aarch64-none-linux-gnu with cross-compiled check-binutils and
check-gas.

Ok for trunk?
Matthew

opcodes/
2015-11-09  Matthew Wahab  <matthew.wahab@arm.com>

	* aarch64-opc.c (operand_general_constraint_met_p): Check validity
	of MSR PAN immediate operand.


gas/testsuite/
2015-11-09  Matthew Wahab  <matthew.wahab@arm.com>

	* gas/aarch64/pan-illegal.d: New.
	* gas/aarch64/pan-illegal.l: New.
	* gas/aarch64/pan.s: Add tests for invalid immediates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AArch64-Reject-invalid-immediate-values-in-MSR-PAN.patch
Type: text/x-patch
Size: 3537 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20151109/429b2224/attachment.bin>


More information about the Binutils mailing list