Skip to content
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

Properly support inline asm indirect output operands #29735

Merged
merged 3 commits into from
Dec 14, 2015

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Nov 10, 2015

This PR reverts #29543 and instead implements proper support for "=_m" and "+_m" indirect output operands. This provides a framework on top of which support for plain memory operands ("m", "=m" and "+m") can be implemented.

This also fixes the liveness analysis pass not handling read/write operands correctly.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@nrc
Copy link
Member

nrc commented Nov 10, 2015

r? @pnkfelix (since he reviewed the last one)

@rust-highfive rust-highfive assigned pnkfelix and unassigned nrc Nov 10, 2015
@bors
Copy link
Contributor

bors commented Nov 10, 2015

☔ The latest upstream changes (presumably #29647) made this pull request unmergeable. Please resolve the merge conflicts.

@Amanieu Amanieu force-pushed the asm_indirect_constraint branch from 6894a61 to 34ea3d2 Compare November 10, 2015 10:40
@Amanieu
Copy link
Member Author

Amanieu commented Nov 10, 2015

rebased, should work now

@bors
Copy link
Contributor

bors commented Nov 19, 2015

☔ The latest upstream changes (presumably #29903) made this pull request unmergeable. Please resolve the merge conflicts.

@Amanieu Amanieu force-pushed the asm_indirect_constraint branch 2 times, most recently from a42ecd2 to 48da5b2 Compare November 19, 2015 05:03
@Amanieu
Copy link
Member Author

Amanieu commented Nov 19, 2015

rebased

@frewsxcv
Copy link
Member

@pnkfelix Have any thoughts about this?

@@ -888,7 +888,7 @@ pub enum Ty_ {
pub struct InlineAsm {
pub asm: InternedString,
pub asm_str_style: StrStyle,
pub outputs: Vec<(InternedString, P<Expr>, bool)>,
pub outputs: Vec<(InternedString, P<Expr>, bool, bool)>,
Copy link
Member

Choose a reason for hiding this comment

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

Could we use an enum here instead of two bools?
Or at least a struct instead of a tuple.

@Amanieu Amanieu force-pushed the asm_indirect_constraint branch from 48da5b2 to 65707df Compare December 5, 2015 10:11
@Amanieu
Copy link
Member Author

Amanieu commented Dec 5, 2015

Updated to use a struct instead of a tuple for asm output operands

@pnkfelix
Copy link
Member

pnkfelix commented Dec 5, 2015

Sorry for delay; unfortunately I can't guarantee I'll have time for this until a week from Monday. (I might get to it, but there's a lot of other things on my plate in short term)

@pnkfelix pnkfelix closed this Dec 5, 2015
@pnkfelix pnkfelix reopened this Dec 5, 2015
@pnkfelix
Copy link
Member

pnkfelix commented Dec 5, 2015

(Darn pokey mobile phone interface...)

@pnkfelix
Copy link
Member

Okay, this seems fine, since asm is still unstable (and thus I don't mind landing extensions like this to it, especially since it is arguably a bug fix).

For anyone else reading this PR, the * constraint is specific to LLVM inline asm, AFAICT. See docs here: http://llvm.org/docs/LangRef.html#indirect-inputs-and-outputs

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 14, 2015

📌 Commit 65707df has been approved by pnkfelix

@bors
Copy link
Contributor

bors commented Dec 14, 2015

⌛ Testing commit 65707df with merge 50a02b4...

bors added a commit that referenced this pull request Dec 14, 2015
This PR reverts #29543 and instead implements proper support for "=*m" and "+*m" indirect output operands. This provides a framework on top of which support for plain memory operands ("m", "=m" and "+m") can be implemented.

This also fixes the liveness analysis pass not handling read/write operands correctly.
@bors bors merged commit 65707df into rust-lang:master Dec 14, 2015
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.

7 participants