Closed ergpopler closed 2 years ago
Hey there,
I notice that the llvm_asm!
macro has been semi deprecated, but it still should be working.
It works for me with current master
at 2b14a0836cdbf978d8da24b34a3bcfd07bd7e901 and up-to-date nightly compiler version:
rustc 1.49.0-nightly (07e968b64 2020-10-27)
cargo 1.49.0-nightly (dd83ae55c 2020-10-20)
I notice in https://github.com/rust-lang/rust/issues/70173 that some time ago people temporarily started getting errors saying that llvm_asm!
is gone, but that seems to be an old temporary rust nightly issue.
I can compile the crate fine on my machine.
Re. updating to the new asm!
macro:
The Rust toolchain needs currently not-implemented target-specific support for enabling the asm!
macro on AVR:
error[E0472]: asm! is unsupported on this target
--> src/lib.rs:36:13
|
36 | asm!("nop");
| ^
What version of nightly are you using/does upgrading fix the problem?
any improvements?
The llvm_asm
macro should still work. I added an example in d9eff3810b1101739045c45299b2de5cd107bcf1 and it compiles on my machine fine. I vaguely remember that a temporary llvm_asm
macro regression caused it to stop working around this time. The asm
macro is still not supported by AVR.
I’m getting an error with the latest nightly with both 0.3.1 and 0.3.2:
error: couldn't allocate input reg for constraint 'w'
--> .../avr_delay-0.3.2/src/lib.rs:34:17
|
34 | unsafe {llvm_asm!("1: sbiw $0,1
| ^
error: couldn't allocate input reg for constraint 'w'
--> .../avr_delay-0.3.2/src/lib.rs:41:13
|
41 | unsafe {llvm_asm!("1: sbiw $0,1
| ^
Yeah, I'm getting the same issue as @andrewshadura. Is there a way around this error?
I got a similar issue and got it to work bychanging the nightly version to nightly-2021-01-07
rustup override set nightly-2021-01-07
https://github.com/rust-lang/rust/pull/92816 Any improvements according to this?
Any improvements according to this?
This not an issue any more.
llvm_asm! has been deprecated, and it no longer works...
and trying to get it to work makes it not work in other ways.