From: Nick Clifton <nickc@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] GAS: Allow AArch64 pseudo-ops to accept the command line separator character.
Date: Thu, 25 Aug 2022 10:40:35 +0000 (GMT) [thread overview]
Message-ID: <20220825104035.BA920385482A@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e8f20526238199c18afe163a230eafe19b51fca0
commit e8f20526238199c18afe163a230eafe19b51fca0
Author: Nick Clifton <nickc@redhat.com>
Date: Thu Aug 25 11:39:50 2022 +0100
GAS: Allow AArch64 pseudo-ops to accept the command line separator character.
PR 29519
* config/tc-aarch64.c (s_unreq): Use find_end_of_line().
(s_aarch64_cpu): Likewise.
(s_aarch64_arch): Likewise.
(s_aarch64_arch_extension): Likewise.
* testsuite/gas/aarch64/pr29519.d: New test driver file.
* testsuite/gas/aarch64/pr29519.s: New test source file.
Diff:
---
gas/ChangeLog | 10 ++++++++++
gas/config/tc-aarch64.c | 17 +++++------------
gas/testsuite/gas/aarch64/pr29519.d | 11 +++++++++++
gas/testsuite/gas/aarch64/pr29519.s | 4 ++++
4 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 23c09c40950..d3f52bf84d1 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2022-08-25 Nick Clifton <nickc@redhat.com>
+
+ PR 29519
+ * config/tc-aarch64.c (s_unreq): Use find_end_of_line().
+ (s_aarch64_cpu): Likewise.
+ (s_aarch64_arch): Likewise.
+ (s_aarch64_arch_extension): Likewise.
+ * testsuite/gas/aarch64/pr29519.d: New test driver file.
+ * testsuite/gas/aarch64/pr29519.s: New test source file.
+
2022-08-08 Tsukasa OI <research_trasio@irq.a4lg.com>
* config/obj-macho.c (obj_mach_o_get_section_names): Wrap two
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index f023e5b0a28..98a7ca5878f 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -1400,11 +1400,7 @@ s_unreq (int a ATTRIBUTE_UNUSED)
char saved_char;
name = input_line_pointer;
-
- while (*input_line_pointer != 0
- && *input_line_pointer != ' ' && *input_line_pointer != '\n')
- ++input_line_pointer;
-
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
@@ -10378,8 +10374,7 @@ s_aarch64_cpu (int ignored ATTRIBUTE_UNUSED)
size_t optlen;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
@@ -10424,8 +10419,7 @@ s_aarch64_arch (int ignored ATTRIBUTE_UNUSED)
size_t optlen;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
@@ -10464,10 +10458,9 @@ static void
s_aarch64_arch_extension (int ignored ATTRIBUTE_UNUSED)
{
char saved_char;
- char *ext = input_line_pointer;;
+ char *ext = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
diff --git a/gas/testsuite/gas/aarch64/pr29519.d b/gas/testsuite/gas/aarch64/pr29519.d
new file mode 100644
index 00000000000..4bfea09bee0
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/pr29519.d
@@ -0,0 +1,11 @@
+# Check that AArch64 specific pseudo-ops can be separated by the ; line separator character.
+#name: PR29519 (Separating AArch64 pseudo-ops with ;)
+#objdump: -rd
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+0 <\.text>:
+.*\.word[ ]+0x0+0
+#pass
diff --git a/gas/testsuite/gas/aarch64/pr29519.s b/gas/testsuite/gas/aarch64/pr29519.s
new file mode 100644
index 00000000000..50c477c7511
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/pr29519.s
@@ -0,0 +1,4 @@
+foo .req x0 ; bar .req x1
+.unreq foo ; .unreq bar
+.cpu generic ; .arch armv8-a ; .arch_extension crc ; .word 0
+
reply other threads:[~2022-08-25 10:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220825104035.BA920385482A@sourceware.org \
--to=nickc@sourceware.org \
--cc=bfd-cvs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).