Skip to content

use reserved spelling for inline assembly #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 17, 2018

Conversation

compnerd
Copy link
Member

Use the reserved spelling for asm as it is a non-standard compiler
extension. NFC.

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

CC: @MadCoder @das @parkera

@parkera
Copy link
Contributor

parkera commented Feb 16, 2018

Seems fine to me but @MadCoder and @das should be the ones to approve in this repository.

Copy link
Contributor

@MadCoder MadCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use __asm__ __volatile__ if you're doing this then, because it's weird to only do half.

Use the reserved spelling for `asm` as it is a non-standard compiler
extension.

Rather than trying to enumerate the user label prefix on the various
targets, rely on the compiler.  The GNU compilers define
`__USER_LABEL_PREFIX__` to "_" as appropriate.  In the case that you are
using a non-GNU compiler, it is possible to specify the macro according
to your target.  This simplifies and unifies the code.
@compnerd
Copy link
Member Author

@MadCoder updated to use __asm__ __volatile__ for the non-label cases. I've merged the prefix change as well.

@compnerd
Copy link
Member Author

@swift-ci please test

Use the reserved spelling for `typeof` as it is a non-standard compiler
extension. NFC.
@compnerd
Copy link
Member Author

Actually, let me merge in the reserved spelling for __typeof__ as well. Sorry, I have a number of patches that I've had laying around that I'm trying to get through. These are all intended to help setup everything to revive the Windows port.

@MadCoder
Copy link
Contributor

this is fine :)

@MadCoder
Copy link
Contributor

@swift-ci please test

@compnerd
Copy link
Member Author

@MadCoder anything else for this change or good to merge?

@MadCoder MadCoder merged commit 2d6d1fd into swiftlang:master Feb 17, 2018
@compnerd compnerd deleted the reserved-asm branch February 18, 2018 00:00
ktopley-apple pushed a commit that referenced this pull request Dec 6, 2018
use reserved spelling for inline assembly

Signed-off-by: Daniel A. Steffen <dsteffen@apple.com>
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.

4 participants