This is the mail archive of the 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]

[PATCH, AArch64] Change not to accept AL or NV condition in CINC, CSET, CINV, CSETM and CNEG


This patch updates the AArch64 gas and binutils as a response to a recent ISA update. The aliases CINC, CSET, CINV, CSETM, and CNEG require that the assembler and disassembler invert bit 0 of the standard "cond" encoding to achieve the expected behavior. However when the specified condition is AL (cond=='1110') this will not deliver the intended result, since the condition code named NV (cond=='1111') behaves identically to AL, i.e. always true.

For these aliases gas now should no longer accept the AL or NV conditions, and the preferred disassembly for the CSINC, CSINV or CSNEG instructions when cond=='111x' shall be the instructions themselves.

OK for the trunk and 2.24?



	* config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_COND1.


	* gas/aarch64/alias.s: Add tests.
	* gas/aarch64/alias.d: Update.
	* gas/aarch64/no-aliases.d: Update.
	* gas/aarch64/diagnostic.s: Add tests.
	* gas/aarch64/diagnostic.l: Update.
	* gas/aarch64/illegal.s: Add tests.
	* gas/aarch64/illegal.l: Update.


	* aarch64.h (enum aarch64_operand_class): Add AARCH64_OPND_CLASS_COND.
	(enum aarch64_opnd): Add AARCH64_OPND_COND1.


	* aarch64-dis.c (convert_ubfm_to_lsl): Check for cond != '111x'.
	(convert_from_csel): Likewise.
	* aarch64-opc.c (operand_general_constraint_met_p): Handle
	(aarch64_print_operand): Handle AARCH64_OPND_COND1.
	* aarch64-tbl.h (aarch64_opcode_table): Use COND1 instead of
	COND for cinc, cset, cinv, csetm and cneg.
	(AARCH64_OPERANDS): Add entry for AARCH64_OPND_COND1.
	* aarch64-asm-2.c: Re-generated.
	* aarch64-dis-2.c: Ditto.
	* aarch64-opc-2.c: Ditto.

Attachment: patch
Description: Text document

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