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

CallDescr/TransitionBlock changes for ARM64 calling convention #19344

Merged

Conversation

adityamandaleeka
Copy link
Member

This change moves the padding field in the TransitionBlock before the argument registers so that the stack arguments directly follow the register arguments in the layout of the block.

In addition, the Windows ARM64 varargs calling convention allows an argument to be split such that part of it is in x7 and part of it is on the stack, so the return buffer register has also been separated from the rest of the argument registers.

The rest of the changes are fallout from those two (updating various asm stubs, offsets, etc.).

@adityamandaleeka
Copy link
Member Author

@davidwrighton @jashook PTAL. I'll check on the CI results once they're complete.

@@ -562,7 +562,7 @@ LEAF_END SinglecastDelegateInvokeStub, _TEXT
#ifdef FEATURE_COMINTEROP

#define ComCallPreStub_FrameSize (SIZEOF__GSCookie + SIZEOF__ComMethodFrame)
#define ComCallPreStub_FirstStackAdjust (SIZEOF__ArgumentRegisters + 2 * 8) // reg args , fp & lr already pushed
#define ComCallPreStub_FirstStackAdjust (8 + SIZEOF__ArgumentRegisters + 2 * 8) // x8, reg args , fp & lr already pushed
Copy link
Member

Choose a reason for hiding this comment

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

You might want to consider changing this to (8 + SIZEOF__ArgumentRegisters + (2 * 8)) in case someone gets clever and decides to "optimize" and converts it to (SIZEOF__ArgumentRegisters + 10 * 8) 😞

@adityamandaleeka adityamandaleeka force-pushed the aa64_vm_callconv_changes branch from a2de591 to c891df0 Compare August 9, 2018 23:23
Copy link
Member

@davidwrighton davidwrighton left a comment

Choose a reason for hiding this comment

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

LGTM

@adityamandaleeka
Copy link
Member Author

Looks like Jenkins weather affected a few CI legs.

@dotnet-bot test Windows_NT x64 Debug CoreFX Tests
@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test

@adityamandaleeka
Copy link
Member Author

Merging this. The CI failures are unrelated.

@adityamandaleeka adityamandaleeka merged commit 30f0be9 into dotnet:master Aug 10, 2018
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