Skip to content

Transpile llvm_asm to asm #363

Description

@chrysn

With the stabilization of the new asm language, the old llvm_asm is getting deprecated in Rust, creating the threat of eventual removal.

To build stable Rust code, we should aim to not just copy over the (LLVM / GCC style) assembly from C code, but try to change it to the newer (and stable) assembly language.

(#306 is different from this; that is just about emitting the old assembly with the new llvm_asm names).

I'm aware this is not a trivial request; it may be necessary to look for use cases that sponsor work on this.


Possible alternatives:

  • It may be possible to create extra assembly files for the blocks and then pull them in from the generated Rust code. It may also not.
  • Persuade Rust maintainers to keep llvm permanently deprecated -- discussion in Tracking Issue for LLVM-style inline assembly (llvm_asm) rust-lang/rust#70173 is not clear yet: deprecation happened and removal is announced, without any actual timeline for removal (or even a certainty that it will be removed)
  • Deprecate support for ASM in transpiled C.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions