[PATCH 08/10] aarch64: Enforce P/M/E order for MOPS instructions

Nick Clifton nickc@redhat.com
Thu Dec 2 12:56:52 GMT 2021


Hi Richard,

> include/
> 	* opcode/aarch64.h (C_SCAN_MOPS_P, C_SCAN_MOPS_M, C_SCAN_MOPS_E)
> 	(C_SCAN_MOPS_PME): New macros.
> 	(AARCH64_OPDE_A_SHOULD_FOLLOW_B): New aarch64_operand_error_kind.
> 	(AARCH64_OPDE_EXPECTED_A_AFTER_B): Likewise.
> 	(aarch64_operand_error): Make each data value a union between
> 	an int and a string.
> 
> opcodes/
> 	* aarch64-tbl.h (MOPS_CPY_OP1_OP2_INSN): Add scan flags.
> 	(MOPS_SET_OP1_OP2_INSN): Likewise.
> 	* aarch64-opc.c (set_out_of_range_error): Update after change to
> 	aarch64_operand_error.
> 	(set_unaligned_error, set_reg_list_error): Likewise.
> 	(init_insn_sequence): Use a 3-instruction sequence for
> 	MOPS P instructions.
> 	(verify_mops_pme_sequence): New function.
> 	(verify_constraints): Call it.
> 	* aarch64-dis.c (print_verifier_notes): Handle
> 	AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B.
> 
> gas/
> 	* config/tc-aarch64.c (operand_mismatch_kind_names): Add entries
> 	for AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B.
> 	(operand_error_higher_severity_p): Check that
> 	AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B
> 	come between AARCH64_OPDE_RECOVERABLE and AARCH64_OPDE_SYNTAX_ERROR;
> 	their relative order is not significant.
> 	(record_operand_error_with_data): Update after change to
> 	aarch64_operand_error.
> 	(output_operand_error_record): Likewise.  Handle
> 	AARCH64_OPDE_A_SHOULD_FOLLOW_B and AARCH64_OPDE_EXPECTED_A_AFTER_B.
> 	* testsuite/gas/aarch64/mops_invalid_2.s,
> 	testsuite/gas/aarch64/mops_invalid_2.d,
> 	testsuite/gas/aarch64/mops_invalid_2.l: New test.

Approved - please apply.

Cheers
   Nick



More information about the Binutils mailing list