Skip to content

rustc: add --asm-syntax flag#17835

Closed
richo wants to merge 1 commit into
rust-lang:masterfrom
richo:intel-syntax
Closed

rustc: add --asm-syntax flag#17835
richo wants to merge 1 commit into
rust-lang:masterfrom
richo:intel-syntax

Conversation

@richo

@richo richo commented Oct 7, 2014

Copy link
Copy Markdown
Contributor

This allows the user to specify which asm syntax is desired for
--emit=asm

I also considered an environment variable to let it lurk under the covers a bit more but this seemed most optimal for a generic interface.

I asked on irc and didn't hear anything back so I figured I'd just go ahead and do it and amend if necessary. I was torn between a toplevel option and lurking it in behind -Z or similar.

I have some concerns that would hold this back from being merged:

  • What does this do on arches that can't intel? (my intuition is that llc will barf horribly but I have no idea how rustc will deal with that) Haven't tested on arm (rustc builds are /very/ expensive), but unless anyone objects I don't think this should block.
  • Is the toplevel option ok?
  • Do I need to add tests for this? It seems like it should have them, but I couldn't find any preexisting. If not I will fumble through them.

@rust-highfive

Copy link
Copy Markdown
Contributor

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

This allows the user to specify which asm syntax is desired for
--emit=asm
@richo

richo commented Oct 9, 2014

Copy link
Copy Markdown
Contributor Author

Any feedback on this? It'd be nice to have it in mainline to avoid having to fiddle so much at my end.

@thestinger

Copy link
Copy Markdown
Contributor

-C llvm-args=-x86-asm-syntax=intel does allow doing this already. It might make sense to add a way to do it directly via a rustc switch to make it easier and more discoverable but it's not required for the functionality.

@richo

richo commented Oct 9, 2014

Copy link
Copy Markdown
Contributor Author

Oh wow, that is lifechanging.

I'll find somewhere appropriate to put that in the docs. Thanks!

@richo richo closed this Oct 9, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Sep 25, 2024
…icola

fix: Immutable tree panic in `generate_delegate_trait`

fixes rust-lang#17835
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants