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

Add more details in the specification #287

Merged
merged 8 commits into from
Oct 25, 2023
Merged

Add more details in the specification #287

merged 8 commits into from
Oct 25, 2023

Conversation

eopXD
Copy link
Collaborator

@eopXD eopXD commented Oct 24, 2023

While cleaning up the issue threads, I found some more details we need to have in the specification.

This PR:

`_Float16` is defined as type for the IEEE 16-bit floating-point type.
The type was previously `float16_t` and our intent was to try define it
under a RISC-V header. However this is not needed since now both the two
main upstream compiler (LLVM, GCC) supports this.

Signed-off-by: eop Chen <[email protected]>
Using `long` introduces ambiguity to rely on the architecture specified
(rv32/rv64). This is unnecessary since it is likely to be impossible for
a vector length to exceed the value range of an `int`.

Signed-off-by: eop Chen <[email protected]>
@eopXD eopXD changed the title More details in the specification Add more details in the specification Oct 24, 2023
Copy link
Collaborator

@rofirrim rofirrim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @eopXD !

doc/rvv-intrinsic-spec.adoc Outdated Show resolved Hide resolved
doc/rvv-intrinsic-spec.adoc Outdated Show resolved Hide resolved
Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eopXD eopXD merged commit 7a60862 into main Oct 25, 2023
9 checks passed
@eopXD eopXD deleted the eopc/more-notes branch October 25, 2023 12:54
@nick-knight
Copy link
Collaborator

nick-knight commented Jun 10, 2024

@topperc recently noticed that return value for the vcpop and vfirst intrinsics had been switched from unsigned long and long to unsigned int and int, while the implementations in upstream LLVM still have the former types. This change appears to have been made in this PR, with the following justification:

Replace float16_t with _Float16 that is now supported by both LLVM and GCC. This keeps us away from the need to define our own type. (Resolves #31, and alongside also resolves #166.

FP16 is not relevant to those two issues, and the change made in this PR was not the agreed-upon solution to those issues. (I don't know if we had even come to a consensus: I had argued for a different solution altogether.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants