Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Behavior of -march=zcf on rv64. Behavior of F+Zce on RV64. #221

Open
topperc opened this issue Jun 26, 2023 · 8 comments
Open

Behavior of -march=zcf on rv64. Behavior of F+Zce on RV64. #221

topperc opened this issue Jun 26, 2023 · 8 comments

Comments

@topperc
Copy link

topperc commented Jun 26, 2023

Since Zcf doesn't contain any instructions on RV64. Should toolchains reject it or accept it?

The spec says "Specifying Zce with F includes Zca, Zcb, Zcmp, Zcmt and Zcf". Zcf doesn't contain any instructions on rv64. Should toolchains only enable Zca, Zcb, Zcmp, Zcmt for Zce on rv64?

@tariqkurd-repo
Copy link
Contributor

is there any precedence for empty extensions @aswaterman ? or is this the first time?

@aswaterman
Copy link
Collaborator

I don’t believe there is such a thing, even though it would be harmless. For my part, I’d favor rejecting it in RV64. Whichever is chosen should be clearly reflected in the spec.

@tariqkurd-repo
Copy link
Contributor

yes I think that makes sense, although the wavefront spec isn't in great shape as it has incomplete SAIL code in it.
@Alasdair can we remove the SAIL code so that I can update the spec and re-release it?

@topperc
Copy link
Author

topperc commented Jun 30, 2023

This my LLVM patch. https://reviews.llvm.org/D153742 It includes an error for Zcf on RV64. If Zce is specified with F, it only enables Zcf for RV32.

Couple additional questions.
Does Zcf imply F and does Zcd imply D?

@topperc
Copy link
Author

topperc commented Jul 10, 2023

Any progress on getting the spec updated?

@tariqkurd-repo
Copy link
Contributor

#223

I gave up on getting the SAIL fixed so I reverted that PR, so I had a working head of main again.
Pleae have a look at the PR.

@pz9115
Copy link
Contributor

pz9115 commented Jul 11, 2023

This my LLVM patch. https://reviews.llvm.org/D153742 It includes an error for Zcf on RV64. If Zce is specified with F, it only enables Zcf for RV32.

Couple additional questions. Does Zcf imply F and does Zcd imply D?

As fld/fsd(sp) instruction description in ISA-spec, you have to use f/d with zcf/d.
But not sure if we need to add the imply relations with them, in GCC I just add an error to remind people missing f/d when using zcf/d.

@pz9115
Copy link
Contributor

pz9115 commented Jul 13, 2023

This my LLVM patch. https://reviews.llvm.org/D153742 It includes an error for Zcf on RV64. If Zce is specified with F, it only enables Zcf for RV32.

Couple additional questions. Does Zcf imply F and does Zcd imply D?

Adding dependencies can make it easier for users to directly use Zcf/d extensions,
So I added the depending rules in this PR #224

a4lg added a commit to a4lg/binutils-gdb that referenced this issue Jul 24, 2023
As per:
<riscvarchive/riscv-code-size-reduction#221>,
the 'Zcf' extension does not exist on RV64.  This is reflected on the
version 1.0.4-1 of the code size reduction specification:
<https:/riscv/riscv-code-size-reduction/releases/tag/v1.0.4-1>.

This commit prohibits the combination: RV64 (or any ISA with XLEN > 32)
and the 'Zcf' extension.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit
	combination of RV64 and 'Zcf'.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-rv64i_zcf.d: New test.
	* testsuite/gas/riscv/march-fail-rv64i_zcf.l: Likewise.
a4lg added a commit to a4lg/binutils-gdb that referenced this issue Jul 24, 2023
As per:
<riscvarchive/riscv-code-size-reduction#221>,
the 'Zcf' extension does not exist on RV64.  This is reflected on the
version 1.0.4-1 of the code size reduction specification:
<https:/riscv/riscv-code-size-reduction/releases/tag/v1.0.4-1>.

This commit prohibits the combination: RV64 (or any ISA with XLEN > 32)
and the 'Zcf' extension.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit
	combination of RV64 and 'Zcf'.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-rv64i_zcf.d: New test.
	* testsuite/gas/riscv/march-fail-rv64i_zcf.l: Likewise.
wangliu-iscas pushed a commit to plctlab/patchwork-binutils-gdb that referenced this issue Jul 24, 2023
As per:
<riscvarchive/riscv-code-size-reduction#221>,
the 'Zcf' extension does not exist on RV64.  This is reflected on the
version 1.0.4-1 of the code size reduction specification:
<https:/riscv/riscv-code-size-reduction/releases/tag/v1.0.4-1>.

This commit prohibits the combination: RV64 (or any ISA with XLEN > 32)
and the 'Zcf' extension.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit
	combination of RV64 and 'Zcf'.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-rv64i_zcf.d: New test.
	* testsuite/gas/riscv/march-fail-rv64i_zcf.l: Likewise.
saagarjha pushed a commit to ahjragaas/binutils-gdb that referenced this issue Jul 24, 2023
As per:
<riscvarchive/riscv-code-size-reduction#221>,
the 'Zcf' extension does not exist on RV64.  This is reflected on the
version 1.0.4-1 of the code size reduction specification:
<https:/riscv/riscv-code-size-reduction/releases/tag/v1.0.4-1>.

This commit prohibits the combination: RV64 (or any ISA with XLEN > 32)
and the 'Zcf' extension.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_parse_check_conflicts): Prohibit
	combination of RV64 and 'Zcf'.

gas/ChangeLog:

	* testsuite/gas/riscv/march-fail-rv64i_zcf.d: New test.
	* testsuite/gas/riscv/march-fail-rv64i_zcf.l: Likewise.
fanghuaqi added a commit to Nuclei-Software/nuclei-sdk that referenced this issue Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants