Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Create minimal frame for funclets#9245

Closed
parjong wants to merge 1 commit into
dotnet:masterfrom
parjong:fix/x86_funclet_frame
Closed

[x86/Linux] Create minimal frame for funclets#9245
parjong wants to merge 1 commit into
dotnet:masterfrom
parjong:fix/x86_funclet_frame

Conversation

@parjong
Copy link
Copy Markdown

@parjong parjong commented Feb 1, 2017

This commit makes each funclet to have minimal frame.

@parjong
Copy link
Copy Markdown
Author

parjong commented Feb 1, 2017

\CC @seanshpark @wateret

@parjong
Copy link
Copy Markdown
Author

parjong commented Feb 1, 2017

@dotnet-bot test Windows_NT x64 Release Priority 1 Build and Test please

@parjong
Copy link
Copy Markdown
Author

parjong commented Feb 1, 2017

@dotnet/jit-contrib Please take a look.

@parjong
Copy link
Copy Markdown
Author

parjong commented Feb 1, 2017

@jkotas @BruceForstall Please take a look.

@jkotas
Copy link
Copy Markdown
Member

jkotas commented Feb 1, 2017

Is this needed to make something work, or are you just fixing TODO?

We are not consistent between platforms ... but the preferred funclet convention is that the funclet does not need to save any calllee saved registers; and that the exception handling subsystem restores them before calling the funclet to what they were when the control left the function originally.

@parjong
Copy link
Copy Markdown
Author

parjong commented Feb 1, 2017

I currently have no issue related with callee-saved registers. I just want to fix TODO before starting PSPSym-related fixes.

For that purpose, it seems that EBP should be stored/restored, but I'm not sure about other callee saved registers. I just mimic the corresponding code in AMD64.

@BruceForstall
Copy link
Copy Markdown

It would be useful to have a comment like the one above the amd64 version of CodeGen::genFuncletProlog() that shows the calling convention and stack layout for linux/x86.

You need to determine what the register convention is for the EH subsystem, as @jkotas says. This will affect register liveness into and out of funclets. Currently, we kill all registers, and local vars need to get reloaded from the stack. We use the PSPSym because we can't trust that the frame pointer is re-established to what the parent frame had. If the EH subsystem can guarantee it gets re-established, you wouldn't need that.

@parjong
Copy link
Copy Markdown
Author

parjong commented Feb 2, 2017

@jkotas @BruceForstall Thank you for comments. It would be better to consider this issue when we consider PSPSym-related issues. I'll create another PR when we are ready later.

@parjong parjong closed this Feb 2, 2017
@parjong parjong deleted the fix/x86_funclet_frame branch February 3, 2017 07:24
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants