[AArch64] Reject invalid immediate operands to MSR UAO

Matthew Wahab matthew.wahab@foss.arm.com
Thu Jan 14 15:47:00 GMT 2016


Hello,

In the instruction to write to the ARMv8.2 PSTATE field UAO, MSR UAO,
#<imm>, the immediate should be either 0 or 1 but GAS accepts any
unsigned 4-bit integer.

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/
2016-01-14  Matthew Wahab  <matthew.wahab@arm.com>

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

gas/
2015-01-14  Matthew Wahab  <matthew.wahab@arm.com>

	* testsuite/gas/aarch64/armv8_2-a-illegal.d: New.
	* testsuite/gas/aarch64/armv8_2-a-illegal.l: New.
	* testsuite/gas/aarch64/armv8_2-a-illegal.s: New.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AArch64-Check-for-invalid-argument-to-MSR-UAO.patch
Type: text/x-patch
Size: 3074 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160114/8f90c48f/attachment.bin>


More information about the Binutils mailing list