aq and rl bits

125 views
Skip to first unread message

Mark Manning

unread,
May 28, 2026, 7:02:24 AM (5 days ago) May 28
to RISC-V SW Dev
I am currently creating a forth based risc-v assember and i have a question about opcodes that have the aq and rl bits in them.  do each of these support mnemonics in all of the following formats?
xx 
xx.rl
xx.aqrl 


Paul Clarke

unread,
May 28, 2026, 8:07:05 AM (4 days ago) May 28
to Mark Manning, RISC-V SW Dev
In the abstract, I think the answer is "yes", but some of the mnemonic-aq-rl combinations are RESERVED, so not in practice. In Zalasr, for example, the Load-Acquire instructions do not support an "rl-only" mnemonic:

> The versions without the aq bit set are RESERVED.

Similarly for the Store-Release instructions and the "rl" bit.

PC

From: sw-...@groups.riscv.org <sw-...@groups.riscv.org> on behalf of Mark Manning <mar...@gmail.com>
Sent: Thursday, May 28, 2026 3:47 AM
To: RISC-V SW Dev <sw-...@groups.riscv.org>
Subject: [sw-dev] aq and rl bits

WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.

--
You received this message because you are subscribed to the Google Groups "RISC-V SW Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sw-dev+un...@groups.riscv.org.
To view this discussion visit https://groups.google.com/a/groups.riscv.org/d/msgid/sw-dev/4894221d-13d5-48d0-bf6e-001760b4cba3n%40groups.riscv.org.

Mark Manning

unread,
May 28, 2026, 9:53:51 PM (4 days ago) May 28
to RISC-V SW Dev
I had AI generate my tables for me because a lot of the encodings were a little difficult to figure out.  It seems to have hard coded the AQ and AL bits for fli.h fli.s fli.d and fi.q, as well as fminm and fmaxm for .s. .h, .d and .q and a whole bunch of other ZFA opcodes just to name a few.  Where it has specified hard coded values should I take its word for it?  
“When something can be read without effort,
great effort has gone into its writing.”


― Enrique Jardiel Poncela ―

Christoph Müllner

unread,
May 29, 2026, 12:04:44 PM (3 days ago) May 29
to Mark Manning, RISC-V SW Dev
For the A extension LR/SC and AMO instructions, yes: the suffix corresponds
directly to the encoded aq and rl bits, so the unsuffixed, .aq, .rl, and
.aqrl forms represent the four possible bit combinations.

The caveat is that this should be per instruction definition, not a global rule
or every encoding field named aq/rl. For example, Zalasr load-acquire
instructions define the .aq and .aqrl forms, while Zalasr store-release
instructions define the .rl and .aqrl forms; the other aq/rl combinations are
reserved there.

BR
Christoph

Paul Clarke

unread,
May 29, 2026, 12:32:43 PM (3 days ago) May 29
to Mark Manning, RISC-V SW Dev
I don't see that "fli.{h,s,d,q}" nor "{fminm,fmaxm}*" have AQ or RL bits. ? They don't access memory. Where do you see that those fields exist in the encoding?

> Where it has specified hard coded values should I take its word for it?

Sounds like "no", but not in the way you asked. 🙂

PC



Sent: Thursday, May 28, 2026 8:53 PM
Cc: RISC-V SW Dev <sw-...@groups.riscv.org>
Subject: Re: [sw-dev] aq and rl bits

Paul Clarke

unread,
May 29, 2026, 12:36:36 PM (3 days ago) May 29
to Mark Manning, Paul Clarke, RISC-V SW Dev
BTW, I'd be committing malpractice if I didn't at least point to the RISC-V Unified Database project: https://github.com/riscv/riscv-unified-db. That is exactly intended to be used for your use-case (among many others). The idea is to make the content embedded in the spec for human consumption into a database consumable by programs.

(Questions and feedback welcome. I'm a maintainer of that project.)

PC

From: 'Paul Clarke' via RISC-V SW Dev <sw-...@groups.riscv.org>
Sent: Friday, May 29, 2026 11:32 AM
To: Mark Manning <mar...@gmail.com>

ron minnich

unread,
May 29, 2026, 7:38:30 PM (3 days ago) May 29
to Paul Clarke, Mark Manning, RISC-V SW Dev

Tommy Murphy

unread,
May 30, 2026, 12:43:48 AM (3 days ago) May 30
to ron minnich, Paul Clarke, Mark Manning, RISC-V SW Dev
> That URL gets a 404.
>
> Looking forward to seeing it :-)

Remove the extraneous trailing dot/period to get the correct URL:



Reply all
Reply to author
Forward
0 new messages