rust-lang / rust-lang/reference

Assembly directives are not clear about which ones are target-specific

Open
#1,526 1 comment 0 reactions 1 assignee View on GitHub

@chorman0773 is already working on this.

Since Jul 13, 2024.

A-asm
Dominant language
Rust
Stars
1.6k
Forks
607
PR merge metrics
PR metrics pending

Description

The list of "guaranteed directives" at https://github.com/rust-lang/reference/blob/dad82335e200081ea498b0fb454b9ed3343f8cd5/src/inline-assembly.md#directives-support seems unclear to me which ones are target-specific. In the sections below, there are several target-specific directives. However, looking over the current list of non-specific ones, I see several that are also target-specific.

Some examples:

  • .alt_entry — Seems to be LLVM only (!?), and Mach-O only?
  • .insn — Seems to be i386 and RISC-V, but not ARM
  • .inst — Seems to be ARM-only.
    ...etc.

I think it would be good to carefully review the list, and determine which ones are target-specific. We should also figure out what to do about things that seem to differ between LLVM and GNU.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.