binutils-gdb/include
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
..
aout
cgen
coff Fix the fields in the x_n union inside the the x_file structure so that pointers can be stored. 2021-12-01 11:29:34 +00:00
elf readelf: recognize FDO Packaging Metadata ELF note 2021-12-01 14:44:25 +00:00
gdb
mach-o
opcode aarch64: Enforce P/M/E order for MOPS instructions 2021-12-02 15:00:57 +00:00
sim sim: callback: expose argv & environ 2021-11-16 01:13:39 -05:00
som
vms
alloca-conf.h
ansidecl.h
bfdlink.h elf: Add GNU_PROPERTY_1_NEEDED check 2021-07-08 18:14:31 -07:00
binary-io.h
bout.h
ChangeLog Fix the fields in the x_n union inside the the x_file structure so that pointers can be stored. 2021-12-01 11:29:34 +00:00
ChangeLog-0415
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-9103
COPYING
COPYING3
ctf-api.h
ctf.h
demangle.h
diagnostics.h gdb, include: replace pragmas with DIAGNOSTIC macros, fix build with g++ 4.8 2021-12-02 08:24:25 -05:00
dis-asm.h opcodes/riscv: add disassembler options support to libopcodes 2021-11-26 10:18:35 +00:00
dwarf2.def
dwarf2.h
dyn-string.h
environ.h
fibheap.h
filenames.h
floatformat.h
fnmatch.h
fopen-bin.h
fopen-same.h
fopen-vms.h
gcc-c-fe.def
gcc-c-interface.h
gcc-cp-fe.def
gcc-cp-interface.h
gcc-interface.h
getopt.h
hashtab.h
hp-symtab.h
leb128.h
libiberty.h
longlong.h
lto-symtab.h
MAINTAINERS
md5.h
oasys.h
objalloc.h
obstack.h obstack.h __PTR_ALIGN vs. ubsan 2021-09-02 13:48:21 +09:30
os9k.h
partition.h
plugin-api.h
progress.h
safe-ctype.h
sha1.h
simple-object.h
sort.h
splay-tree.h
symcat.h
timeval-utils.h
vtv-change-permission.h
xregex2.h
xregex.h
xtensa-config.h
xtensa-isa-internal.h
xtensa-isa.h