RISC-V: PR27764, Add tests for A extension

Message ID 20210421222827.3957546-1-cmuellner@gcc.gnu.org
State New
Headers show
Series
  • RISC-V: PR27764, Add tests for A extension
Related show

Commit Message

Alan Modra via Binutils April 21, 2021, 10:28 p.m.
gas/
    PR 27764
    * testsuite/gas/riscv/a-ext-64.d: New testcase.
    * testsuite/gas/riscv/a-ext-64.s: Likewise.
    * testsuite/gas/riscv/a-ext.d: Likewise.
    * testsuite/gas/riscv/a-ext.s: Likewise.

Signed-off-by: Christoph Muellner <cmuellner@gcc.gnu.org>

---
 gas/testsuite/gas/riscv/a-ext-64.d | 186 +++++++++++++++++++++++++++++
 gas/testsuite/gas/riscv/a-ext-64.s | 177 +++++++++++++++++++++++++++
 gas/testsuite/gas/riscv/a-ext.d    |  98 +++++++++++++++
 gas/testsuite/gas/riscv/a-ext.s    |  89 ++++++++++++++
 4 files changed, 550 insertions(+)
 create mode 100644 gas/testsuite/gas/riscv/a-ext-64.d
 create mode 100644 gas/testsuite/gas/riscv/a-ext-64.s
 create mode 100644 gas/testsuite/gas/riscv/a-ext.d
 create mode 100644 gas/testsuite/gas/riscv/a-ext.s

-- 
2.30.2

Comments

Nelson Chu April 23, 2021, 7:21 a.m. | #1
LGTM.  Do you have write access of binutils?  If you have, then it
would be great if you can commit the patch.  Otherwise, we can commit
it if you don't have write access.

Thank you very much
Nelson

On Thu, Apr 22, 2021 at 6:28 AM Christoph Muellner via Binutils
<binutils@sourceware.org> wrote:
>

> gas/

>     PR 27764

>     * testsuite/gas/riscv/a-ext-64.d: New testcase.

>     * testsuite/gas/riscv/a-ext-64.s: Likewise.

>     * testsuite/gas/riscv/a-ext.d: Likewise.

>     * testsuite/gas/riscv/a-ext.s: Likewise.

>

> Signed-off-by: Christoph Muellner <cmuellner@gcc.gnu.org>

> ---

>  gas/testsuite/gas/riscv/a-ext-64.d | 186 +++++++++++++++++++++++++++++

>  gas/testsuite/gas/riscv/a-ext-64.s | 177 +++++++++++++++++++++++++++

>  gas/testsuite/gas/riscv/a-ext.d    |  98 +++++++++++++++

>  gas/testsuite/gas/riscv/a-ext.s    |  89 ++++++++++++++

>  4 files changed, 550 insertions(+)

>  create mode 100644 gas/testsuite/gas/riscv/a-ext-64.d

>  create mode 100644 gas/testsuite/gas/riscv/a-ext-64.s

>  create mode 100644 gas/testsuite/gas/riscv/a-ext.d

>  create mode 100644 gas/testsuite/gas/riscv/a-ext.s

>

> diff --git a/gas/testsuite/gas/riscv/a-ext-64.d b/gas/testsuite/gas/riscv/a-ext-64.d

> new file mode 100644

> index 00000000000..86d24008688

> --- /dev/null

> +++ b/gas/testsuite/gas/riscv/a-ext-64.d

> @@ -0,0 +1,186 @@

> +#as: -march=rv64ia

> +#source: a-ext-64.s

> +#objdump: -d

> +

> +.*:[   ]+file format .*

> +

> +

> +Disassembly of section .text:

> +

> +0+000 <target>:

> +[      ]+0:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> +[      ]+4:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> +[      ]+8:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> +[      ]+c:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> +[      ]+10:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> +[      ]+14:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> +[      ]+18:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> +[      ]+1c:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> +[      ]+20:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> +[      ]+24:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> +[      ]+28:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> +[      ]+2c:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> +[      ]+30:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> +[      ]+34:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> +[      ]+38:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> +[      ]+3c:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> +[      ]+40:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> +[      ]+44:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> +[      ]+48:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+4c:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+50:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+54:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+58:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+5c:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+60:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> +[      ]+64:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> +[      ]+68:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+6c:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+70:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+74:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+78:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+7c:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+80:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> +[      ]+84:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> +[      ]+88:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+8c:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+90:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+94:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+98:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+9c:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+a0:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> +[      ]+a4:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> +[      ]+a8:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+ac:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+b0:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+b4:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+b8:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+bc:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+c0:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> +[      ]+c4:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> +[      ]+c8:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> +[      ]+cc:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> +[      ]+d0:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> +[      ]+d4:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> +[      ]+d8:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> +[      ]+dc:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> +[      ]+e0:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> +[      ]+e4:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> +[      ]+e8:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+ec:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+f0:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+f4:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+f8:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+fc:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+100:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> +[      ]+104:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> +[      ]+108:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+10c:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+110:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+114:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+118:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+11c:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+120:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> +[      ]+124:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> +[      ]+128:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+12c:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+130:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+134:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+138:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+13c:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+140:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> +[      ]+144:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> +[      ]+148:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+14c:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+150:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+154:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+158:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+15c:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+160:[         ]+1005352f[     ]+lr.d[         ]+a0,\(a0\)

> +[      ]+164:[         ]+1005352f[     ]+lr.d[         ]+a0,\(a0\)

> +[      ]+168:[         ]+1405352f[     ]+lr.d.aq[      ]+a0,\(a0\)

> +[      ]+16c:[         ]+1405352f[     ]+lr.d.aq[      ]+a0,\(a0\)

> +[      ]+170:[         ]+1205352f[     ]+lr.d.rl[      ]+a0,\(a0\)

> +[      ]+174:[         ]+1205352f[     ]+lr.d.rl[      ]+a0,\(a0\)

> +[      ]+178:[         ]+1605352f[     ]+lr.d.aqrl[    ]+a0,\(a0\)

> +[      ]+17c:[         ]+1605352f[     ]+lr.d.aqrl[    ]+a0,\(a0\)

> +[      ]+180:[         ]+18a5352f[     ]+sc.d[         ]+a0,a0,\(a0\)

> +[      ]+184:[         ]+18a5352f[     ]+sc.d[         ]+a0,a0,\(a0\)

> +[      ]+188:[         ]+1ca5352f[     ]+sc.d.aq[      ]+a0,a0,\(a0\)

> +[      ]+18c:[         ]+1ca5352f[     ]+sc.d.aq[      ]+a0,a0,\(a0\)

> +[      ]+190:[         ]+1aa5352f[     ]+sc.d.rl[      ]+a0,a0,\(a0\)

> +[      ]+194:[         ]+1aa5352f[     ]+sc.d.rl[      ]+a0,a0,\(a0\)

> +[      ]+198:[         ]+1ea5352f[     ]+sc.d.aqrl[    ]+a0,a0,\(a0\)

> +[      ]+19c:[         ]+1ea5352f[     ]+sc.d.aqrl[    ]+a0,a0,\(a0\)

> +[      ]+1a0:[         ]+08a5352f[     ]+amoswap.d[    ]+a0,a0,\(a0\)

> +[      ]+1a4:[         ]+08a5352f[     ]+amoswap.d[    ]+a0,a0,\(a0\)

> +[      ]+1a8:[         ]+0ca5352f[     ]+amoswap.d.aq[         ]+a0,a0,\(a0\)

> +[      ]+1ac:[         ]+0ca5352f[     ]+amoswap.d.aq[         ]+a0,a0,\(a0\)

> +[      ]+1b0:[         ]+0aa5352f[     ]+amoswap.d.rl[         ]+a0,a0,\(a0\)

> +[      ]+1b4:[         ]+0aa5352f[     ]+amoswap.d.rl[         ]+a0,a0,\(a0\)

> +[      ]+1b8:[         ]+0ea5352f[     ]+amoswap.d.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+1bc:[         ]+0ea5352f[     ]+amoswap.d.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+1c0:[         ]+00a5352f[     ]+amoadd.d[     ]+a0,a0,\(a0\)

> +[      ]+1c4:[         ]+00a5352f[     ]+amoadd.d[     ]+a0,a0,\(a0\)

> +[      ]+1c8:[         ]+04a5352f[     ]+amoadd.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+1cc:[         ]+04a5352f[     ]+amoadd.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+1d0:[         ]+02a5352f[     ]+amoadd.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+1d4:[         ]+02a5352f[     ]+amoadd.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+1d8:[         ]+06a5352f[     ]+amoadd.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+1dc:[         ]+06a5352f[     ]+amoadd.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+1e0:[         ]+20a5352f[     ]+amoxor.d[     ]+a0,a0,\(a0\)

> +[      ]+1e4:[         ]+20a5352f[     ]+amoxor.d[     ]+a0,a0,\(a0\)

> +[      ]+1e8:[         ]+24a5352f[     ]+amoxor.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+1ec:[         ]+24a5352f[     ]+amoxor.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+1f0:[         ]+22a5352f[     ]+amoxor.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+1f4:[         ]+22a5352f[     ]+amoxor.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+1f8:[         ]+26a5352f[     ]+amoxor.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+1fc:[         ]+26a5352f[     ]+amoxor.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+200:[         ]+60a5352f[     ]+amoand.d[     ]+a0,a0,\(a0\)

> +[      ]+204:[         ]+60a5352f[     ]+amoand.d[     ]+a0,a0,\(a0\)

> +[      ]+208:[         ]+64a5352f[     ]+amoand.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+20c:[         ]+64a5352f[     ]+amoand.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+210:[         ]+62a5352f[     ]+amoand.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+214:[         ]+62a5352f[     ]+amoand.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+218:[         ]+66a5352f[     ]+amoand.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+21c:[         ]+66a5352f[     ]+amoand.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+220:[         ]+40a5352f[     ]+amoor.d[      ]+a0,a0,\(a0\)

> +[      ]+224:[         ]+40a5352f[     ]+amoor.d[      ]+a0,a0,\(a0\)

> +[      ]+228:[         ]+44a5352f[     ]+amoor.d.aq[   ]+a0,a0,\(a0\)

> +[      ]+22c:[         ]+44a5352f[     ]+amoor.d.aq[   ]+a0,a0,\(a0\)

> +[      ]+230:[         ]+42a5352f[     ]+amoor.d.rl[   ]+a0,a0,\(a0\)

> +[      ]+234:[         ]+42a5352f[     ]+amoor.d.rl[   ]+a0,a0,\(a0\)

> +[      ]+238:[         ]+46a5352f[     ]+amoor.d.aqrl[         ]+a0,a0,\(a0\)

> +[      ]+23c:[         ]+46a5352f[     ]+amoor.d.aqrl[         ]+a0,a0,\(a0\)

> +[      ]+240:[         ]+80a5352f[     ]+amomin.d[     ]+a0,a0,\(a0\)

> +[      ]+244:[         ]+80a5352f[     ]+amomin.d[     ]+a0,a0,\(a0\)

> +[      ]+248:[         ]+84a5352f[     ]+amomin.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+24c:[         ]+84a5352f[     ]+amomin.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+250:[         ]+82a5352f[     ]+amomin.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+254:[         ]+82a5352f[     ]+amomin.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+258:[         ]+86a5352f[     ]+amomin.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+25c:[         ]+86a5352f[     ]+amomin.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+260:[         ]+a0a5352f[     ]+amomax.d[     ]+a0,a0,\(a0\)

> +[      ]+264:[         ]+a0a5352f[     ]+amomax.d[     ]+a0,a0,\(a0\)

> +[      ]+268:[         ]+a4a5352f[     ]+amomax.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+26c:[         ]+a4a5352f[     ]+amomax.d.aq[  ]+a0,a0,\(a0\)

> +[      ]+270:[         ]+a2a5352f[     ]+amomax.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+274:[         ]+a2a5352f[     ]+amomax.d.rl[  ]+a0,a0,\(a0\)

> +[      ]+278:[         ]+a6a5352f[     ]+amomax.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+27c:[         ]+a6a5352f[     ]+amomax.d.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+280:[         ]+c0a5352f[     ]+amominu.d[    ]+a0,a0,\(a0\)

> +[      ]+284:[         ]+c0a5352f[     ]+amominu.d[    ]+a0,a0,\(a0\)

> +[      ]+288:[         ]+c4a5352f[     ]+amominu.d.aq[         ]+a0,a0,\(a0\)

> +[      ]+28c:[         ]+c4a5352f[     ]+amominu.d.aq[         ]+a0,a0,\(a0\)

> +[      ]+290:[         ]+c2a5352f[     ]+amominu.d.rl[         ]+a0,a0,\(a0\)

> +[      ]+294:[         ]+c2a5352f[     ]+amominu.d.rl[         ]+a0,a0,\(a0\)

> +[      ]+298:[         ]+c6a5352f[     ]+amominu.d.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+29c:[         ]+c6a5352f[     ]+amominu.d.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+2a0:[         ]+e0a5352f[     ]+amomaxu.d[    ]+a0,a0,\(a0\)

> +[      ]+2a4:[         ]+e0a5352f[     ]+amomaxu.d[    ]+a0,a0,\(a0\)

> +[      ]+2a8:[         ]+e4a5352f[     ]+amomaxu.d.aq[         ]+a0,a0,\(a0\)

> +[      ]+2ac:[         ]+e4a5352f[     ]+amomaxu.d.aq[         ]+a0,a0,\(a0\)

> +[      ]+2b0:[         ]+e2a5352f[     ]+amomaxu.d.rl[         ]+a0,a0,\(a0\)

> +[      ]+2b4:[         ]+e2a5352f[     ]+amomaxu.d.rl[         ]+a0,a0,\(a0\)

> +[      ]+2b8:[         ]+e6a5352f[     ]+amomaxu.d.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+2bc:[         ]+e6a5352f[     ]+amomaxu.d.aqrl[       ]+a0,a0,\(a0\)

> diff --git a/gas/testsuite/gas/riscv/a-ext-64.s b/gas/testsuite/gas/riscv/a-ext-64.s

> new file mode 100644

> index 00000000000..cc5b8d5f9b9

> --- /dev/null

> +++ b/gas/testsuite/gas/riscv/a-ext-64.s

> @@ -0,0 +1,177 @@

> +target:

> +       lr.w    a0, 0(a0)

> +       lr.w    a0, (a0)

> +       lr.w.aq a0, 0(a0)

> +       lr.w.aq a0, (a0)

> +       lr.w.rl a0, 0(a0)

> +       lr.w.rl a0, (a0)

> +       lr.w.aqrl       a0, 0(a0)

> +       lr.w.aqrl       a0, (a0)

> +       sc.w    a0, a0, 0(a0)

> +       sc.w    a0, a0, (a0)

> +       sc.w.aq a0, a0, 0(a0)

> +       sc.w.aq a0, a0, (a0)

> +       sc.w.rl a0, a0, 0(a0)

> +       sc.w.rl a0, a0, (a0)

> +       sc.w.aqrl       a0, a0, 0(a0)

> +       sc.w.aqrl       a0, a0, (a0)

> +       amoswap.w       a0, a0, 0(a0)

> +       amoswap.w       a0, a0, (a0)

> +       amoswap.w.aq    a0, a0, 0(a0)

> +       amoswap.w.aq    a0, a0, (a0)

> +       amoswap.w.rl    a0, a0, 0(a0)

> +       amoswap.w.rl    a0, a0, (a0)

> +       amoswap.w.aqrl  a0, a0, 0(a0)

> +       amoswap.w.aqrl  a0, a0, (a0)

> +       amoadd.w        a0, a0, 0(a0)

> +       amoadd.w        a0, a0, (a0)

> +       amoadd.w.aq     a0, a0, 0(a0)

> +       amoadd.w.aq     a0, a0, (a0)

> +       amoadd.w.rl     a0, a0, 0(a0)

> +       amoadd.w.rl     a0, a0, (a0)

> +       amoadd.w.aqrl   a0, a0, 0(a0)

> +       amoadd.w.aqrl   a0, a0, (a0)

> +       amoxor.w        a0, a0, 0(a0)

> +       amoxor.w        a0, a0, (a0)

> +       amoxor.w.aq     a0, a0, 0(a0)

> +       amoxor.w.aq     a0, a0, (a0)

> +       amoxor.w.rl     a0, a0, 0(a0)

> +       amoxor.w.rl     a0, a0, (a0)

> +       amoxor.w.aqrl   a0, a0, 0(a0)

> +       amoxor.w.aqrl   a0, a0, (a0)

> +       amoand.w        a0, a0, 0(a0)

> +       amoand.w        a0, a0, (a0)

> +       amoand.w.aq     a0, a0, 0(a0)

> +       amoand.w.aq     a0, a0, (a0)

> +       amoand.w.rl     a0, a0, 0(a0)

> +       amoand.w.rl     a0, a0, (a0)

> +       amoand.w.aqrl   a0, a0, 0(a0)

> +       amoand.w.aqrl   a0, a0, (a0)

> +       amoor.w a0, a0, 0(a0)

> +       amoor.w a0, a0, (a0)

> +       amoor.w.aq      a0, a0, 0(a0)

> +       amoor.w.aq      a0, a0, (a0)

> +       amoor.w.rl      a0, a0, 0(a0)

> +       amoor.w.rl      a0, a0, (a0)

> +       amoor.w.aqrl    a0, a0, 0(a0)

> +       amoor.w.aqrl    a0, a0, (a0)

> +       amomin.w        a0, a0, 0(a0)

> +       amomin.w        a0, a0, (a0)

> +       amomin.w.aq     a0, a0, 0(a0)

> +       amomin.w.aq     a0, a0, (a0)

> +       amomin.w.rl     a0, a0, 0(a0)

> +       amomin.w.rl     a0, a0, (a0)

> +       amomin.w.aqrl   a0, a0, 0(a0)

> +       amomin.w.aqrl   a0, a0, (a0)

> +       amomax.w        a0, a0, 0(a0)

> +       amomax.w        a0, a0, (a0)

> +       amomax.w.aq     a0, a0, 0(a0)

> +       amomax.w.aq     a0, a0, (a0)

> +       amomax.w.rl     a0, a0, 0(a0)

> +       amomax.w.rl     a0, a0, (a0)

> +       amomax.w.aqrl   a0, a0, 0(a0)

> +       amomax.w.aqrl   a0, a0, (a0)

> +       amominu.w       a0, a0, 0(a0)

> +       amominu.w       a0, a0, (a0)

> +       amominu.w.aq    a0, a0, 0(a0)

> +       amominu.w.aq    a0, a0, (a0)

> +       amominu.w.rl    a0, a0, 0(a0)

> +       amominu.w.rl    a0, a0, (a0)

> +       amominu.w.aqrl  a0, a0, 0(a0)

> +       amominu.w.aqrl  a0, a0, (a0)

> +       amomaxu.w       a0, a0, 0(a0)

> +       amomaxu.w       a0, a0, (a0)

> +       amomaxu.w.aq    a0, a0, 0(a0)

> +       amomaxu.w.aq    a0, a0, (a0)

> +       amomaxu.w.rl    a0, a0, 0(a0)

> +       amomaxu.w.rl    a0, a0, (a0)

> +       amomaxu.w.aqrl  a0, a0, 0(a0)

> +       amomaxu.w.aqrl  a0, a0, (a0)

> +       lr.d    a0, 0(a0)

> +       lr.d    a0, (a0)

> +       lr.d.aq a0, 0(a0)

> +       lr.d.aq a0, (a0)

> +       lr.d.rl a0, 0(a0)

> +       lr.d.rl a0, (a0)

> +       lr.d.aqrl       a0, 0(a0)

> +       lr.d.aqrl       a0, (a0)

> +       sc.d    a0, a0, 0(a0)

> +       sc.d    a0, a0, (a0)

> +       sc.d.aq a0, a0, 0(a0)

> +       sc.d.aq a0, a0, (a0)

> +       sc.d.rl a0, a0, 0(a0)

> +       sc.d.rl a0, a0, (a0)

> +       sc.d.aqrl       a0, a0, 0(a0)

> +       sc.d.aqrl       a0, a0, (a0)

> +       amoswap.d       a0, a0, 0(a0)

> +       amoswap.d       a0, a0, (a0)

> +       amoswap.d.aq    a0, a0, 0(a0)

> +       amoswap.d.aq    a0, a0, (a0)

> +       amoswap.d.rl    a0, a0, 0(a0)

> +       amoswap.d.rl    a0, a0, (a0)

> +       amoswap.d.aqrl  a0, a0, 0(a0)

> +       amoswap.d.aqrl  a0, a0, (a0)

> +       amoadd.d        a0, a0, 0(a0)

> +       amoadd.d        a0, a0, (a0)

> +       amoadd.d.aq     a0, a0, 0(a0)

> +       amoadd.d.aq     a0, a0, (a0)

> +       amoadd.d.rl     a0, a0, 0(a0)

> +       amoadd.d.rl     a0, a0, (a0)

> +       amoadd.d.aqrl   a0, a0, 0(a0)

> +       amoadd.d.aqrl   a0, a0, (a0)

> +       amoxor.d        a0, a0, 0(a0)

> +       amoxor.d        a0, a0, (a0)

> +       amoxor.d.aq     a0, a0, 0(a0)

> +       amoxor.d.aq     a0, a0, (a0)

> +       amoxor.d.rl     a0, a0, 0(a0)

> +       amoxor.d.rl     a0, a0, (a0)

> +       amoxor.d.aqrl   a0, a0, 0(a0)

> +       amoxor.d.aqrl   a0, a0, (a0)

> +       amoand.d        a0, a0, 0(a0)

> +       amoand.d        a0, a0, (a0)

> +       amoand.d.aq     a0, a0, 0(a0)

> +       amoand.d.aq     a0, a0, (a0)

> +       amoand.d.rl     a0, a0, 0(a0)

> +       amoand.d.rl     a0, a0, (a0)

> +       amoand.d.aqrl   a0, a0, 0(a0)

> +       amoand.d.aqrl   a0, a0, (a0)

> +       amoor.d a0, a0, 0(a0)

> +       amoor.d a0, a0, (a0)

> +       amoor.d.aq      a0, a0, 0(a0)

> +       amoor.d.aq      a0, a0, (a0)

> +       amoor.d.rl      a0, a0, 0(a0)

> +       amoor.d.rl      a0, a0, (a0)

> +       amoor.d.aqrl    a0, a0, 0(a0)

> +       amoor.d.aqrl    a0, a0, (a0)

> +       amomin.d        a0, a0, 0(a0)

> +       amomin.d        a0, a0, (a0)

> +       amomin.d.aq     a0, a0, 0(a0)

> +       amomin.d.aq     a0, a0, (a0)

> +       amomin.d.rl     a0, a0, 0(a0)

> +       amomin.d.rl     a0, a0, (a0)

> +       amomin.d.aqrl   a0, a0, 0(a0)

> +       amomin.d.aqrl   a0, a0, (a0)

> +       amomax.d        a0, a0, 0(a0)

> +       amomax.d        a0, a0, (a0)

> +       amomax.d.aq     a0, a0, 0(a0)

> +       amomax.d.aq     a0, a0, (a0)

> +       amomax.d.rl     a0, a0, 0(a0)

> +       amomax.d.rl     a0, a0, (a0)

> +       amomax.d.aqrl   a0, a0, 0(a0)

> +       amomax.d.aqrl   a0, a0, (a0)

> +       amominu.d       a0, a0, 0(a0)

> +       amominu.d       a0, a0, (a0)

> +       amominu.d.aq    a0, a0, 0(a0)

> +       amominu.d.aq    a0, a0, (a0)

> +       amominu.d.rl    a0, a0, 0(a0)

> +       amominu.d.rl    a0, a0, (a0)

> +       amominu.d.aqrl  a0, a0, 0(a0)

> +       amominu.d.aqrl  a0, a0, (a0)

> +       amomaxu.d       a0, a0, 0(a0)

> +       amomaxu.d       a0, a0, (a0)

> +       amomaxu.d.aq    a0, a0, 0(a0)

> +       amomaxu.d.aq    a0, a0, (a0)

> +       amomaxu.d.rl    a0, a0, 0(a0)

> +       amomaxu.d.rl    a0, a0, (a0)

> +       amomaxu.d.aqrl  a0, a0, 0(a0)

> +       amomaxu.d.aqrl  a0, a0, (a0)

> diff --git a/gas/testsuite/gas/riscv/a-ext.d b/gas/testsuite/gas/riscv/a-ext.d

> new file mode 100644

> index 00000000000..e0c3b9a394c

> --- /dev/null

> +++ b/gas/testsuite/gas/riscv/a-ext.d

> @@ -0,0 +1,98 @@

> +#as: -march=rv32ia

> +#source: a-ext.s

> +#objdump: -d

> +

> +.*:[   ]+file format .*

> +

> +

> +Disassembly of section .text:

> +

> +0+000 <target>:

> +[      ]+0:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> +[      ]+4:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> +[      ]+8:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> +[      ]+c:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> +[      ]+10:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> +[      ]+14:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> +[      ]+18:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> +[      ]+1c:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> +[      ]+20:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> +[      ]+24:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> +[      ]+28:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> +[      ]+2c:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> +[      ]+30:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> +[      ]+34:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> +[      ]+38:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> +[      ]+3c:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> +[      ]+40:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> +[      ]+44:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> +[      ]+48:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+4c:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+50:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+54:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+58:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+5c:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+60:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> +[      ]+64:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> +[      ]+68:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+6c:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+70:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+74:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+78:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+7c:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+80:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> +[      ]+84:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> +[      ]+88:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+8c:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+90:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+94:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+98:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+9c:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+a0:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> +[      ]+a4:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> +[      ]+a8:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+ac:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+b0:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+b4:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+b8:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+bc:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+c0:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> +[      ]+c4:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> +[      ]+c8:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> +[      ]+cc:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> +[      ]+d0:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> +[      ]+d4:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> +[      ]+d8:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> +[      ]+dc:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> +[      ]+e0:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> +[      ]+e4:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> +[      ]+e8:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+ec:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+f0:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+f4:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+f8:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+fc:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+100:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> +[      ]+104:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> +[      ]+108:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+10c:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> +[      ]+110:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+114:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> +[      ]+118:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+11c:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> +[      ]+120:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> +[      ]+124:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> +[      ]+128:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+12c:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+130:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+134:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+138:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+13c:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+140:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> +[      ]+144:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> +[      ]+148:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+14c:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> +[      ]+150:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+154:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> +[      ]+158:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> +[      ]+15c:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> diff --git a/gas/testsuite/gas/riscv/a-ext.s b/gas/testsuite/gas/riscv/a-ext.s

> new file mode 100644

> index 00000000000..09ef16686f7

> --- /dev/null

> +++ b/gas/testsuite/gas/riscv/a-ext.s

> @@ -0,0 +1,89 @@

> +target:

> +       lr.w    a0, 0(a0)

> +       lr.w    a0, (a0)

> +       lr.w.aq a0, 0(a0)

> +       lr.w.aq a0, (a0)

> +       lr.w.rl a0, 0(a0)

> +       lr.w.rl a0, (a0)

> +       lr.w.aqrl       a0, 0(a0)

> +       lr.w.aqrl       a0, (a0)

> +       sc.w    a0, a0, 0(a0)

> +       sc.w    a0, a0, (a0)

> +       sc.w.aq a0, a0, 0(a0)

> +       sc.w.aq a0, a0, (a0)

> +       sc.w.rl a0, a0, 0(a0)

> +       sc.w.rl a0, a0, (a0)

> +       sc.w.aqrl       a0, a0, 0(a0)

> +       sc.w.aqrl       a0, a0, (a0)

> +       amoswap.w       a0, a0, 0(a0)

> +       amoswap.w       a0, a0, (a0)

> +       amoswap.w.aq    a0, a0, 0(a0)

> +       amoswap.w.aq    a0, a0, (a0)

> +       amoswap.w.rl    a0, a0, 0(a0)

> +       amoswap.w.rl    a0, a0, (a0)

> +       amoswap.w.aqrl  a0, a0, 0(a0)

> +       amoswap.w.aqrl  a0, a0, (a0)

> +       amoadd.w        a0, a0, 0(a0)

> +       amoadd.w        a0, a0, (a0)

> +       amoadd.w.aq     a0, a0, 0(a0)

> +       amoadd.w.aq     a0, a0, (a0)

> +       amoadd.w.rl     a0, a0, 0(a0)

> +       amoadd.w.rl     a0, a0, (a0)

> +       amoadd.w.aqrl   a0, a0, 0(a0)

> +       amoadd.w.aqrl   a0, a0, (a0)

> +       amoxor.w        a0, a0, 0(a0)

> +       amoxor.w        a0, a0, (a0)

> +       amoxor.w.aq     a0, a0, 0(a0)

> +       amoxor.w.aq     a0, a0, (a0)

> +       amoxor.w.rl     a0, a0, 0(a0)

> +       amoxor.w.rl     a0, a0, (a0)

> +       amoxor.w.aqrl   a0, a0, 0(a0)

> +       amoxor.w.aqrl   a0, a0, (a0)

> +       amoand.w        a0, a0, 0(a0)

> +       amoand.w        a0, a0, (a0)

> +       amoand.w.aq     a0, a0, 0(a0)

> +       amoand.w.aq     a0, a0, (a0)

> +       amoand.w.rl     a0, a0, 0(a0)

> +       amoand.w.rl     a0, a0, (a0)

> +       amoand.w.aqrl   a0, a0, 0(a0)

> +       amoand.w.aqrl   a0, a0, (a0)

> +       amoor.w a0, a0, 0(a0)

> +       amoor.w a0, a0, (a0)

> +       amoor.w.aq      a0, a0, 0(a0)

> +       amoor.w.aq      a0, a0, (a0)

> +       amoor.w.rl      a0, a0, 0(a0)

> +       amoor.w.rl      a0, a0, (a0)

> +       amoor.w.aqrl    a0, a0, 0(a0)

> +       amoor.w.aqrl    a0, a0, (a0)

> +       amomin.w        a0, a0, 0(a0)

> +       amomin.w        a0, a0, (a0)

> +       amomin.w.aq     a0, a0, 0(a0)

> +       amomin.w.aq     a0, a0, (a0)

> +       amomin.w.rl     a0, a0, 0(a0)

> +       amomin.w.rl     a0, a0, (a0)

> +       amomin.w.aqrl   a0, a0, 0(a0)

> +       amomin.w.aqrl   a0, a0, (a0)

> +       amomax.w        a0, a0, 0(a0)

> +       amomax.w        a0, a0, (a0)

> +       amomax.w.aq     a0, a0, 0(a0)

> +       amomax.w.aq     a0, a0, (a0)

> +       amomax.w.rl     a0, a0, 0(a0)

> +       amomax.w.rl     a0, a0, (a0)

> +       amomax.w.aqrl   a0, a0, 0(a0)

> +       amomax.w.aqrl   a0, a0, (a0)

> +       amominu.w       a0, a0, 0(a0)

> +       amominu.w       a0, a0, (a0)

> +       amominu.w.aq    a0, a0, 0(a0)

> +       amominu.w.aq    a0, a0, (a0)

> +       amominu.w.rl    a0, a0, 0(a0)

> +       amominu.w.rl    a0, a0, (a0)

> +       amominu.w.aqrl  a0, a0, 0(a0)

> +       amominu.w.aqrl  a0, a0, (a0)

> +       amomaxu.w       a0, a0, 0(a0)

> +       amomaxu.w       a0, a0, (a0)

> +       amomaxu.w.aq    a0, a0, 0(a0)

> +       amomaxu.w.aq    a0, a0, (a0)

> +       amomaxu.w.rl    a0, a0, 0(a0)

> +       amomaxu.w.rl    a0, a0, (a0)

> +       amomaxu.w.aqrl  a0, a0, 0(a0)

> +       amomaxu.w.aqrl  a0, a0, (a0)

> --

> 2.30.2

>
Alan Modra via Binutils April 23, 2021, 2:24 p.m. | #2
Hi Nelson,

As far as I know, I don't have write access.

Thanks,
Christoph

On Fri, Apr 23, 2021 at 9:21 AM Nelson Chu <nelson.chu@sifive.com> wrote:
>

> LGTM.  Do you have write access of binutils?  If you have, then it

> would be great if you can commit the patch.  Otherwise, we can commit

> it if you don't have write access.

>

> Thank you very much

> Nelson

>

> On Thu, Apr 22, 2021 at 6:28 AM Christoph Muellner via Binutils

> <binutils@sourceware.org> wrote:

> >

> > gas/

> >     PR 27764

> >     * testsuite/gas/riscv/a-ext-64.d: New testcase.

> >     * testsuite/gas/riscv/a-ext-64.s: Likewise.

> >     * testsuite/gas/riscv/a-ext.d: Likewise.

> >     * testsuite/gas/riscv/a-ext.s: Likewise.

> >

> > Signed-off-by: Christoph Muellner <cmuellner@gcc.gnu.org>

> > ---

> >  gas/testsuite/gas/riscv/a-ext-64.d | 186 +++++++++++++++++++++++++++++

> >  gas/testsuite/gas/riscv/a-ext-64.s | 177 +++++++++++++++++++++++++++

> >  gas/testsuite/gas/riscv/a-ext.d    |  98 +++++++++++++++

> >  gas/testsuite/gas/riscv/a-ext.s    |  89 ++++++++++++++

> >  4 files changed, 550 insertions(+)

> >  create mode 100644 gas/testsuite/gas/riscv/a-ext-64.d

> >  create mode 100644 gas/testsuite/gas/riscv/a-ext-64.s

> >  create mode 100644 gas/testsuite/gas/riscv/a-ext.d

> >  create mode 100644 gas/testsuite/gas/riscv/a-ext.s

> >

> > diff --git a/gas/testsuite/gas/riscv/a-ext-64.d b/gas/testsuite/gas/riscv/a-ext-64.d

> > new file mode 100644

> > index 00000000000..86d24008688

> > --- /dev/null

> > +++ b/gas/testsuite/gas/riscv/a-ext-64.d

> > @@ -0,0 +1,186 @@

> > +#as: -march=rv64ia

> > +#source: a-ext-64.s

> > +#objdump: -d

> > +

> > +.*:[   ]+file format .*

> > +

> > +

> > +Disassembly of section .text:

> > +

> > +0+000 <target>:

> > +[      ]+0:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> > +[      ]+4:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> > +[      ]+8:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> > +[      ]+c:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> > +[      ]+10:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> > +[      ]+14:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> > +[      ]+18:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> > +[      ]+1c:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> > +[      ]+20:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> > +[      ]+24:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> > +[      ]+28:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> > +[      ]+2c:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> > +[      ]+30:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> > +[      ]+34:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> > +[      ]+38:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> > +[      ]+3c:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> > +[      ]+40:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> > +[      ]+44:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> > +[      ]+48:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+4c:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+50:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+54:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+58:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+5c:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+60:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> > +[      ]+64:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> > +[      ]+68:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+6c:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+70:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+74:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+78:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+7c:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+80:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> > +[      ]+84:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> > +[      ]+88:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+8c:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+90:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+94:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+98:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+9c:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+a0:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> > +[      ]+a4:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> > +[      ]+a8:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+ac:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+b0:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+b4:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+b8:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+bc:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+c0:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> > +[      ]+c4:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> > +[      ]+c8:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> > +[      ]+cc:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> > +[      ]+d0:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> > +[      ]+d4:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> > +[      ]+d8:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> > +[      ]+dc:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> > +[      ]+e0:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> > +[      ]+e4:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> > +[      ]+e8:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+ec:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+f0:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+f4:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+f8:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+fc:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+100:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> > +[      ]+104:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> > +[      ]+108:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+10c:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+110:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+114:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+118:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+11c:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+120:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> > +[      ]+124:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> > +[      ]+128:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+12c:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+130:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+134:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+138:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+13c:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+140:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> > +[      ]+144:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> > +[      ]+148:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+14c:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+150:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+154:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+158:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+15c:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+160:[         ]+1005352f[     ]+lr.d[         ]+a0,\(a0\)

> > +[      ]+164:[         ]+1005352f[     ]+lr.d[         ]+a0,\(a0\)

> > +[      ]+168:[         ]+1405352f[     ]+lr.d.aq[      ]+a0,\(a0\)

> > +[      ]+16c:[         ]+1405352f[     ]+lr.d.aq[      ]+a0,\(a0\)

> > +[      ]+170:[         ]+1205352f[     ]+lr.d.rl[      ]+a0,\(a0\)

> > +[      ]+174:[         ]+1205352f[     ]+lr.d.rl[      ]+a0,\(a0\)

> > +[      ]+178:[         ]+1605352f[     ]+lr.d.aqrl[    ]+a0,\(a0\)

> > +[      ]+17c:[         ]+1605352f[     ]+lr.d.aqrl[    ]+a0,\(a0\)

> > +[      ]+180:[         ]+18a5352f[     ]+sc.d[         ]+a0,a0,\(a0\)

> > +[      ]+184:[         ]+18a5352f[     ]+sc.d[         ]+a0,a0,\(a0\)

> > +[      ]+188:[         ]+1ca5352f[     ]+sc.d.aq[      ]+a0,a0,\(a0\)

> > +[      ]+18c:[         ]+1ca5352f[     ]+sc.d.aq[      ]+a0,a0,\(a0\)

> > +[      ]+190:[         ]+1aa5352f[     ]+sc.d.rl[      ]+a0,a0,\(a0\)

> > +[      ]+194:[         ]+1aa5352f[     ]+sc.d.rl[      ]+a0,a0,\(a0\)

> > +[      ]+198:[         ]+1ea5352f[     ]+sc.d.aqrl[    ]+a0,a0,\(a0\)

> > +[      ]+19c:[         ]+1ea5352f[     ]+sc.d.aqrl[    ]+a0,a0,\(a0\)

> > +[      ]+1a0:[         ]+08a5352f[     ]+amoswap.d[    ]+a0,a0,\(a0\)

> > +[      ]+1a4:[         ]+08a5352f[     ]+amoswap.d[    ]+a0,a0,\(a0\)

> > +[      ]+1a8:[         ]+0ca5352f[     ]+amoswap.d.aq[         ]+a0,a0,\(a0\)

> > +[      ]+1ac:[         ]+0ca5352f[     ]+amoswap.d.aq[         ]+a0,a0,\(a0\)

> > +[      ]+1b0:[         ]+0aa5352f[     ]+amoswap.d.rl[         ]+a0,a0,\(a0\)

> > +[      ]+1b4:[         ]+0aa5352f[     ]+amoswap.d.rl[         ]+a0,a0,\(a0\)

> > +[      ]+1b8:[         ]+0ea5352f[     ]+amoswap.d.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+1bc:[         ]+0ea5352f[     ]+amoswap.d.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+1c0:[         ]+00a5352f[     ]+amoadd.d[     ]+a0,a0,\(a0\)

> > +[      ]+1c4:[         ]+00a5352f[     ]+amoadd.d[     ]+a0,a0,\(a0\)

> > +[      ]+1c8:[         ]+04a5352f[     ]+amoadd.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+1cc:[         ]+04a5352f[     ]+amoadd.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+1d0:[         ]+02a5352f[     ]+amoadd.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+1d4:[         ]+02a5352f[     ]+amoadd.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+1d8:[         ]+06a5352f[     ]+amoadd.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+1dc:[         ]+06a5352f[     ]+amoadd.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+1e0:[         ]+20a5352f[     ]+amoxor.d[     ]+a0,a0,\(a0\)

> > +[      ]+1e4:[         ]+20a5352f[     ]+amoxor.d[     ]+a0,a0,\(a0\)

> > +[      ]+1e8:[         ]+24a5352f[     ]+amoxor.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+1ec:[         ]+24a5352f[     ]+amoxor.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+1f0:[         ]+22a5352f[     ]+amoxor.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+1f4:[         ]+22a5352f[     ]+amoxor.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+1f8:[         ]+26a5352f[     ]+amoxor.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+1fc:[         ]+26a5352f[     ]+amoxor.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+200:[         ]+60a5352f[     ]+amoand.d[     ]+a0,a0,\(a0\)

> > +[      ]+204:[         ]+60a5352f[     ]+amoand.d[     ]+a0,a0,\(a0\)

> > +[      ]+208:[         ]+64a5352f[     ]+amoand.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+20c:[         ]+64a5352f[     ]+amoand.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+210:[         ]+62a5352f[     ]+amoand.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+214:[         ]+62a5352f[     ]+amoand.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+218:[         ]+66a5352f[     ]+amoand.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+21c:[         ]+66a5352f[     ]+amoand.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+220:[         ]+40a5352f[     ]+amoor.d[      ]+a0,a0,\(a0\)

> > +[      ]+224:[         ]+40a5352f[     ]+amoor.d[      ]+a0,a0,\(a0\)

> > +[      ]+228:[         ]+44a5352f[     ]+amoor.d.aq[   ]+a0,a0,\(a0\)

> > +[      ]+22c:[         ]+44a5352f[     ]+amoor.d.aq[   ]+a0,a0,\(a0\)

> > +[      ]+230:[         ]+42a5352f[     ]+amoor.d.rl[   ]+a0,a0,\(a0\)

> > +[      ]+234:[         ]+42a5352f[     ]+amoor.d.rl[   ]+a0,a0,\(a0\)

> > +[      ]+238:[         ]+46a5352f[     ]+amoor.d.aqrl[         ]+a0,a0,\(a0\)

> > +[      ]+23c:[         ]+46a5352f[     ]+amoor.d.aqrl[         ]+a0,a0,\(a0\)

> > +[      ]+240:[         ]+80a5352f[     ]+amomin.d[     ]+a0,a0,\(a0\)

> > +[      ]+244:[         ]+80a5352f[     ]+amomin.d[     ]+a0,a0,\(a0\)

> > +[      ]+248:[         ]+84a5352f[     ]+amomin.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+24c:[         ]+84a5352f[     ]+amomin.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+250:[         ]+82a5352f[     ]+amomin.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+254:[         ]+82a5352f[     ]+amomin.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+258:[         ]+86a5352f[     ]+amomin.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+25c:[         ]+86a5352f[     ]+amomin.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+260:[         ]+a0a5352f[     ]+amomax.d[     ]+a0,a0,\(a0\)

> > +[      ]+264:[         ]+a0a5352f[     ]+amomax.d[     ]+a0,a0,\(a0\)

> > +[      ]+268:[         ]+a4a5352f[     ]+amomax.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+26c:[         ]+a4a5352f[     ]+amomax.d.aq[  ]+a0,a0,\(a0\)

> > +[      ]+270:[         ]+a2a5352f[     ]+amomax.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+274:[         ]+a2a5352f[     ]+amomax.d.rl[  ]+a0,a0,\(a0\)

> > +[      ]+278:[         ]+a6a5352f[     ]+amomax.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+27c:[         ]+a6a5352f[     ]+amomax.d.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+280:[         ]+c0a5352f[     ]+amominu.d[    ]+a0,a0,\(a0\)

> > +[      ]+284:[         ]+c0a5352f[     ]+amominu.d[    ]+a0,a0,\(a0\)

> > +[      ]+288:[         ]+c4a5352f[     ]+amominu.d.aq[         ]+a0,a0,\(a0\)

> > +[      ]+28c:[         ]+c4a5352f[     ]+amominu.d.aq[         ]+a0,a0,\(a0\)

> > +[      ]+290:[         ]+c2a5352f[     ]+amominu.d.rl[         ]+a0,a0,\(a0\)

> > +[      ]+294:[         ]+c2a5352f[     ]+amominu.d.rl[         ]+a0,a0,\(a0\)

> > +[      ]+298:[         ]+c6a5352f[     ]+amominu.d.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+29c:[         ]+c6a5352f[     ]+amominu.d.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+2a0:[         ]+e0a5352f[     ]+amomaxu.d[    ]+a0,a0,\(a0\)

> > +[      ]+2a4:[         ]+e0a5352f[     ]+amomaxu.d[    ]+a0,a0,\(a0\)

> > +[      ]+2a8:[         ]+e4a5352f[     ]+amomaxu.d.aq[         ]+a0,a0,\(a0\)

> > +[      ]+2ac:[         ]+e4a5352f[     ]+amomaxu.d.aq[         ]+a0,a0,\(a0\)

> > +[      ]+2b0:[         ]+e2a5352f[     ]+amomaxu.d.rl[         ]+a0,a0,\(a0\)

> > +[      ]+2b4:[         ]+e2a5352f[     ]+amomaxu.d.rl[         ]+a0,a0,\(a0\)

> > +[      ]+2b8:[         ]+e6a5352f[     ]+amomaxu.d.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+2bc:[         ]+e6a5352f[     ]+amomaxu.d.aqrl[       ]+a0,a0,\(a0\)

> > diff --git a/gas/testsuite/gas/riscv/a-ext-64.s b/gas/testsuite/gas/riscv/a-ext-64.s

> > new file mode 100644

> > index 00000000000..cc5b8d5f9b9

> > --- /dev/null

> > +++ b/gas/testsuite/gas/riscv/a-ext-64.s

> > @@ -0,0 +1,177 @@

> > +target:

> > +       lr.w    a0, 0(a0)

> > +       lr.w    a0, (a0)

> > +       lr.w.aq a0, 0(a0)

> > +       lr.w.aq a0, (a0)

> > +       lr.w.rl a0, 0(a0)

> > +       lr.w.rl a0, (a0)

> > +       lr.w.aqrl       a0, 0(a0)

> > +       lr.w.aqrl       a0, (a0)

> > +       sc.w    a0, a0, 0(a0)

> > +       sc.w    a0, a0, (a0)

> > +       sc.w.aq a0, a0, 0(a0)

> > +       sc.w.aq a0, a0, (a0)

> > +       sc.w.rl a0, a0, 0(a0)

> > +       sc.w.rl a0, a0, (a0)

> > +       sc.w.aqrl       a0, a0, 0(a0)

> > +       sc.w.aqrl       a0, a0, (a0)

> > +       amoswap.w       a0, a0, 0(a0)

> > +       amoswap.w       a0, a0, (a0)

> > +       amoswap.w.aq    a0, a0, 0(a0)

> > +       amoswap.w.aq    a0, a0, (a0)

> > +       amoswap.w.rl    a0, a0, 0(a0)

> > +       amoswap.w.rl    a0, a0, (a0)

> > +       amoswap.w.aqrl  a0, a0, 0(a0)

> > +       amoswap.w.aqrl  a0, a0, (a0)

> > +       amoadd.w        a0, a0, 0(a0)

> > +       amoadd.w        a0, a0, (a0)

> > +       amoadd.w.aq     a0, a0, 0(a0)

> > +       amoadd.w.aq     a0, a0, (a0)

> > +       amoadd.w.rl     a0, a0, 0(a0)

> > +       amoadd.w.rl     a0, a0, (a0)

> > +       amoadd.w.aqrl   a0, a0, 0(a0)

> > +       amoadd.w.aqrl   a0, a0, (a0)

> > +       amoxor.w        a0, a0, 0(a0)

> > +       amoxor.w        a0, a0, (a0)

> > +       amoxor.w.aq     a0, a0, 0(a0)

> > +       amoxor.w.aq     a0, a0, (a0)

> > +       amoxor.w.rl     a0, a0, 0(a0)

> > +       amoxor.w.rl     a0, a0, (a0)

> > +       amoxor.w.aqrl   a0, a0, 0(a0)

> > +       amoxor.w.aqrl   a0, a0, (a0)

> > +       amoand.w        a0, a0, 0(a0)

> > +       amoand.w        a0, a0, (a0)

> > +       amoand.w.aq     a0, a0, 0(a0)

> > +       amoand.w.aq     a0, a0, (a0)

> > +       amoand.w.rl     a0, a0, 0(a0)

> > +       amoand.w.rl     a0, a0, (a0)

> > +       amoand.w.aqrl   a0, a0, 0(a0)

> > +       amoand.w.aqrl   a0, a0, (a0)

> > +       amoor.w a0, a0, 0(a0)

> > +       amoor.w a0, a0, (a0)

> > +       amoor.w.aq      a0, a0, 0(a0)

> > +       amoor.w.aq      a0, a0, (a0)

> > +       amoor.w.rl      a0, a0, 0(a0)

> > +       amoor.w.rl      a0, a0, (a0)

> > +       amoor.w.aqrl    a0, a0, 0(a0)

> > +       amoor.w.aqrl    a0, a0, (a0)

> > +       amomin.w        a0, a0, 0(a0)

> > +       amomin.w        a0, a0, (a0)

> > +       amomin.w.aq     a0, a0, 0(a0)

> > +       amomin.w.aq     a0, a0, (a0)

> > +       amomin.w.rl     a0, a0, 0(a0)

> > +       amomin.w.rl     a0, a0, (a0)

> > +       amomin.w.aqrl   a0, a0, 0(a0)

> > +       amomin.w.aqrl   a0, a0, (a0)

> > +       amomax.w        a0, a0, 0(a0)

> > +       amomax.w        a0, a0, (a0)

> > +       amomax.w.aq     a0, a0, 0(a0)

> > +       amomax.w.aq     a0, a0, (a0)

> > +       amomax.w.rl     a0, a0, 0(a0)

> > +       amomax.w.rl     a0, a0, (a0)

> > +       amomax.w.aqrl   a0, a0, 0(a0)

> > +       amomax.w.aqrl   a0, a0, (a0)

> > +       amominu.w       a0, a0, 0(a0)

> > +       amominu.w       a0, a0, (a0)

> > +       amominu.w.aq    a0, a0, 0(a0)

> > +       amominu.w.aq    a0, a0, (a0)

> > +       amominu.w.rl    a0, a0, 0(a0)

> > +       amominu.w.rl    a0, a0, (a0)

> > +       amominu.w.aqrl  a0, a0, 0(a0)

> > +       amominu.w.aqrl  a0, a0, (a0)

> > +       amomaxu.w       a0, a0, 0(a0)

> > +       amomaxu.w       a0, a0, (a0)

> > +       amomaxu.w.aq    a0, a0, 0(a0)

> > +       amomaxu.w.aq    a0, a0, (a0)

> > +       amomaxu.w.rl    a0, a0, 0(a0)

> > +       amomaxu.w.rl    a0, a0, (a0)

> > +       amomaxu.w.aqrl  a0, a0, 0(a0)

> > +       amomaxu.w.aqrl  a0, a0, (a0)

> > +       lr.d    a0, 0(a0)

> > +       lr.d    a0, (a0)

> > +       lr.d.aq a0, 0(a0)

> > +       lr.d.aq a0, (a0)

> > +       lr.d.rl a0, 0(a0)

> > +       lr.d.rl a0, (a0)

> > +       lr.d.aqrl       a0, 0(a0)

> > +       lr.d.aqrl       a0, (a0)

> > +       sc.d    a0, a0, 0(a0)

> > +       sc.d    a0, a0, (a0)

> > +       sc.d.aq a0, a0, 0(a0)

> > +       sc.d.aq a0, a0, (a0)

> > +       sc.d.rl a0, a0, 0(a0)

> > +       sc.d.rl a0, a0, (a0)

> > +       sc.d.aqrl       a0, a0, 0(a0)

> > +       sc.d.aqrl       a0, a0, (a0)

> > +       amoswap.d       a0, a0, 0(a0)

> > +       amoswap.d       a0, a0, (a0)

> > +       amoswap.d.aq    a0, a0, 0(a0)

> > +       amoswap.d.aq    a0, a0, (a0)

> > +       amoswap.d.rl    a0, a0, 0(a0)

> > +       amoswap.d.rl    a0, a0, (a0)

> > +       amoswap.d.aqrl  a0, a0, 0(a0)

> > +       amoswap.d.aqrl  a0, a0, (a0)

> > +       amoadd.d        a0, a0, 0(a0)

> > +       amoadd.d        a0, a0, (a0)

> > +       amoadd.d.aq     a0, a0, 0(a0)

> > +       amoadd.d.aq     a0, a0, (a0)

> > +       amoadd.d.rl     a0, a0, 0(a0)

> > +       amoadd.d.rl     a0, a0, (a0)

> > +       amoadd.d.aqrl   a0, a0, 0(a0)

> > +       amoadd.d.aqrl   a0, a0, (a0)

> > +       amoxor.d        a0, a0, 0(a0)

> > +       amoxor.d        a0, a0, (a0)

> > +       amoxor.d.aq     a0, a0, 0(a0)

> > +       amoxor.d.aq     a0, a0, (a0)

> > +       amoxor.d.rl     a0, a0, 0(a0)

> > +       amoxor.d.rl     a0, a0, (a0)

> > +       amoxor.d.aqrl   a0, a0, 0(a0)

> > +       amoxor.d.aqrl   a0, a0, (a0)

> > +       amoand.d        a0, a0, 0(a0)

> > +       amoand.d        a0, a0, (a0)

> > +       amoand.d.aq     a0, a0, 0(a0)

> > +       amoand.d.aq     a0, a0, (a0)

> > +       amoand.d.rl     a0, a0, 0(a0)

> > +       amoand.d.rl     a0, a0, (a0)

> > +       amoand.d.aqrl   a0, a0, 0(a0)

> > +       amoand.d.aqrl   a0, a0, (a0)

> > +       amoor.d a0, a0, 0(a0)

> > +       amoor.d a0, a0, (a0)

> > +       amoor.d.aq      a0, a0, 0(a0)

> > +       amoor.d.aq      a0, a0, (a0)

> > +       amoor.d.rl      a0, a0, 0(a0)

> > +       amoor.d.rl      a0, a0, (a0)

> > +       amoor.d.aqrl    a0, a0, 0(a0)

> > +       amoor.d.aqrl    a0, a0, (a0)

> > +       amomin.d        a0, a0, 0(a0)

> > +       amomin.d        a0, a0, (a0)

> > +       amomin.d.aq     a0, a0, 0(a0)

> > +       amomin.d.aq     a0, a0, (a0)

> > +       amomin.d.rl     a0, a0, 0(a0)

> > +       amomin.d.rl     a0, a0, (a0)

> > +       amomin.d.aqrl   a0, a0, 0(a0)

> > +       amomin.d.aqrl   a0, a0, (a0)

> > +       amomax.d        a0, a0, 0(a0)

> > +       amomax.d        a0, a0, (a0)

> > +       amomax.d.aq     a0, a0, 0(a0)

> > +       amomax.d.aq     a0, a0, (a0)

> > +       amomax.d.rl     a0, a0, 0(a0)

> > +       amomax.d.rl     a0, a0, (a0)

> > +       amomax.d.aqrl   a0, a0, 0(a0)

> > +       amomax.d.aqrl   a0, a0, (a0)

> > +       amominu.d       a0, a0, 0(a0)

> > +       amominu.d       a0, a0, (a0)

> > +       amominu.d.aq    a0, a0, 0(a0)

> > +       amominu.d.aq    a0, a0, (a0)

> > +       amominu.d.rl    a0, a0, 0(a0)

> > +       amominu.d.rl    a0, a0, (a0)

> > +       amominu.d.aqrl  a0, a0, 0(a0)

> > +       amominu.d.aqrl  a0, a0, (a0)

> > +       amomaxu.d       a0, a0, 0(a0)

> > +       amomaxu.d       a0, a0, (a0)

> > +       amomaxu.d.aq    a0, a0, 0(a0)

> > +       amomaxu.d.aq    a0, a0, (a0)

> > +       amomaxu.d.rl    a0, a0, 0(a0)

> > +       amomaxu.d.rl    a0, a0, (a0)

> > +       amomaxu.d.aqrl  a0, a0, 0(a0)

> > +       amomaxu.d.aqrl  a0, a0, (a0)

> > diff --git a/gas/testsuite/gas/riscv/a-ext.d b/gas/testsuite/gas/riscv/a-ext.d

> > new file mode 100644

> > index 00000000000..e0c3b9a394c

> > --- /dev/null

> > +++ b/gas/testsuite/gas/riscv/a-ext.d

> > @@ -0,0 +1,98 @@

> > +#as: -march=rv32ia

> > +#source: a-ext.s

> > +#objdump: -d

> > +

> > +.*:[   ]+file format .*

> > +

> > +

> > +Disassembly of section .text:

> > +

> > +0+000 <target>:

> > +[      ]+0:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> > +[      ]+4:[   ]+1005252f[     ]+lr.w[         ]+a0,\(a0\)

> > +[      ]+8:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> > +[      ]+c:[   ]+1405252f[     ]+lr.w.aq[      ]+a0,\(a0\)

> > +[      ]+10:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> > +[      ]+14:[  ]+1205252f[     ]+lr.w.rl[      ]+a0,\(a0\)

> > +[      ]+18:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> > +[      ]+1c:[  ]+1605252f[     ]+lr.w.aqrl[    ]+a0,\(a0\)

> > +[      ]+20:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> > +[      ]+24:[  ]+18a5252f[     ]+sc.w[         ]+a0,a0,\(a0\)

> > +[      ]+28:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> > +[      ]+2c:[  ]+1ca5252f[     ]+sc.w.aq[      ]+a0,a0,\(a0\)

> > +[      ]+30:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> > +[      ]+34:[  ]+1aa5252f[     ]+sc.w.rl[      ]+a0,a0,\(a0\)

> > +[      ]+38:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> > +[      ]+3c:[  ]+1ea5252f[     ]+sc.w.aqrl[    ]+a0,a0,\(a0\)

> > +[      ]+40:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> > +[      ]+44:[  ]+08a5252f[     ]+amoswap.w[    ]+a0,a0,\(a0\)

> > +[      ]+48:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+4c:[  ]+0ca5252f[     ]+amoswap.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+50:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+54:[  ]+0aa5252f[     ]+amoswap.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+58:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+5c:[  ]+0ea5252f[     ]+amoswap.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+60:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> > +[      ]+64:[  ]+00a5252f[     ]+amoadd.w[     ]+a0,a0,\(a0\)

> > +[      ]+68:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+6c:[  ]+04a5252f[     ]+amoadd.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+70:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+74:[  ]+02a5252f[     ]+amoadd.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+78:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+7c:[  ]+06a5252f[     ]+amoadd.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+80:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> > +[      ]+84:[  ]+20a5252f[     ]+amoxor.w[     ]+a0,a0,\(a0\)

> > +[      ]+88:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+8c:[  ]+24a5252f[     ]+amoxor.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+90:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+94:[  ]+22a5252f[     ]+amoxor.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+98:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+9c:[  ]+26a5252f[     ]+amoxor.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+a0:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> > +[      ]+a4:[  ]+60a5252f[     ]+amoand.w[     ]+a0,a0,\(a0\)

> > +[      ]+a8:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+ac:[  ]+64a5252f[     ]+amoand.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+b0:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+b4:[  ]+62a5252f[     ]+amoand.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+b8:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+bc:[  ]+66a5252f[     ]+amoand.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+c0:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> > +[      ]+c4:[  ]+40a5252f[     ]+amoor.w[      ]+a0,a0,\(a0\)

> > +[      ]+c8:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> > +[      ]+cc:[  ]+44a5252f[     ]+amoor.w.aq[   ]+a0,a0,\(a0\)

> > +[      ]+d0:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> > +[      ]+d4:[  ]+42a5252f[     ]+amoor.w.rl[   ]+a0,a0,\(a0\)

> > +[      ]+d8:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> > +[      ]+dc:[  ]+46a5252f[     ]+amoor.w.aqrl[         ]+a0,a0,\(a0\)

> > +[      ]+e0:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> > +[      ]+e4:[  ]+80a5252f[     ]+amomin.w[     ]+a0,a0,\(a0\)

> > +[      ]+e8:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+ec:[  ]+84a5252f[     ]+amomin.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+f0:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+f4:[  ]+82a5252f[     ]+amomin.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+f8:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+fc:[  ]+86a5252f[     ]+amomin.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+100:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> > +[      ]+104:[         ]+a0a5252f[     ]+amomax.w[     ]+a0,a0,\(a0\)

> > +[      ]+108:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+10c:[         ]+a4a5252f[     ]+amomax.w.aq[  ]+a0,a0,\(a0\)

> > +[      ]+110:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+114:[         ]+a2a5252f[     ]+amomax.w.rl[  ]+a0,a0,\(a0\)

> > +[      ]+118:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+11c:[         ]+a6a5252f[     ]+amomax.w.aqrl[        ]+a0,a0,\(a0\)

> > +[      ]+120:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> > +[      ]+124:[         ]+c0a5252f[     ]+amominu.w[    ]+a0,a0,\(a0\)

> > +[      ]+128:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+12c:[         ]+c4a5252f[     ]+amominu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+130:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+134:[         ]+c2a5252f[     ]+amominu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+138:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+13c:[         ]+c6a5252f[     ]+amominu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+140:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> > +[      ]+144:[         ]+e0a5252f[     ]+amomaxu.w[    ]+a0,a0,\(a0\)

> > +[      ]+148:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+14c:[         ]+e4a5252f[     ]+amomaxu.w.aq[         ]+a0,a0,\(a0\)

> > +[      ]+150:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+154:[         ]+e2a5252f[     ]+amomaxu.w.rl[         ]+a0,a0,\(a0\)

> > +[      ]+158:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> > +[      ]+15c:[         ]+e6a5252f[     ]+amomaxu.w.aqrl[       ]+a0,a0,\(a0\)

> > diff --git a/gas/testsuite/gas/riscv/a-ext.s b/gas/testsuite/gas/riscv/a-ext.s

> > new file mode 100644

> > index 00000000000..09ef16686f7

> > --- /dev/null

> > +++ b/gas/testsuite/gas/riscv/a-ext.s

> > @@ -0,0 +1,89 @@

> > +target:

> > +       lr.w    a0, 0(a0)

> > +       lr.w    a0, (a0)

> > +       lr.w.aq a0, 0(a0)

> > +       lr.w.aq a0, (a0)

> > +       lr.w.rl a0, 0(a0)

> > +       lr.w.rl a0, (a0)

> > +       lr.w.aqrl       a0, 0(a0)

> > +       lr.w.aqrl       a0, (a0)

> > +       sc.w    a0, a0, 0(a0)

> > +       sc.w    a0, a0, (a0)

> > +       sc.w.aq a0, a0, 0(a0)

> > +       sc.w.aq a0, a0, (a0)

> > +       sc.w.rl a0, a0, 0(a0)

> > +       sc.w.rl a0, a0, (a0)

> > +       sc.w.aqrl       a0, a0, 0(a0)

> > +       sc.w.aqrl       a0, a0, (a0)

> > +       amoswap.w       a0, a0, 0(a0)

> > +       amoswap.w       a0, a0, (a0)

> > +       amoswap.w.aq    a0, a0, 0(a0)

> > +       amoswap.w.aq    a0, a0, (a0)

> > +       amoswap.w.rl    a0, a0, 0(a0)

> > +       amoswap.w.rl    a0, a0, (a0)

> > +       amoswap.w.aqrl  a0, a0, 0(a0)

> > +       amoswap.w.aqrl  a0, a0, (a0)

> > +       amoadd.w        a0, a0, 0(a0)

> > +       amoadd.w        a0, a0, (a0)

> > +       amoadd.w.aq     a0, a0, 0(a0)

> > +       amoadd.w.aq     a0, a0, (a0)

> > +       amoadd.w.rl     a0, a0, 0(a0)

> > +       amoadd.w.rl     a0, a0, (a0)

> > +       amoadd.w.aqrl   a0, a0, 0(a0)

> > +       amoadd.w.aqrl   a0, a0, (a0)

> > +       amoxor.w        a0, a0, 0(a0)

> > +       amoxor.w        a0, a0, (a0)

> > +       amoxor.w.aq     a0, a0, 0(a0)

> > +       amoxor.w.aq     a0, a0, (a0)

> > +       amoxor.w.rl     a0, a0, 0(a0)

> > +       amoxor.w.rl     a0, a0, (a0)

> > +       amoxor.w.aqrl   a0, a0, 0(a0)

> > +       amoxor.w.aqrl   a0, a0, (a0)

> > +       amoand.w        a0, a0, 0(a0)

> > +       amoand.w        a0, a0, (a0)

> > +       amoand.w.aq     a0, a0, 0(a0)

> > +       amoand.w.aq     a0, a0, (a0)

> > +       amoand.w.rl     a0, a0, 0(a0)

> > +       amoand.w.rl     a0, a0, (a0)

> > +       amoand.w.aqrl   a0, a0, 0(a0)

> > +       amoand.w.aqrl   a0, a0, (a0)

> > +       amoor.w a0, a0, 0(a0)

> > +       amoor.w a0, a0, (a0)

> > +       amoor.w.aq      a0, a0, 0(a0)

> > +       amoor.w.aq      a0, a0, (a0)

> > +       amoor.w.rl      a0, a0, 0(a0)

> > +       amoor.w.rl      a0, a0, (a0)

> > +       amoor.w.aqrl    a0, a0, 0(a0)

> > +       amoor.w.aqrl    a0, a0, (a0)

> > +       amomin.w        a0, a0, 0(a0)

> > +       amomin.w        a0, a0, (a0)

> > +       amomin.w.aq     a0, a0, 0(a0)

> > +       amomin.w.aq     a0, a0, (a0)

> > +       amomin.w.rl     a0, a0, 0(a0)

> > +       amomin.w.rl     a0, a0, (a0)

> > +       amomin.w.aqrl   a0, a0, 0(a0)

> > +       amomin.w.aqrl   a0, a0, (a0)

> > +       amomax.w        a0, a0, 0(a0)

> > +       amomax.w        a0, a0, (a0)

> > +       amomax.w.aq     a0, a0, 0(a0)

> > +       amomax.w.aq     a0, a0, (a0)

> > +       amomax.w.rl     a0, a0, 0(a0)

> > +       amomax.w.rl     a0, a0, (a0)

> > +       amomax.w.aqrl   a0, a0, 0(a0)

> > +       amomax.w.aqrl   a0, a0, (a0)

> > +       amominu.w       a0, a0, 0(a0)

> > +       amominu.w       a0, a0, (a0)

> > +       amominu.w.aq    a0, a0, 0(a0)

> > +       amominu.w.aq    a0, a0, (a0)

> > +       amominu.w.rl    a0, a0, 0(a0)

> > +       amominu.w.rl    a0, a0, (a0)

> > +       amominu.w.aqrl  a0, a0, 0(a0)

> > +       amominu.w.aqrl  a0, a0, (a0)

> > +       amomaxu.w       a0, a0, 0(a0)

> > +       amomaxu.w       a0, a0, (a0)

> > +       amomaxu.w.aq    a0, a0, 0(a0)

> > +       amomaxu.w.aq    a0, a0, (a0)

> > +       amomaxu.w.rl    a0, a0, 0(a0)

> > +       amomaxu.w.rl    a0, a0, (a0)

> > +       amomaxu.w.aqrl  a0, a0, 0(a0)

> > +       amomaxu.w.aqrl  a0, a0, (a0)

> > --

> > 2.30.2

> >
Jim Wilson May 3, 2021, 11:21 p.m. | #3
On Wed, Apr 21, 2021 at 3:28 PM Christoph Muellner <cmuellner@gcc.gnu.org>
wrote:

> gas/

>     PR 27764

>     * testsuite/gas/riscv/a-ext-64.d: New testcase.

>     * testsuite/gas/riscv/a-ext-64.s: Likewise.

>     * testsuite/gas/riscv/a-ext.d: Likewise.

>     * testsuite/gas/riscv/a-ext.s: Likewise.

>


Committed.

Jim

Patch

diff --git a/gas/testsuite/gas/riscv/a-ext-64.d b/gas/testsuite/gas/riscv/a-ext-64.d
new file mode 100644
index 00000000000..86d24008688
--- /dev/null
+++ b/gas/testsuite/gas/riscv/a-ext-64.d
@@ -0,0 +1,186 @@ 
+#as: -march=rv64ia
+#source: a-ext-64.s
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+0:[ 	]+1005252f[ 	]+lr.w[ 	]+a0,\(a0\)
+[ 	]+4:[ 	]+1005252f[ 	]+lr.w[ 	]+a0,\(a0\)
+[ 	]+8:[ 	]+1405252f[ 	]+lr.w.aq[ 	]+a0,\(a0\)
+[ 	]+c:[ 	]+1405252f[ 	]+lr.w.aq[ 	]+a0,\(a0\)
+[ 	]+10:[ 	]+1205252f[ 	]+lr.w.rl[ 	]+a0,\(a0\)
+[ 	]+14:[ 	]+1205252f[ 	]+lr.w.rl[ 	]+a0,\(a0\)
+[ 	]+18:[ 	]+1605252f[ 	]+lr.w.aqrl[ 	]+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
--- /dev/null
+++ b/gas/testsuite/gas/riscv/a-ext-64.s
@@ -0,0 +1,177 @@ 
+target:
+	lr.w	a0, 0(a0)
+	lr.w	a0, (a0)
+	lr.w.aq	a0, 0(a0)
+	lr.w.aq	a0, (a0)
+	lr.w.rl	a0, 0(a0)
+	lr.w.rl	a0, (a0)
+	lr.w.aqrl	a0, 0(a0)
+	lr.w.aqrl	a0, (a0)
+	sc.w	a0, a0, 0(a0)
+	sc.w	a0, a0, (a0)
+	sc.w.aq	a0, a0, 0(a0)
+	sc.w.aq	a0, a0, (a0)
+	sc.w.rl	a0, a0, 0(a0)
+	sc.w.rl	a0, a0, (a0)
+	sc.w.aqrl	a0, a0, 0(a0)
+	sc.w.aqrl	a0, a0, (a0)
+	amoswap.w	a0, a0, 0(a0)
+	amoswap.w	a0, a0, (a0)
+	amoswap.w.aq	a0, a0, 0(a0)
+	amoswap.w.aq	a0, a0, (a0)
+	amoswap.w.rl	a0, a0, 0(a0)
+	amoswap.w.rl	a0, a0, (a0)
+	amoswap.w.aqrl	a0, a0, 0(a0)
+	amoswap.w.aqrl	a0, a0, (a0)
+	amoadd.w	a0, a0, 0(a0)
+	amoadd.w	a0, a0, (a0)
+	amoadd.w.aq	a0, a0, 0(a0)
+	amoadd.w.aq	a0, a0, (a0)
+	amoadd.w.rl	a0, a0, 0(a0)
+	amoadd.w.rl	a0, a0, (a0)
+	amoadd.w.aqrl	a0, a0, 0(a0)
+	amoadd.w.aqrl	a0, a0, (a0)
+	amoxor.w	a0, a0, 0(a0)
+	amoxor.w	a0, a0, (a0)
+	amoxor.w.aq	a0, a0, 0(a0)
+	amoxor.w.aq	a0, a0, (a0)
+	amoxor.w.rl	a0, a0, 0(a0)
+	amoxor.w.rl	a0, a0, (a0)
+	amoxor.w.aqrl	a0, a0, 0(a0)
+	amoxor.w.aqrl	a0, a0, (a0)
+	amoand.w	a0, a0, 0(a0)
+	amoand.w	a0, a0, (a0)
+	amoand.w.aq	a0, a0, 0(a0)
+	amoand.w.aq	a0, a0, (a0)
+	amoand.w.rl	a0, a0, 0(a0)
+	amoand.w.rl	a0, a0, (a0)
+	amoand.w.aqrl	a0, a0, 0(a0)
+	amoand.w.aqrl	a0, a0, (a0)
+	amoor.w	a0, a0, 0(a0)
+	amoor.w	a0, a0, (a0)
+	amoor.w.aq	a0, a0, 0(a0)
+	amoor.w.aq	a0, a0, (a0)
+	amoor.w.rl	a0, a0, 0(a0)
+	amoor.w.rl	a0, a0, (a0)
+	amoor.w.aqrl	a0, a0, 0(a0)
+	amoor.w.aqrl	a0, a0, (a0)
+	amomin.w	a0, a0, 0(a0)
+	amomin.w	a0, a0, (a0)
+	amomin.w.aq	a0, a0, 0(a0)
+	amomin.w.aq	a0, a0, (a0)
+	amomin.w.rl	a0, a0, 0(a0)
+	amomin.w.rl	a0, a0, (a0)
+	amomin.w.aqrl	a0, a0, 0(a0)
+	amomin.w.aqrl	a0, a0, (a0)
+	amomax.w	a0, a0, 0(a0)
+	amomax.w	a0, a0, (a0)
+	amomax.w.aq	a0, a0, 0(a0)
+	amomax.w.aq	a0, a0, (a0)
+	amomax.w.rl	a0, a0, 0(a0)
+	amomax.w.rl	a0, a0, (a0)
+	amomax.w.aqrl	a0, a0, 0(a0)
+	amomax.w.aqrl	a0, a0, (a0)
+	amominu.w	a0, a0, 0(a0)
+	amominu.w	a0, a0, (a0)
+	amominu.w.aq	a0, a0, 0(a0)
+	amominu.w.aq	a0, a0, (a0)
+	amominu.w.rl	a0, a0, 0(a0)
+	amominu.w.rl	a0, a0, (a0)
+	amominu.w.aqrl	a0, a0, 0(a0)
+	amominu.w.aqrl	a0, a0, (a0)
+	amomaxu.w	a0, a0, 0(a0)
+	amomaxu.w	a0, a0, (a0)
+	amomaxu.w.aq	a0, a0, 0(a0)
+	amomaxu.w.aq	a0, a0, (a0)
+	amomaxu.w.rl	a0, a0, 0(a0)
+	amomaxu.w.rl	a0, a0, (a0)
+	amomaxu.w.aqrl	a0, a0, 0(a0)
+	amomaxu.w.aqrl	a0, a0, (a0)
+	lr.d	a0, 0(a0)
+	lr.d	a0, (a0)
+	lr.d.aq	a0, 0(a0)
+	lr.d.aq	a0, (a0)
+	lr.d.rl	a0, 0(a0)
+	lr.d.rl	a0, (a0)
+	lr.d.aqrl	a0, 0(a0)
+	lr.d.aqrl	a0, (a0)
+	sc.d	a0, a0, 0(a0)
+	sc.d	a0, a0, (a0)
+	sc.d.aq	a0, a0, 0(a0)
+	sc.d.aq	a0, a0, (a0)
+	sc.d.rl	a0, a0, 0(a0)
+	sc.d.rl	a0, a0, (a0)
+	sc.d.aqrl	a0, a0, 0(a0)
+	sc.d.aqrl	a0, a0, (a0)
+	amoswap.d	a0, a0, 0(a0)
+	amoswap.d	a0, a0, (a0)
+	amoswap.d.aq	a0, a0, 0(a0)
+	amoswap.d.aq	a0, a0, (a0)
+	amoswap.d.rl	a0, a0, 0(a0)
+	amoswap.d.rl	a0, a0, (a0)
+	amoswap.d.aqrl	a0, a0, 0(a0)
+	amoswap.d.aqrl	a0, a0, (a0)
+	amoadd.d	a0, a0, 0(a0)
+	amoadd.d	a0, a0, (a0)
+	amoadd.d.aq	a0, a0, 0(a0)
+	amoadd.d.aq	a0, a0, (a0)
+	amoadd.d.rl	a0, a0, 0(a0)
+	amoadd.d.rl	a0, a0, (a0)
+	amoadd.d.aqrl	a0, a0, 0(a0)
+	amoadd.d.aqrl	a0, a0, (a0)
+	amoxor.d	a0, a0, 0(a0)
+	amoxor.d	a0, a0, (a0)
+	amoxor.d.aq	a0, a0, 0(a0)
+	amoxor.d.aq	a0, a0, (a0)
+	amoxor.d.rl	a0, a0, 0(a0)
+	amoxor.d.rl	a0, a0, (a0)
+	amoxor.d.aqrl	a0, a0, 0(a0)
+	amoxor.d.aqrl	a0, a0, (a0)
+	amoand.d	a0, a0, 0(a0)
+	amoand.d	a0, a0, (a0)
+	amoand.d.aq	a0, a0, 0(a0)
+	amoand.d.aq	a0, a0, (a0)
+	amoand.d.rl	a0, a0, 0(a0)
+	amoand.d.rl	a0, a0, (a0)
+	amoand.d.aqrl	a0, a0, 0(a0)
+	amoand.d.aqrl	a0, a0, (a0)
+	amoor.d	a0, a0, 0(a0)
+	amoor.d	a0, a0, (a0)
+	amoor.d.aq	a0, a0, 0(a0)
+	amoor.d.aq	a0, a0, (a0)
+	amoor.d.rl	a0, a0, 0(a0)
+	amoor.d.rl	a0, a0, (a0)
+	amoor.d.aqrl	a0, a0, 0(a0)
+	amoor.d.aqrl	a0, a0, (a0)
+	amomin.d	a0, a0, 0(a0)
+	amomin.d	a0, a0, (a0)
+	amomin.d.aq	a0, a0, 0(a0)
+	amomin.d.aq	a0, a0, (a0)
+	amomin.d.rl	a0, a0, 0(a0)
+	amomin.d.rl	a0, a0, (a0)
+	amomin.d.aqrl	a0, a0, 0(a0)
+	amomin.d.aqrl	a0, a0, (a0)
+	amomax.d	a0, a0, 0(a0)
+	amomax.d	a0, a0, (a0)
+	amomax.d.aq	a0, a0, 0(a0)
+	amomax.d.aq	a0, a0, (a0)
+	amomax.d.rl	a0, a0, 0(a0)
+	amomax.d.rl	a0, a0, (a0)
+	amomax.d.aqrl	a0, a0, 0(a0)
+	amomax.d.aqrl	a0, a0, (a0)
+	amominu.d	a0, a0, 0(a0)
+	amominu.d	a0, a0, (a0)
+	amominu.d.aq	a0, a0, 0(a0)
+	amominu.d.aq	a0, a0, (a0)
+	amominu.d.rl	a0, a0, 0(a0)
+	amominu.d.rl	a0, a0, (a0)
+	amominu.d.aqrl	a0, a0, 0(a0)
+	amominu.d.aqrl	a0, a0, (a0)
+	amomaxu.d	a0, a0, 0(a0)
+	amomaxu.d	a0, a0, (a0)
+	amomaxu.d.aq	a0, a0, 0(a0)
+	amomaxu.d.aq	a0, a0, (a0)
+	amomaxu.d.rl	a0, a0, 0(a0)
+	amomaxu.d.rl	a0, a0, (a0)
+	amomaxu.d.aqrl	a0, a0, 0(a0)
+	amomaxu.d.aqrl	a0, a0, (a0)
diff --git a/gas/testsuite/gas/riscv/a-ext.d b/gas/testsuite/gas/riscv/a-ext.d
new file mode 100644
index 00000000000..e0c3b9a394c
--- /dev/null
+++ b/gas/testsuite/gas/riscv/a-ext.d
@@ -0,0 +1,98 @@ 
+#as: -march=rv32ia
+#source: a-ext.s
+#objdump: -d
+
+.*:[ 	]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ 	]+0:[ 	]+1005252f[ 	]+lr.w[ 	]+a0,\(a0\)
+[ 	]+4:[ 	]+1005252f[ 	]+lr.w[ 	]+a0,\(a0\)
+[ 	]+8:[ 	]+1405252f[ 	]+lr.w.aq[ 	]+a0,\(a0\)
+[ 	]+c:[ 	]+1405252f[ 	]+lr.w.aq[ 	]+a0,\(a0\)
+[ 	]+10:[ 	]+1205252f[ 	]+lr.w.rl[ 	]+a0,\(a0\)
+[ 	]+14:[ 	]+1205252f[ 	]+lr.w.rl[ 	]+a0,\(a0\)
+[ 	]+18:[ 	]+1605252f[ 	]+lr.w.aqrl[ 	]+a0,\(a0\)
+[ 	]+1c:[ 	]+1605252f[ 	]+lr.w.aqrl[ 	]+a0,\(a0\)
+[ 	]+20:[ 	]+18a5252f[ 	]+sc.w[ 	]+a0,a0,\(a0\)
+[ 	]+24:[ 	]+18a5252f[ 	]+sc.w[ 	]+a0,a0,\(a0\)
+[ 	]+28:[ 	]+1ca5252f[ 	]+sc.w.aq[ 	]+a0,a0,\(a0\)
+[ 	]+2c:[ 	]+1ca5252f[ 	]+sc.w.aq[ 	]+a0,a0,\(a0\)
+[ 	]+30:[ 	]+1aa5252f[ 	]+sc.w.rl[ 	]+a0,a0,\(a0\)
+[ 	]+34:[ 	]+1aa5252f[ 	]+sc.w.rl[ 	]+a0,a0,\(a0\)
+[ 	]+38:[ 	]+1ea5252f[ 	]+sc.w.aqrl[ 	]+a0,a0,\(a0\)
+[ 	]+3c:[ 	]+1ea5252f[ 	]+sc.w.aqrl[ 	]+a0,a0,\(a0\)
+[ 	]+40:[ 	]+08a5252f[ 	]+amoswap.w[ 	]+a0,a0,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a0,\(a0\)
+[ 	]+128:[ 	]+c4a5252f[ 	]+amominu.w.aq[ 	]+a0,a0,\(a0\)
+[ 	]+12c:[ 	]+c4a5252f[ 	]+amominu.w.aq[ 	]+a0,a0,\(a0\)
+[ 	]+130:[ 	]+c2a5252f[ 	]+amominu.w.rl[ 	]+a0,a0,\(a0\)
+[ 	]+134:[ 	]+c2a5252f[ 	]+amominu.w.rl[ 	]+a0,a0,\(a0\)
+[ 	]+138:[ 	]+c6a5252f[ 	]+amominu.w.aqrl[ 	]+a0,a0,\(a0\)
+[ 	]+13c:[ 	]+c6a5252f[ 	]+amominu.w.aqrl[ 	]+a0,a0,\(a0\)
+[ 	]+140:[ 	]+e0a5252f[ 	]+amomaxu.w[ 	]+a0,a0,\(a0\)
+[ 	]+144:[ 	]+e0a5252f[ 	]+amomaxu.w[ 	]+a0,a0,\(a0\)
+[ 	]+148:[ 	]+e4a5252f[ 	]+amomaxu.w.aq[ 	]+a0,a0,\(a0\)
+[ 	]+14c:[ 	]+e4a5252f[ 	]+amomaxu.w.aq[ 	]+a0,a0,\(a0\)
+[ 	]+150:[ 	]+e2a5252f[ 	]+amomaxu.w.rl[ 	]+a0,a0,\(a0\)
+[ 	]+154:[ 	]+e2a5252f[ 	]+amomaxu.w.rl[ 	]+a0,a0,\(a0\)
+[ 	]+158:[ 	]+e6a5252f[ 	]+amomaxu.w.aqrl[ 	]+a0,a0,\(a0\)
+[ 	]+15c:[ 	]+e6a5252f[ 	]+amomaxu.w.aqrl[ 	]+a0,a0,\(a0\)
diff --git a/gas/testsuite/gas/riscv/a-ext.s b/gas/testsuite/gas/riscv/a-ext.s
new file mode 100644
index 00000000000..09ef16686f7
--- /dev/null
+++ b/gas/testsuite/gas/riscv/a-ext.s
@@ -0,0 +1,89 @@ 
+target:
+	lr.w	a0, 0(a0)
+	lr.w	a0, (a0)
+	lr.w.aq	a0, 0(a0)
+	lr.w.aq	a0, (a0)
+	lr.w.rl	a0, 0(a0)
+	lr.w.rl	a0, (a0)
+	lr.w.aqrl	a0, 0(a0)
+	lr.w.aqrl	a0, (a0)
+	sc.w	a0, a0, 0(a0)
+	sc.w	a0, a0, (a0)
+	sc.w.aq	a0, a0, 0(a0)
+	sc.w.aq	a0, a0, (a0)
+	sc.w.rl	a0, a0, 0(a0)
+	sc.w.rl	a0, a0, (a0)
+	sc.w.aqrl	a0, a0, 0(a0)
+	sc.w.aqrl	a0, a0, (a0)
+	amoswap.w	a0, a0, 0(a0)
+	amoswap.w	a0, a0, (a0)
+	amoswap.w.aq	a0, a0, 0(a0)
+	amoswap.w.aq	a0, a0, (a0)
+	amoswap.w.rl	a0, a0, 0(a0)
+	amoswap.w.rl	a0, a0, (a0)
+	amoswap.w.aqrl	a0, a0, 0(a0)
+	amoswap.w.aqrl	a0, a0, (a0)
+	amoadd.w	a0, a0, 0(a0)
+	amoadd.w	a0, a0, (a0)
+	amoadd.w.aq	a0, a0, 0(a0)
+	amoadd.w.aq	a0, a0, (a0)
+	amoadd.w.rl	a0, a0, 0(a0)
+	amoadd.w.rl	a0, a0, (a0)
+	amoadd.w.aqrl	a0, a0, 0(a0)
+	amoadd.w.aqrl	a0, a0, (a0)
+	amoxor.w	a0, a0, 0(a0)
+	amoxor.w	a0, a0, (a0)
+	amoxor.w.aq	a0, a0, 0(a0)
+	amoxor.w.aq	a0, a0, (a0)
+	amoxor.w.rl	a0, a0, 0(a0)
+	amoxor.w.rl	a0, a0, (a0)
+	amoxor.w.aqrl	a0, a0, 0(a0)
+	amoxor.w.aqrl	a0, a0, (a0)
+	amoand.w	a0, a0, 0(a0)
+	amoand.w	a0, a0, (a0)
+	amoand.w.aq	a0, a0, 0(a0)
+	amoand.w.aq	a0, a0, (a0)
+	amoand.w.rl	a0, a0, 0(a0)
+	amoand.w.rl	a0, a0, (a0)
+	amoand.w.aqrl	a0, a0, 0(a0)
+	amoand.w.aqrl	a0, a0, (a0)
+	amoor.w	a0, a0, 0(a0)
+	amoor.w	a0, a0, (a0)
+	amoor.w.aq	a0, a0, 0(a0)
+	amoor.w.aq	a0, a0, (a0)
+	amoor.w.rl	a0, a0, 0(a0)
+	amoor.w.rl	a0, a0, (a0)
+	amoor.w.aqrl	a0, a0, 0(a0)
+	amoor.w.aqrl	a0, a0, (a0)
+	amomin.w	a0, a0, 0(a0)
+	amomin.w	a0, a0, (a0)
+	amomin.w.aq	a0, a0, 0(a0)
+	amomin.w.aq	a0, a0, (a0)
+	amomin.w.rl	a0, a0, 0(a0)
+	amomin.w.rl	a0, a0, (a0)
+	amomin.w.aqrl	a0, a0, 0(a0)
+	amomin.w.aqrl	a0, a0, (a0)
+	amomax.w	a0, a0, 0(a0)
+	amomax.w	a0, a0, (a0)
+	amomax.w.aq	a0, a0, 0(a0)
+	amomax.w.aq	a0, a0, (a0)
+	amomax.w.rl	a0, a0, 0(a0)
+	amomax.w.rl	a0, a0, (a0)
+	amomax.w.aqrl	a0, a0, 0(a0)
+	amomax.w.aqrl	a0, a0, (a0)
+	amominu.w	a0, a0, 0(a0)
+	amominu.w	a0, a0, (a0)
+	amominu.w.aq	a0, a0, 0(a0)
+	amominu.w.aq	a0, a0, (a0)
+	amominu.w.rl	a0, a0, 0(a0)
+	amominu.w.rl	a0, a0, (a0)
+	amominu.w.aqrl	a0, a0, 0(a0)
+	amominu.w.aqrl	a0, a0, (a0)
+	amomaxu.w	a0, a0, 0(a0)
+	amomaxu.w	a0, a0, (a0)
+	amomaxu.w.aq	a0, a0, 0(a0)
+	amomaxu.w.aq	a0, a0, (a0)
+	amomaxu.w.rl	a0, a0, 0(a0)
+	amomaxu.w.rl	a0, a0, (a0)
+	amomaxu.w.aqrl	a0, a0, 0(a0)
+	amomaxu.w.aqrl	a0, a0, (a0)