News for hackers. Stuff that matters.
Re:Rust 1.59.0 with inline assembly support etc. by josephcsible on Thursday February 24, 2022 @02:14PM (#30458912)
Does asm! now give you as much power as llvm_asm! did? I remember a while ago that there were some constructs only possible with the latter.
Re:Rust 1.59.0 with inline assembly support etc. by jcranmer on Thursday February 24, 2022 @02:57PM (#30459458)
So asm! is basically the same functionality, except it's been stripped down to features that are more easily verified for correctness, and some of the syntax has been tweaked to be more understandable. The original asm! macro just passed everything through to the LLVM inline asm construct in raw form, and was renamed llvm_asm! to allow people to keep compatibility while the cleaned-up version of asm! was worked on.

I think the biggest missing features are the more exotic, non-register constraints, but some of the reasons those are omitted are because of unclear coordination between Rust code and the assembly language string.

Re:Rust 1.59.0 with inline assembly support etc. by kibwen on Thursday February 24, 2022 @02:20PM (#30458985)
Can you give more specifics? Backend-wise, the new asm support is still using LLVM's assembly facilities, so it should be just as capable. As far as the user-facing portion is concerned, some features of the `asm!` macro are still unstable (most notably const operands and sym operands), but I'm not aware of any feature that doesn't have an equivalent.
Re:Rust 1.59.0 with inline assembly support etc. by josephcsible on Friday February 25, 2022 @06:51PM (#30473845)
Unfortunately, I no longer remember my old example, and I wasn't able to find a good new example. So maybe it is as powerful now.