aarch64: Provide line info for unclosed sequences
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 2 Dec 2021 15:00:56 +0000 (15:00 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 2 Dec 2021 15:00:56 +0000 (15:00 +0000)
commita346bb24cf3b9c71f6a66f022bf4ac80dbf0d8f8
treebadc91a02271ef2680d74404109c3418480114a9
parentb3e59f8873b9f07e84b19a19d40810f9a61b6d62
aarch64: Provide line info for unclosed sequences

We warn about MOVPRFX instructions that have no following
instruction.  This patch adds a line number to the message,
which is useful if the assembly code has multiple text sections.

The new code is unconditional since OBJ_ELF is always defined
for aarch64.

gas/
* config/tc-aarch64.h (aarch64_segment_info_type): Add last_file
and last_line.
* config/tc-aarch64.c (now_instr_sequence): Delete.
(force_automatic_sequence_close): Provide a line number when
reporting unclosed sequences.
(md_assemble): Record the location of the instruction in
tc_segment_info.
* testsuite/gas/aarch64/sve-movprfx_4.l: Add line number to error
message.
* testsuite/gas/aarch64/sve-movprfx_7.l: Likewise.
* testsuite/gas/aarch64/sve-movprfx_8.l: Likewise.
gas/config/tc-aarch64.c
gas/config/tc-aarch64.h
gas/testsuite/gas/aarch64/sve-movprfx_4.l
gas/testsuite/gas/aarch64/sve-movprfx_7.l
gas/testsuite/gas/aarch64/sve-movprfx_8.l