[PATCH] AArch64: add GAS support for UDF instruction

Tamar Christina Tamar.Christina@arm.com
Wed Apr 29 07:44:24 GMT 2020


Hi Alex,

I'm not a maintainer so can't approve your patch but please add a regression test to check something other than immediate 0.

Also your new field encoder isn't handing when the immediate is out of range correctly:

> printf "udf 0xEFFFC\n" | ./gas/as-new && ./binutils/objdump -d a.out | 
> tail -1

   0:   0000fffc        udf     #65532

Shows it's silently truncating the immediate rather than raising an out of range error.

PS: When submitting a patch also CC the maintainers for the area you're submitting for.

Thanks,
Tamar

> -----Original Message-----
> From: Binutils <binutils-bounces@sourceware.org> On Behalf Of Alex 
> Coplan
> Sent: Tuesday, April 28, 2020 11:42 AM
> To: binutils@sourceware.org
> Cc: nd <nd@arm.com>
> Subject: [PATCH] AArch64: add GAS support for UDF instruction
> 
> Hello,
> 
> The attached patch adds support to the AArch64 assembler for the UDF 
> instruction, see https://developer.arm.com/docs/ddi0596/a/a64-base-
> instructions-alphabetic-order/udf-permanently-undefined
> 
> Note that the files marked regenerated are not included in the patch 
> in order to keep the size of the patch down: these will need to be 
> regenerated before commit.
> 
> Testing:
>  - New regression test added: fails before and passes after the patch.
>  - Bootstrap and regression on aarch64-linux.
> 
> Ok for master? If so, I will need a maintainer to regenerate the 
> generated files and commit the patch as I don't have commit access.
> 
> Thanks,
> Alex
> 
> ---
> 
> binutils/ChangeLog:
> 
> 2020-04-27  Alex Coplan  <alex.coplan@arm.com>
> 
>         * testsuite/binutils-all/aarch64/in-order-all.d: Update to use new
>           disassembly.
>         * testsuite/binutils-all/aarch64/out-of-order-all.d: Likewise.
> 
> ld/ChangeLog:
> 
> 2020-04-28  Alex Coplan  <alex.coplan@arm.com>
> 
>         * testsuite/ld-aarch64/erratum843419_tls_ie.d: Use udf in disassembly.
>         * testsuite/ld-aarch64/farcall-b-section.d: Likewise.
>         * testsuite/ld-aarch64/farcall-back.d: Likewise.
>         * testsuite/ld-aarch64/farcall-bl-section.d: Likewise.
> 
> gas/ChangeLog:
> 
> 2020-04-27  Alex Coplan  <alex.coplan@arm.com>
> 
>         * config/tc-aarch64.c (fix_insn): Implement for 
> AARCH64_OPND_UNDEFINED.
>         * config/tc-aarch64.c (parse_operands): Likewise.
>         * testsuite/gas/aarch64/udf.s: New.
>         * testsuite/gas/aarch64/udf.d: New.
> 
> include/ChangeLog:
> 
> 2020-04-27  Alex Coplan  <alex.coplan@arm.com>
> 
>         * opcode/aarch64.h (enum aarch64_opnd): Add 
> AARCH64_OPND_UNDEFINED.
> 
> opcodes/ChangeLog:
> 
> 2020-04-27  Alex Coplan  <alex.coplan@arm.com>
> 
>         * aarch64-opc.h (enum aarch64_field_kind): Add FLD_imm16_2.
>         * aarch64-opc.c (fields): Add entry for FLD_imm16_2.
>         * aarch64-tbl.h (aarch64_opcode_table): Add udf instruction, entry for
>           FLD_imm16_2.
>         * aarch64-asm-2.c: Regenerated.
>         * aarch64-dis-2.c: Regenerated.
>         * aarch64-opc-2.c: Regenerated.


More information about the Binutils mailing list