This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64] Reject invalid immediate operands to MSR PAN


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]