-
Notifications
You must be signed in to change notification settings - Fork 41
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
Asm constraint to require an even register #37
Comments
Good catch, |
asb
added a commit
to llvm/llvm-project
that referenced
this issue
Jul 10, 2023
This implements the v1.0-rc1 draft extension. amocas.d on RV32 and amocas.q have the restriction that rd and rs2 must be even registers. I've opted to implement this restriction in RISCVAsmParser::validateInstruction even though for codegen we'll need a new register class and can then remove this validation. This also sidesteps, for now, the issue of amocas.d being different on rv32 vs rv64. See <riscv-non-isa/riscv-c-api-doc#37> for the issue of needing an agreed asm register constraint for register pairs. Differential Revision: https://reviews.llvm.org/D149248
veselypeta
pushed a commit
to veselypeta/cherillvm
that referenced
this issue
Sep 4, 2024
This implements the v1.0-rc1 draft extension. amocas.d on RV32 and amocas.q have the restriction that rd and rs2 must be even registers. I've opted to implement this restriction in RISCVAsmParser::validateInstruction even though for codegen we'll need a new register class and can then remove this validation. This also sidesteps, for now, the issue of amocas.d being different on rv32 vs rv64. See <riscv-non-isa/riscv-c-api-doc#37> for the issue of needing an agreed asm register constraint for register pairs. Differential Revision: https://reviews.llvm.org/D149248
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't currently have an asm constraint to require an even register (for an input or output in a register pair) and I don't believe there's a cross-target constraint already defined. We should likely decide on one. This could be used with the proposed zacas extension (amocas.d on rv32 or amocas.q on rv64), for zdinx, and IIRC the P extension.
The text was updated successfully, but these errors were encountered: