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

Yufeng Zhang Yufeng.Zhang@arm.com
Tue Nov 5 17:54:00 GMT 2013


Hi,

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?

Thanks,
Yufeng

gas/

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

gas/testsuite/

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

include/opcode/

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

opcodes/

	* 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_OPND_CLASS_COND and AARCH64_OPND_COND1.
	(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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20131105/0332f60a/attachment.ksh>


More information about the Binutils mailing list