binutils-gdb/include/opcode
Richard Sandiford 63eff94751 aarch64: Enforce P/M/E order for MOPS instructions
The MOPS instructions should be used as a triple, such as:

       cpyfp [x0]!, [x1]!, x2!
       cpyfm [x0]!, [x1]!, x2!
       cpyfe [x0]!, [x1]!, x2!

The registers should also be the same for each writeback operand.
This patch adds a warning for code that doesn't follow this rule,
along similar lines to the warning that we already emit for
invalid uses of MOVPRFX.

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.
2021-12-02 15:00:57 +00:00
..
aarch64.h aarch64: Enforce P/M/E order for MOPS instructions 2021-12-02 15:00:57 +00:00
alpha.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
arc-attrs.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
arc-func.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
arc.h Use bool in include 2021-03-31 10:49:23 +10:30
arm.h arm: add armv9-a architecture to -march 2021-11-01 10:51:03 +00:00
avr.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
bfin.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
cgen.h Remove bfd_stdint.h 2021-03-31 10:49:23 +10:30
ChangeLog-0415
ChangeLog-9103
convex.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
cr16.h Remove strneq macro and use startswith. 2021-04-01 15:00:56 +02:00
cris.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
crx.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
csky.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
d10v.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
d30v.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
dlx.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ft32.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
h8300.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
hppa.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
i386.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ia64.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
loongarch.h LoongArch opcodes support 2021-10-24 21:36:31 +10:30
m68hc11.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
m68k.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
metag.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
mips.h MIPS/opcodes: Properly handle ISA exclusion 2021-05-29 03:26:32 +02:00
mmix.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
mn10200.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
mn10300.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
moxie.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
msp430-decode.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
msp430.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
nds32.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
nfp.h Remove bfd_stdint.h 2021-03-31 10:49:23 +10:30
nios2.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
nios2r1.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
nios2r2.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
np1.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ns32k.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
pdp11.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
pj.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
pn.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ppc.h Remove bfd_stdint.h 2021-03-31 10:49:23 +10:30
pru.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
pyr.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
riscv-opc.h RISC-V: Support rvv extension with released version 1.0. 2021-11-17 20:18:11 +08:00
riscv.h RISC-V: The vtype immediate with more than the defined 8 bits are preserved. 2021-11-30 19:03:48 +08:00
rl78.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
rx.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
s12z.h
s390.h IBM Z: Implement instruction set extensions 2021-02-15 14:32:17 +01:00
score-datadep.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
score-inst.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
sparc.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
spu-insns.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
spu.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
tic4x.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
tic6x-control-registers.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
tic6x-insn-formats.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
tic6x-opcode-table.h Use bool in include 2021-03-31 10:49:23 +10:30
tic6x.h Use bool in include 2021-03-31 10:49:23 +10:30
tic30.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
tic54x.h opcodes: tic54x: namespace exported variables 2021-02-08 18:26:08 -05:00
tilegx.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
tilepro.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
v850.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
vax.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
visium.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
wasm.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
xgate.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30