Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Modify context related data structures for Unix AMD64 - #1228

Merged
jkotas merged 2 commits into
dotnet:masterfrom
janvorli:unix-amd64-contexts
May 4, 2016
Merged

jkotas merged 2 commits into
dotnet:masterfrom
janvorli:unix-amd64-contexts

Conversation

@janvorli

@janvorli janvorli commented May 2, 2016

Copy link
Copy Markdown
Member

This change modifies PAL_LIMITED_CONTEXT, StackFrameIterator and also all related code for Unix AMD64 builds so that they correspond to the Unix AMD64 calling convention.

This change modifies PAL_LIMITED_CONTEXT, StackFrameIterator and REGDISPLAY
structs and also all related code accessing registers that are not present
for Unix.
@janvorli

janvorli commented May 2, 2016

Copy link
Copy Markdown
Member Author

@jkotas can you take a look please? This is the first one in a series of changes that will enable exception handling on Unix AMD64.

@jkotas

jkotas commented May 2, 2016

Copy link
Copy Markdown
Member

LGTM @smosier Could you please take a look as well?

Comment thread src/Native/Runtime/EHHelpers.cpp Outdated
pContext->Rip = pPalContext->IP;
pContext->Rsp = pPalContext->Rsp;
pContext->Rbp = pPalContext->Rbp;
#ifndef UNIX_AMD64_ABI

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure I'm a fan of #ifdefing under the AMD64 block -- I think I'd rather see us treat amd64 unix as aseparate 'target cpu' and have the whole block separated per platform, i.e. one for AMD64 && UNIX_AMD64_ABI and one for AMD64 && !UNIX_AMD64_ABI

@janvorli
janvorli force-pushed the unix-amd64-contexts branch 2 times, most recently from ef5388d to 20a88a5 Compare May 3, 2016 11:26
@janvorli

janvorli commented May 3, 2016

Copy link
Copy Markdown
Member Author

@smosier I've addressed your feedback. Can you please take another look?
Regardsing the comment describing the register usage, I've put it to the PAL_LIMITED_CONTEXT.
As for the AsmOffsetsCpu.h, I have made UNIX_AMD64_ABI stuff completely separate instead of the interleaving, but kept it in the same file for now.

@janvorli
janvorli force-pushed the unix-amd64-contexts branch from 20a88a5 to 5e92fef Compare May 3, 2016 13:57
@jkotas

jkotas commented May 4, 2016

Copy link
Copy Markdown
Member

@dotnet-bot test this please

@jkotas
jkotas merged commit 2907f2d into dotnet:master May 4, 2016
@janvorli
janvorli deleted the unix-amd64-contexts branch May 4, 2016 12:45
@janvorli

janvorli commented May 5, 2016

Copy link
Copy Markdown
Member Author

Implements part of #911

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants