-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Can't use const fn directly as inline assembly constant input #41337
Comments
We could make this work the same we did for SIMD intrinsics (requiring certain arguments are constant, and promoting them to ensure codegen can always succeed): rust/src/librustc_mir/transform/promote_consts.rs Lines 219 to 238 in 54b7d21
|
Note that the current proposal for inline assembly includes |
Oh, nice, for some reason I expected if that were the case we'd get a comment on these issues stating it, I should've checked first. |
This issue does not apply to the new The legacy |
I hoped this would work
but it generates (without optimizations)
giving
error: invalid operand for inline asm constraint 'i'
.The current solution seems to be
which generates
like I hoped the first case would.
Could we make the first case guaranteed to work?
The text was updated successfully, but these errors were encountered: