-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Nightly stops to accept registers r8-15 on thumbv6m #99071
Comments
Related:
But both commits should be part of current stable, so those don't explain the regression. |
This was an intentional change to fix |
@Amanieu The intended behavior is it should be rejected? It is accepted in stable even though it's been rejected in nightly for months. Perhaps the bug is it's accepted in stable when it shouldn't be? |
Yes, this should be rejected. It is strange that this is being accepted on beta/stable, I'm not sure what could possibly be causing that... |
OK I see what the problem is: |
BTW, the current stable behavior looks very sensible: Only registers r0-6 (r7 is used as the frame pointer) are assigned automatically when specifying the register class So code like this (contrived) example is possible:
https://godbolt.org/z/qqeKcvKz3 This can't easily be done on nightly. Or am I missing something and what stable does is somehow broken? I guess in practice it doesn't matter much and it's usually possible to get by with less arguments. |
I'm working on a fallback register allocator when the backend can't support inline assembly. The problem is that the It might be possible to have a separate register class in the future which allows high registers on Thumb1 targets though. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-medium T-compiler |
…=davidtwco Keep unstable target features for asm feature checking Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
…=davidtwco Keep unstable target features for asm feature checking Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
…=davidtwco Keep unstable target features for asm feature checking Inline assembly uses the target features to determine which registers are available on the current target. However it needs to be able to access unstable target features for this. Fixes rust-lang#99071
Code
I tried this code: (with
--target thumbv6m-none-eabi
)I expected to see this happen: Code compiles, resulting code should be something like:
https://godbolt.org/z/c4Y49qz7q
Instead, this happened: Compilation fails with error message:
https://godbolt.org/z/b6cnG4nM3
Version it worked on
It works on both 1.62.0 and 1.63.0-beta.4, and all other stable versions I tried since
asm!
got stabilized.@Dirbaio did some bisecting and found: nightly-2021-12-09 works, nightly-2021-12-10 fails
Version with regression
I tried it with:
rustc --version --verbose
:I don't have details about the versions @Dirbaio tried.
The text was updated successfully, but these errors were encountered: