Skip to content

Commit

Permalink
UNRATIFIED RISC-V: Add support for 'Zabha' subword AMO extension
Browse files Browse the repository at this point in the history
[DO NOT MERGE]
Until this extension is frozen/ratified and final version number is
determined, this patch should not be merged upstream. This commit uses
unratified version 0.9 as in the latest release tag:
<https://github.com/riscv/riscv-zabha/releases/tag/v0.9>

This commit adds support for the 'Zabha' extension, adding subword
(byte and half) AMO instructions.

This is based on the latest commit:
<riscv/riscv-zabha@810f0ee>

bfd/ChangeLog:

	* elfxx-riscv.c
	(riscv_implicit_subsets): Make 'Zabha' to imply 'A' extension.
	(riscv_supported_std_z_ext): Add 'Zabha' to the supported list.
	(riscv_multi_subset_supports, riscv_multi_subset_supports_ext):
	Add handling for new instruction classes.

gas/ChangeLog:

	* testsuite/gas/riscv/zabha.s: New test.
	* testsuite/gas/riscv/zabha.d: Likewise.
	* testsuite/gas/riscv/zabha-zacas.s: New test.
	* testsuite/gas/riscv/zabha-zacas.d: Likewise.

include/ChangeLog:

	* opcode/riscv-opc.h (MATCH_AMOADD_B, MASK_AMOADD_B,
	MATCH_AMOADD_H, MASK_AMOADD_H, MATCH_AMOAND_B, MASK_AMOAND_B,
	MATCH_AMOAND_H, MASK_AMOAND_H, MATCH_AMOMAX_B, MASK_AMOMAX_B,
	MATCH_AMOMAX_H, MASK_AMOMAX_H, MATCH_AMOMAXU_B, MASK_AMOMAXU_B,
	MATCH_AMOMAXU_H, MASK_AMOMAXU_H, MATCH_AMOMIN_B, MASK_AMOMIN_B,
	MATCH_AMOMIN_H, MASK_AMOMIN_H, MATCH_AMOMINU_B, MASK_AMOMINU_B,
	MATCH_AMOMINU_H, MASK_AMOMINU_H, MATCH_AMOOR_B, MASK_AMOOR_B,
	MATCH_AMOOR_H, MASK_AMOOR_H, MATCH_AMOSWAP_B, MASK_AMOSWAP_B,
	MATCH_AMOSWAP_H, MASK_AMOSWAP_H, MATCH_AMOXOR_B, MASK_AMOXOR_B,
	MATCH_AMOXOR_H, MASK_AMOXOR_H, MATCH_AMOCAS_B, MASK_AMOCAS_B,
	MATCH_AMOCAS_H, MASK_AMOCAS_H): New.
	* opcode/riscv.h (enum riscv_insn_class): Add new instruction
	classes INSN_CLASS_ZABHA and INSN_CLASS_ZABHA_AND_ZACAS.

opcodes/ChangeLog:

	* riscv-opc.c (riscv_opcodes): Add subword AMO instructions.
  • Loading branch information
a4lg committed Oct 19, 2023
1 parent c6ab6d2 commit e001b56
Show file tree
Hide file tree
Showing 8 changed files with 343 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bfd/elfxx-riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] =
{"zhinx", "zhinxmin", check_implicit_always},
{"zhinxmin", "zfinx", check_implicit_always},
{"zfinx", "zicsr", check_implicit_always},
{"zabha", "a", check_implicit_always},
{"zacas", "a", check_implicit_always},
{"zk", "zkn", check_implicit_always},
{"zk", "zkr", check_implicit_always},
Expand Down Expand Up @@ -1260,6 +1261,7 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] =
{"zihintntl", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"zihintpause", ISA_SPEC_CLASS_DRAFT, 2, 0, 0 },
{"zmmul", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"zabha", ISA_SPEC_CLASS_DRAFT, 0, 9, 0 },
{"zacas", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"zawrs", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"zfa", ISA_SPEC_CLASS_DRAFT, 0, 1, 0 },
Expand Down Expand Up @@ -2411,6 +2413,11 @@ riscv_multi_subset_supports (riscv_parse_subset_t *rps,
return riscv_subset_supports (rps, "zmmul");
case INSN_CLASS_A:
return riscv_subset_supports (rps, "a");
case INSN_CLASS_ZABHA:
return riscv_subset_supports (rps, "zabha");
case INSN_CLASS_ZABHA_AND_ZACAS:
return (riscv_subset_supports (rps, "zabha")
&& riscv_subset_supports (rps, "zacas"));
case INSN_CLASS_ZACAS:
return riscv_subset_supports (rps, "zacas");
case INSN_CLASS_ZAWRS:
Expand Down Expand Up @@ -2623,6 +2630,16 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
return _ ("m' or `zmmul");
case INSN_CLASS_A:
return "a";
case INSN_CLASS_ZABHA:
return "zabha";
case INSN_CLASS_ZABHA_AND_ZACAS:
if (!riscv_subset_supports (rps, "zabha")
&& !riscv_subset_supports (rps, "zacas"))
return _("zabha' and `zacas");
else if (!riscv_subset_supports (rps, "zabha"))
return "zabha";
else
return "zacas";
case INSN_CLASS_ZACAS:
return "zacas";
case INSN_CLASS_ZAWRS:
Expand Down
17 changes: 17 additions & 0 deletions gas/testsuite/gas/riscv/zabha-zacas.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#as: -march=rv32i_zabha_zacas
#objdump: -d

.*:[ ]+file format .*


Disassembly of section .text:

0+000 <target>:
[ ]+[0-9a-f]+:[ ]+28c5852f[ ]+amocas\.b[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+2cc5852f[ ]+amocas\.b\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+2ac5852f[ ]+amocas\.b\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+2ec5852f[ ]+amocas\.b\.aqrl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+28c5952f[ ]+amocas\.h[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+2cc5952f[ ]+amocas\.h\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+2ac5952f[ ]+amocas\.h\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+2ec5952f[ ]+amocas\.h\.aqrl[ ]+a0,a2,\(a1\)
9 changes: 9 additions & 0 deletions gas/testsuite/gas/riscv/zabha-zacas.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
target:
amocas.b a0, a2, (a1)
amocas.b.aq a0, a2, (a1)
amocas.b.rl a0, a2, (a1)
amocas.b.aqrl a0, a2, (a1)
amocas.h a0, a2, (a1)
amocas.h.aq a0, a2, (a1)
amocas.h.rl a0, a2, (a1)
amocas.h.aqrl a0, a2, (a1)
81 changes: 81 additions & 0 deletions gas/testsuite/gas/riscv/zabha.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#as: -march=rv32i_zabha
#objdump: -d

.*:[ ]+file format .*


Disassembly of section .text:

0+000 <target>:
[ ]+[0-9a-f]+:[ ]+08c5852f[ ]+amoswap\.b[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+0cc5852f[ ]+amoswap\.b\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+0ac5852f[ ]+amoswap\.b\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+0ec5852f[ ]+amoswap\.b\.aqrl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+00c5852f[ ]+amoadd\.b[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+04c5852f[ ]+amoadd\.b\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+02c5852f[ ]+amoadd\.b\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+06c5852f[ ]+amoadd\.b\.aqrl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+20c5852f[ ]+amoxor\.b[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+24c5852f[ ]+amoxor\.b\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+22c5852f[ ]+amoxor\.b\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+26c5852f[ ]+amoxor\.b\.aqrl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+60c5852f[ ]+amoand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4c5952f[ ]+amominu\.h\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+c2c5952f[ ]+amominu\.h\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+c6c5952f[ ]+amominu\.h\.aqrl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+e0c5952f[ ]+amomaxu\.h[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+e4c5952f[ ]+amomaxu\.h\.aq[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+e2c5952f[ ]+amomaxu\.h\.rl[ ]+a0,a2,\(a1\)
[ ]+[0-9a-f]+:[ ]+e6c5952f[ ]+amomaxu\.h\.aqrl[ ]+a0,a2,\(a1\)
73 changes: 73 additions & 0 deletions gas/testsuite/gas/riscv/zabha.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
target:
amoswap.b a0, a2, (a1)
amoswap.b.aq a0, a2, (a1)
amoswap.b.rl a0, a2, (a1)
amoswap.b.aqrl a0, a2, (a1)
amoadd.b a0, a2, (a1)
amoadd.b.aq a0, a2, (a1)
amoadd.b.rl a0, a2, (a1)
amoadd.b.aqrl a0, a2, (a1)
amoxor.b a0, a2, (a1)
amoxor.b.aq a0, a2, (a1)
amoxor.b.rl a0, a2, (a1)
amoxor.b.aqrl a0, a2, (a1)
amoand.b a0, a2, (a1)
amoand.b.aq a0, a2, (a1)
amoand.b.rl a0, a2, (a1)
amoand.b.aqrl a0, a2, (a1)
amoor.b a0, a2, (a1)
amoor.b.aq a0, a2, (a1)
amoor.b.rl a0, a2, (a1)
amoor.b.aqrl a0, a2, (a1)
amomin.b a0, a2, (a1)
amomin.b.aq a0, a2, (a1)
amomin.b.rl a0, a2, (a1)
amomin.b.aqrl a0, a2, (a1)
amomax.b a0, a2, (a1)
amomax.b.aq a0, a2, (a1)
amomax.b.rl a0, a2, (a1)
amomax.b.aqrl a0, a2, (a1)
amominu.b a0, a2, (a1)
amominu.b.aq a0, a2, (a1)
amominu.b.rl a0, a2, (a1)
amominu.b.aqrl a0, a2, (a1)
amomaxu.b a0, a2, (a1)
amomaxu.b.aq a0, a2, (a1)
amomaxu.b.rl a0, a2, (a1)
amomaxu.b.aqrl a0, a2, (a1)
amoswap.h a0, a2, (a1)
amoswap.h.aq a0, a2, (a1)
amoswap.h.rl a0, a2, (a1)
amoswap.h.aqrl a0, a2, (a1)
amoadd.h a0, a2, (a1)
amoadd.h.aq a0, a2, (a1)
amoadd.h.rl a0, a2, (a1)
amoadd.h.aqrl a0, a2, (a1)
amoxor.h a0, a2, (a1)
amoxor.h.aq a0, a2, (a1)
amoxor.h.rl a0, a2, (a1)
amoxor.h.aqrl a0, a2, (a1)
amoand.h a0, a2, (a1)
amoand.h.aq a0, a2, (a1)
amoand.h.rl a0, a2, (a1)
amoand.h.aqrl a0, a2, (a1)
amoor.h a0, a2, (a1)
amoor.h.aq a0, a2, (a1)
amoor.h.rl a0, a2, (a1)
amoor.h.aqrl a0, a2, (a1)
amomin.h a0, a2, (a1)
amomin.h.aq a0, a2, (a1)
amomin.h.rl a0, a2, (a1)
amomin.h.aqrl a0, a2, (a1)
amomax.h a0, a2, (a1)
amomax.h.aq a0, a2, (a1)
amomax.h.rl a0, a2, (a1)
amomax.h.aqrl a0, a2, (a1)
amominu.h a0, a2, (a1)
amominu.h.aq a0, a2, (a1)
amominu.h.rl a0, a2, (a1)
amominu.h.aqrl a0, a2, (a1)
amomaxu.h a0, a2, (a1)
amomaxu.h.aq a0, a2, (a1)
amomaxu.h.rl a0, a2, (a1)
amomaxu.h.aqrl a0, a2, (a1)
62 changes: 62 additions & 0 deletions include/opcode/riscv-opc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2315,6 +2315,47 @@
#define MASK_C_NTL_S1 0xffff
#define MATCH_C_NTL_ALL 0x9016
#define MASK_C_NTL_ALL 0xffff
/* Zabha instructions. */
#define MATCH_AMOADD_B 0x2f
#define MASK_AMOADD_B 0xf800707f
#define MATCH_AMOADD_H 0x102f
#define MASK_AMOADD_H 0xf800707f
#define MATCH_AMOAND_B 0x6000002f
#define MASK_AMOAND_B 0xf800707f
#define MATCH_AMOAND_H 0x6000102f
#define MASK_AMOAND_H 0xf800707f
#define MATCH_AMOMAX_B 0xa000002f
#define MASK_AMOMAX_B 0xf800707f
#define MATCH_AMOMAX_H 0xa000102f
#define MASK_AMOMAX_H 0xf800707f
#define MATCH_AMOMAXU_B 0xe000002f
#define MASK_AMOMAXU_B 0xf800707f
#define MATCH_AMOMAXU_H 0xe000102f
#define MASK_AMOMAXU_H 0xf800707f
#define MATCH_AMOMIN_B 0x8000002f
#define MASK_AMOMIN_B 0xf800707f
#define MATCH_AMOMIN_H 0x8000102f
#define MASK_AMOMIN_H 0xf800707f
#define MATCH_AMOMINU_B 0xc000002f
#define MASK_AMOMINU_B 0xf800707f
#define MATCH_AMOMINU_H 0xc000102f
#define MASK_AMOMINU_H 0xf800707f
#define MATCH_AMOOR_B 0x4000002f
#define MASK_AMOOR_B 0xf800707f
#define MATCH_AMOOR_H 0x4000102f
#define MASK_AMOOR_H 0xf800707f
#define MATCH_AMOSWAP_B 0x800002f
#define MASK_AMOSWAP_B 0xf800707f
#define MATCH_AMOSWAP_H 0x800102f
#define MASK_AMOSWAP_H 0xf800707f
#define MATCH_AMOXOR_B 0x2000002f
#define MASK_AMOXOR_B 0xf800707f
#define MATCH_AMOXOR_H 0x2000102f
#define MASK_AMOXOR_H 0xf800707f
#define MATCH_AMOCAS_B 0x2800002f
#define MASK_AMOCAS_B 0xf800707f
#define MATCH_AMOCAS_H 0x2800102f
#define MASK_AMOCAS_H 0xf800707f
/* Zacas instructions. */
#define MATCH_AMOCAS_D 0x2800302f
#define MASK_AMOCAS_D 0xf800707f
Expand Down Expand Up @@ -3377,6 +3418,27 @@ DECLARE_INSN(c_ntl_p1, MATCH_C_NTL_P1, MASK_C_NTL_P1)
DECLARE_INSN(c_ntl_pall, MATCH_C_NTL_PALL, MASK_C_NTL_PALL)
DECLARE_INSN(c_ntl_s1, MATCH_C_NTL_S1, MASK_C_NTL_S1)
DECLARE_INSN(c_ntl_all, MATCH_C_NTL_ALL, MASK_C_NTL_ALL)
/* Zabha instructions. */
DECLARE_INSN(amoadd_b, MATCH_AMOADD_B, MASK_AMOADD_B)
DECLARE_INSN(amoadd_h, MATCH_AMOADD_H, MASK_AMOADD_H)
DECLARE_INSN(amoand_b, MATCH_AMOAND_B, MASK_AMOAND_B)
DECLARE_INSN(amoand_h, MATCH_AMOAND_H, MASK_AMOAND_H)
DECLARE_INSN(amomax_b, MATCH_AMOMAX_B, MASK_AMOMAX_B)
DECLARE_INSN(amomax_h, MATCH_AMOMAX_H, MASK_AMOMAX_H)
DECLARE_INSN(amomaxu_b, MATCH_AMOMAXU_B, MASK_AMOMAXU_B)
DECLARE_INSN(amomaxu_h, MATCH_AMOMAXU_H, MASK_AMOMAXU_H)
DECLARE_INSN(amomin_b, MATCH_AMOMIN_B, MASK_AMOMIN_B)
DECLARE_INSN(amomin_h, MATCH_AMOMIN_H, MASK_AMOMIN_H)
DECLARE_INSN(amominu_b, MATCH_AMOMINU_B, MASK_AMOMINU_B)
DECLARE_INSN(amominu_h, MATCH_AMOMINU_H, MASK_AMOMINU_H)
DECLARE_INSN(amoor_b, MATCH_AMOOR_B, MASK_AMOOR_B)
DECLARE_INSN(amoor_h, MATCH_AMOOR_H, MASK_AMOOR_H)
DECLARE_INSN(amoswap_b, MATCH_AMOSWAP_B, MASK_AMOSWAP_B)
DECLARE_INSN(amoswap_h, MATCH_AMOSWAP_H, MASK_AMOSWAP_H)
DECLARE_INSN(amoxor_b, MATCH_AMOXOR_B, MASK_AMOXOR_B)
DECLARE_INSN(amoxor_h, MATCH_AMOXOR_H, MASK_AMOXOR_H)
DECLARE_INSN(amocas_b, MATCH_AMOCAS_B, MASK_AMOCAS_B)
DECLARE_INSN(amocas_h, MATCH_AMOCAS_H, MASK_AMOCAS_H)
/* Zacas instructions. */
DECLARE_INSN(amocas_d, MATCH_AMOCAS_D, MASK_AMOCAS_D)
DECLARE_INSN(amocas_q, MATCH_AMOCAS_Q, MASK_AMOCAS_Q)
Expand Down
2 changes: 2 additions & 0 deletions include/opcode/riscv.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ enum riscv_insn_class
INSN_CLASS_ZIHINTNTL_AND_C,
INSN_CLASS_ZIHINTPAUSE,
INSN_CLASS_ZMMUL,
INSN_CLASS_ZABHA,
INSN_CLASS_ZABHA_AND_ZACAS,
INSN_CLASS_ZACAS,
INSN_CLASS_ZAWRS,
INSN_CLASS_F_INX,
Expand Down
Loading

0 comments on commit e001b56

Please sign in to comment.