[AArch64] Reject invalid immediate operands to MSR PAN

Marcus Shawcroft marcus.shawcroft@gmail.com
Mon Nov 9 16:12:00 GMT 2015


On 9 November 2015 at 12:44, Matthew Wahab <matthew.wahab@foss.arm.com> wrote:

> 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.

+ .ifdef ERROR
+ .irp N,2,3,4,5,6,7,8,9,10,11,12,13,14,15
+ msr pan, #\N
+ .endr
+ .endif

This iterates the full range of the field, this approach is fine for
small fields, as in this case,  but doesn't scale well to wider
fields.  In general targeting boundary values in test cases is fine.

OK

/Marcus



More information about the Binutils mailing list