-
Notifications
You must be signed in to change notification settings - Fork 265
asm! -> llvm_asm! #306
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
A thing I missed originally (as I'm only using |
The third occurrence of asm, |
This makes sense to me, afaik when they introduced the new asm syntax they just renamed the old macro from |
including all the necessary workarounds See-Also: immunant/c2rust#306 See-Also: immunant/c2rust#307
Current c2rust produces assembler in the style of
asm!("cpsie i" : : : "memory" : "volatile")
, which is the style nowadays used with thellvm_asm
macro since rust-lang/rust#71007 was merged.A short-term solution I'm currently using as a workaround is to replace
" asm!("
with" llvm_asm!("
in the output (hoping nobody puts this into literals); that's the route I'd like to take for a fix in c2rust as well. It has produced working binaries, though I'm not sure it ever passed through the asm code. (But hey, at least it built).(A long-term solution might be using modern asm!, but a) that can wait until stable and b) it's probably better suited for a separate ... casm2rust? project, if it's ever really needed at all).
The text was updated successfully, but these errors were encountered: