You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds support for the 'Zacas' extension, adding atomic CAS
instructions. Beware that this extension also introduces the concept of
register pairs and it checks the validity of rs1 and rs2 if applicable.
This is based on the latest (frozen) draft:
<https://github.com/riscv/riscv-zacas/releases/tag/v1.0-rc5>
bfd/ChangeLog:
* elfxx-riscv.c
(riscv_implicit_subsets): Make 'Zacas' to imply 'A' extension.
(riscv_supported_std_z_ext): Add 'Zacas' to the supported list.
(riscv_multi_subset_supports, riscv_multi_subset_supports_ext):
Add handling for new instruction class.
gas/ChangeLog:
* testsuite/gas/riscv/zacas-32.s: New test.
* testsuite/gas/riscv/zacas-32.d: Likewise.
* testsuite/gas/riscv/zacas-64.s: Likewise.
* testsuite/gas/riscv/zacas-64.d: Likewise.
* testsuite/gas/riscv/zacas-32-fail.s: New failure test.
* testsuite/gas/riscv/zacas-32-fail.d: Likewise.
* testsuite/gas/riscv/zacas-32-fail.l: Likewise.
* testsuite/gas/riscv/zacas-64-fail.s: New failure test.
* testsuite/gas/riscv/zacas-64-fail.d: Likewise.
* testsuite/gas/riscv/zacas-64-fail.l: Likewise.
include/ChangeLog:
* opcode/riscv-opc.h (MATCH_AMOCAS_D, MASK_AMOCAS_D,
MATCH_AMOCAS_Q, MASK_AMOCAS_Q, MATCH_AMOCAS_W,
MASK_AMOCAS_W): New.
* opcode/riscv.h (enum riscv_insn_class): Add new instruction
class INSN_CLASS_ZACAS.
opcodes/ChangeLog:
* riscv-opc.c (REGGROUP_REGS_x, REGGROUP_REGS_1, REGGROUP_REGS_2,
DEFINE_MATCH_FUNC_R): New match function template with register
groups.
(match_reggroup_r_1_1_1, match_reggroup_r_1_2_2): New.
(riscv_opcodes): Add atomic CAS instructions.
0 commit comments