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

riscv-llvm does not support inline ASM constraints "A" or "rK" #48

Open
markww opened this issue Nov 15, 2017 · 2 comments
Open

riscv-llvm does not support inline ASM constraints "A" or "rK" #48

markww opened this issue Nov 15, 2017 · 2 comments

Comments

@markww
Copy link

markww commented Nov 15, 2017

I have been running into the following complaints while attempting to use riscv-clang in a number of RISCV repositories:

"error: invalid output constraint '+A' in asm"
"error: invalid input constraint 'rK' in asm"

These constraints seem to be recognized and handled just fine by riscv-gcc. These constraints are used in both the riscv-linux project ( see https://github.com/riscv/riscv-linux/blob/riscv-next/arch/riscv/include/asm/bitops.h ) and in the riscv-musl project ( see https://github.com/lluixhi/musl-riscv/blob/master/arch/riscv64/atomic_a.h )

@markww
Copy link
Author

markww commented Nov 15, 2017

Note that these are recognized as RISCV machine-specific constraints by GCC here:

https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

@kishigo
Copy link

kishigo commented Jan 26, 2019

Looking at the https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html, it seems that 'K' is a supported constraint, a 5 bit value for CSR. The rK would seem to mean register constraint + 5 bit constraint

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

No branches or pull requests

2 participants