Stream: project-inline-asm

Topic: Outstanding issues?


Josh Triplett (May 16 2020 at 18:38, on Zulip):

@Amanieu Are you aware of any outstanding unaddressed issues in the RFC? Either things that need adding to the text, or alternatives/concerns/etc that haven't been documented in the appropriate alternatives/etc sections?

Josh Triplett (May 16 2020 at 18:38, on Zulip):

Or have all open discussions on the RFC been addressed to the best of your knowledge?

Josh Triplett (May 16 2020 at 18:38, on Zulip):

I'm asking because I'm thinking of proposing FCP soon.

Amanieu (May 16 2020 at 18:38, on Zulip):

Not that I know of. I've tried to add every objection to the RFC text.

Josh Triplett (May 16 2020 at 18:38, on Zulip):

I've seen, and I really appreciate your thoroughness.

Amanieu (May 16 2020 at 18:39, on Zulip):

The only one that's still unresolved is whether we want to namespace the asm! macro

Josh Triplett (May 16 2020 at 18:39, on Zulip):

I'm fine leaving that one an unresolved question for now. I personally would find it quite inconvenient if we did, to the point that I suspect there will quickly arise a standard crate re-exporting it as a common name.

Josh Triplett (May 16 2020 at 18:41, on Zulip):

We could even do that ourselves in the standard library: provide std::arch::x86_64::asm! and std::arch::x86::asm! and similar, but re-export the one for the current target architecture under a common name.

Amanieu (May 16 2020 at 18:41, on Zulip):

That would defeat the point

Josh Triplett (May 16 2020 at 18:42, on Zulip):

Not necessarily. I could see value in being able to unambiguously reference one of the architecture-specific macros, perhaps.

Josh Triplett (May 16 2020 at 18:43, on Zulip):

But in any case, if the standard library doesn't provide it under a common name, a crate will. Nobody wants to write a giant tower of #[cfg(...)] use std::arch::...::asm; at the top of their code.

Josh Triplett (May 16 2020 at 18:45, on Zulip):

Nonetheless, this isn't a question that needs resolving in the RFC. For now, your implementation provides it under a single name, and we can experiment with that in nightly, and if someone has a compelling argument for namespacing it they can make that argument based on real-world experience with nightly.

Amanieu (May 16 2020 at 18:46, on Zulip):

Fair enough

Josh Triplett (May 16 2020 at 18:48, on Zulip):

Also, same question for the PR: as far as you know, is the implementation of the new asm! completely done in terms of the specified behavior from the RFC, or are there any outstanding issues you still want to address?

Josh Triplett (May 16 2020 at 18:49, on Zulip):

(speaking of which, I'll start a new topic for the LLVM version/feature detection issue.)

Amanieu (May 16 2020 at 18:50, on Zulip):

All of the RFC is implemented, except the fallback to an external assembler for cranelift.

Josh Triplett (May 16 2020 at 18:52, on Zulip):

It seems reasonable to do that in a separate PR.

Josh Triplett (May 16 2020 at 18:53, on Zulip):

(Is the cranelift backend fully buildable from rust-lang/rust at this point, or does it still require an external tree?)

Amanieu (May 16 2020 at 18:54, on Zulip):

It's still external at this point.

Josh Triplett (May 16 2020 at 18:55, on Zulip):

Then in that case, that change definitely belongs in a follow-up PR.

bjorn3 (May 16 2020 at 18:56, on Zulip):

I got a WIP branch that integrates it into the rust build system. I am mostly waiting for how git subtree will work out before submitting a PR.

XAMPPRocky (May 17 2020 at 05:01, on Zulip):

@bjorn3 On that note you might want follow up about that, I remember the Clippy team recently ran into issues with using git subtree but I don’t remember the outcome

bjorn3 (May 17 2020 at 09:28, on Zulip):

@XAMPPRocky I have seen the discussion. I can't remember the outcome either though.

XAMPPRocky (May 17 2020 at 09:29, on Zulip):

cc @oli

oli (May 18 2020 at 16:57, on Zulip):

we're waiting on upstream git to merge the subtree patch. It has been finished according to the author and submitted: https://github.com/gitgitgadget/git/pull/493#issuecomment-626484834

Josh Triplett (May 18 2020 at 17:27, on Zulip):

@Amanieu Thank you for getting the dialect preservation patch into upstream LLVM!

Last update: Jun 05 2020 at 22:35UTC