public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	Andrew Waterman <andrew@sifive.com>,
	Jim Wilson <jim.wilson.gcc@gmail.com>,
	Nelson Chu <nelson@rivosinc.com>
Subject: [PATCH 1/2] RISC-V: test for expected / no unexpected symbols
Date: Mon, 13 Feb 2023 09:02:36 +0100	[thread overview]
Message-ID: <5003cbd5-448c-7f39-5219-ae3bfe50504f@suse.com> (raw)
In-Reply-To: <2df3478a-3cd9-d7b5-670e-60683ae3066e@suse.com>

Both the temporary workaround for PR/gas 29940 and the existing special
casing of GPRs in my_getSmallExpression() aren't really tested anywhere
(i.e. with the workarounds remove testing would still succeed). Nor is
there any test for uses of symbols with names matching GPRs, where such
is permitted. Before altering how this is to be dealt with, install two
testcases covering the expected behavior. (For now this includes only
known affected insns; re-ordering of entries in riscv_opcodes[] could,
however, yield more of them.)

--- /dev/null
+++ b/gas/testsuite/gas/riscv/reg-syms.d
@@ -0,0 +1,6 @@
+#as: -march=rv32i
+#nm: --
+
+0+ t start
+ +U x2
+ +U x4
--- /dev/null
+++ b/gas/testsuite/gas/riscv/reg-syms.s
@@ -0,0 +1,8 @@
+	.text
+start:
+	and	x8, x8, x1
+	j	x2
+	jal	x3, x4
+	sll	x1, x1, x5
+	sra	x8, x8, x6
+	srl	x8, x8, x7
--- /dev/null
+++ b/gas/testsuite/gas/riscv/reg-syms-C.d
@@ -0,0 +1,4 @@
+#as: -march=rv32ic
+#source: reg-syms.s
+#nm: --
+#dump: reg-syms.d


  reply	other threads:[~2023-02-13  8:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13  8:01 [PATCH 0/2] RISC-V/gas: re-work register named symbols avoidance logic Jan Beulich
2023-02-13  8:02 ` Jan Beulich [this message]
2023-02-13  8:02 ` [PATCH 2/2] RISC-V: adjust logic to avoid register name symbols Jan Beulich
2023-02-15  3:09   ` Nelson Chu
2023-02-15  8:03     ` Jan Beulich
2023-02-15  8:48       ` Nelson Chu
2023-02-15  9:21         ` Jan Beulich
2023-02-16  9:36           ` Nelson Chu
2023-02-16 16:49             ` Jan Beulich
2023-02-16 16:54               ` Palmer Dabbelt
2023-03-03 13:52             ` Jan Beulich
2023-03-15 10:07               ` Nelson Chu
2023-03-15 11:49                 ` Jan Beulich
2023-03-16  0:30                   ` Nelson Chu
2023-04-19  9:37                     ` Jan Beulich

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=5003cbd5-448c-7f39-5219-ae3bfe50504f@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=nelson@rivosinc.com \
    --cc=palmer@dabbelt.com \
    /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).