Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension: Zabha #139

Open
wants to merge 1 commit into
base: riscv-zacas
Choose a base branch
from
Open

Extension: Zabha #139

wants to merge 1 commit into from

Conversation

a4lg
Copy link
Owner

@a4lg a4lg commented Oct 17, 2023

@a4lg a4lg added the enhancement New feature or request label Oct 17, 2023
@a4lg a4lg force-pushed the riscv-zabha branch 2 times, most recently from e62a28d to 5497eb0 Compare October 21, 2023 03:13
@a4lg a4lg force-pushed the riscv-zacas branch 2 times, most recently from 4682912 to d26cfc8 Compare October 21, 2023 03:44
[DEPENDENCY]
This patch requires my 'Zacas' support patch v2 as in:
<https://sourceware.org/pipermail/binutils/2023-October/130098.html>

[DO NOT MERGE]
Despite that this extension is nearing to be Frozen, the development of
this extension is not yet completed.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant