From: Andrew Jones <ajones@ventanamicro.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-riscv@lists.infradead.org, kvm-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu, anup@brainfault.org,
mchitale@ventanamicro.com
Subject: Re: [PATCH v2 2/4] riscv: Introduce support for defining instructions
Date: Thu, 8 Sep 2022 18:54:25 +0200 [thread overview]
Message-ID: <20220908165425.ikiyrmhtbwkmko23@kamzik> (raw)
In-Reply-To: <3006889.o7ts2hSHzF@diego>
On Thu, Sep 08, 2022 at 05:49:44PM +0200, Heiko Stübner wrote:
...
> > +#define OPCODE(v) __ASM_STR(v)
> > +#define FUNC3(v) __ASM_STR(v)
> > +#define FUNC7(v) __ASM_STR(v)
> > +#define RD(v) __ASM_STR(v)
> > +#define RS1(v) __ASM_STR(v)
> > +#define RS2(v) __ASM_STR(v)
>
> you might want some sort of prefix here
> RISCV_RS1(v) ?
>
> While trying to adapt this for the cmo stuff I ran into the issue
> of bpf complaining that "IMM" is already defined there.
>
> And names above are generic enough that these also
> might conflict with other stuff.
>
Ah, thanks for the heads up. Indeed, if this gets included in another
header, which gets widely included, then we have a good chance of
bumping into something. It's a pity, but, as you suggest, we probably
need prefixes and __ isn't likely enough alone. I also see __REG is
used elsewhere.
Thanks,
drew
>
>
>
> > +#define __REG(v) __ASM_STR(x ## v)
> > +#define __RD(v) __REG(v)
> > +#define __RS1(v) __REG(v)
> > +#define __RS2(v) __REG(v)
> > +
> > +#endif /* __ASM_INSN_DEF_H */
> >
>
>
>
>
next prev parent reply other threads:[~2022-09-08 16:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 17:24 [PATCH v2 0/4] " Andrew Jones
2022-08-31 17:24 ` [PATCH v2 1/4] riscv: Add X register names to gpr-nums Andrew Jones
2022-09-02 6:51 ` Anup Patel
2022-08-31 17:24 ` [PATCH v2 2/4] riscv: Introduce support for defining instructions Andrew Jones
2022-09-02 6:52 ` Anup Patel
2022-09-08 15:49 ` Heiko Stübner
2022-09-08 16:03 ` Anup Patel
2022-09-08 16:55 ` Andrew Jones
2022-09-08 16:54 ` Andrew Jones [this message]
2022-09-09 11:23 ` Anup Patel
2022-09-09 12:10 ` Heiko Stübner
2022-08-31 17:24 ` [PATCH v2 3/4] riscv: KVM: Apply insn-def to hfence encodings Andrew Jones
2022-09-02 6:52 ` Anup Patel
2022-08-31 17:25 ` [PATCH v2 4/4] riscv: KVM: Apply insn-def to hlv encodings Andrew Jones
2022-09-02 6:53 ` Anup Patel
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=20220908165425.ikiyrmhtbwkmko23@kamzik \
--to=ajones@ventanamicro.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=heiko@sntech.de \
--cc=kvm-riscv@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mchitale@ventanamicro.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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
all inboxes | Powered by JetHome®