Skip to content

std: Remove misleading comments about segmented stacks #25974

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 1 commit into from
Jun 3, 2015

Conversation

richo
Copy link
Contributor

@richo richo commented Jun 2, 2015

These are implemented in asm, they're just not inlined.

Open questions are:

  • Should I just inline them? They're.. big, but it seems as though this needs violates the #[inline(always)] gaurantees the others make.
  • Does something (llvm?) provide these as intrinsics? The structure of this code suggests that we could be hoisting off something else, instead of flagrantly ignoring it like we do for power and mips.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

The comment here is actually referring to how other architectures implement the functionality via the asm! macro. There's not reason for the architectures here to make a call to an external function other than that it's just tougher to translate them into inline assembly.

Should I just inline them?

Unless there's a big benefit to doing so, I'd avoid it for now. This code is probably on its way out anyway if we can move to stack probes and otherwise it's just somewhat of a maintenance burden.

Does something (llvm?) provide these as intrinsics?

Unfortunately, no :(

@richo
Copy link
Contributor Author

richo commented Jun 2, 2015

So just for my understanding, it's referring to the fact that the implementations are succinct enough to be reasonable to asm! in here?

The way I interpreted it, it's suggesting that they are implemented in rust/c/whatever, which is not the case. If that's the case, I'll rewrite the comment to describe that the impls are pretty big and that they're in src/rt/arch/$arch/record_sp.S ?

@alexcrichton
Copy link
Member

Sure, that rewrite sounds good to me!

@richo
Copy link
Contributor Author

richo commented Jun 2, 2015

I want to have a closer look to make sure that this doesn't actually create a new frame, but I think this rewrite is coherent.

@alexcrichton
Copy link
Member

@bors: r+ 506d5a8 rollup

looks good to me!

Manishearth added a commit to Manishearth/rust that referenced this pull request Jun 3, 2015
These are implemented in asm, they're just not inlined.

Open questions are:
* Should I just inline them? They're.. big, but it seems as though this needs violates the #[inline(always)] gaurantees the others make.
* Does something (llvm?) provide these as intrinsics? The structure of this code suggests that we could be hoisting off something else, instead of flagrantly ignoring it like we do for power and mips.
bors added a commit that referenced this pull request Jun 3, 2015
@bors bors merged commit 506d5a8 into rust-lang:master Jun 3, 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.

4 participants