-
Notifications
You must be signed in to change notification settings - Fork 87
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
CSR register Vector rounding mode #defines missing #84
Comments
Somewhat related: do we plan to add intrinsics for setting FRM? Currently we use fsrm in asm. |
In the riscv_vector.h file (in gcc rv32gc 10.1.0 rvv-intrinsic-patch) I use vread_csr() and vwrite_csr() intrinsics:
It would be useful if the register values/bit-fields/settings were also defined here for RVV_VXRM and the other CSR registers. |
I think you need to this #46? |
Both LLVM and GCC have implemented these API. This issue is resolved now. |
This was originally posted on: riscvarchive/riscv-gcc#256
I was expecting to find some #defines for the rounding modes in riscv-vector.h, something like:
/* Vector Fixed-Point Rounding Mode Register vxrm settings
Use with vwrite_csr(RVV_VXRM, RVV_VXRM_XXX) */
#define RVV_VXRM_RNU (0) /* Round-to-nearest-up (add 0.5 LSB) /
#define RVV_VXRM_RNE (1) / Round-to-nearest-even /
#define RVV_VXRM_RDN (2) / Round-down (truncate) /
#define RVV_VXRM_ROD (3) / Round-to-add (OR bits into LSB, aka "jam") */
Could use double underscore between field and mode value, depending upon your convention, e.g.:
#define RVV_VXRM__RNU (0) /* Round-to-nearest-up (add 0.5 LSB) /
#define RVV_VXRM__RNE (1) / Round-en to-nearest-even /
#define RVV_VXRM__RDN (2) / Round-down (truncate) /
#define RVV_VXRM__ROD (3) / Round-to-add (OR bits into LSB, aka "jam") */
The text was updated successfully, but these errors were encountered: