diff options
author | Lubomir Litchev <llitchev@live.com> | 2015-02-19 11:42:30 -0800 |
---|---|---|
committer | Lubomir Litchev <lubol@microsoft.com> | 2015-10-20 14:20:36 -0700 |
commit | 378e304f9e22b3c4d03c3b1b62c47b0aa58ceaf5 (patch) | |
tree | b83aec8f77caeb9ca94c6d7505a548b93cdb7259 /src/vm/siginfo.hpp | |
parent | 3015ff7afb4936a1c5c5856daa4e3482e6b390a9 (diff) | |
download | coreclr-378e304f9e22b3c4d03c3b1b62c47b0aa58ceaf5.tar.gz coreclr-378e304f9e22b3c4d03c3b1b62c47b0aa58ceaf5.tar.bz2 coreclr-378e304f9e22b3c4d03c3b1b62c47b0aa58ceaf5.zip |
Implementation of System V ABI struct passing.
This PR adds support for System V x86_64 ABI classification and calling
convention to the VM and the Jit, including, but not limited to Ubuntu
Linux and Mac OS X.
The general rules outlined in the System V x86_64 ABI (described at
http://www.x86-64.org/documentation/abi.pdf) are followed with a few
little exceptions, described below:
1. The hidden argument for by-value passed structs is always after
the ÎéÎíthisÎéÎí parameter (if there is one.). This is a difference with
the Sysetem V ABI and affects only the internal jit calling conventions.
For PInvoke calls the hidden argument is always the first parameter since
there is no ÎéÎíthisÎéÎí parameter in this case.
2. Managed structs that have no fields are always passed by-value on
the stack.
3. The jit proactively generates frame register frames (with RBP as a
frame register) in order to aid the native OS tooling for stack unwinding
and the like.
Diffstat (limited to 'src/vm/siginfo.hpp')
-rw-r--r-- | src/vm/siginfo.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/siginfo.hpp b/src/vm/siginfo.hpp index 06d3b66a24..586802b1b1 100644 --- a/src/vm/siginfo.hpp +++ b/src/vm/siginfo.hpp @@ -50,6 +50,7 @@ unsigned GetSizeForCorElementType(CorElementType etyp); const ElementTypeInfo* GetElementTypeInfo(CorElementType etyp); class SigBuilder; +class ArgDestination; typedef const struct HardCodedMetaSig *LPHARDCODEDMETASIG; @@ -841,7 +842,7 @@ class MetaSig // Perform type-specific GC promotion on the value (based upon the // last type retrieved by NextArg()). //------------------------------------------------------------------ - VOID GcScanRoots(PTR_VOID pValue, promote_func *fn, + VOID GcScanRoots(ArgDestination *pValue, promote_func *fn, ScanContext* sc, promote_carefully_func *fnc = NULL); //------------------------------------------------------------------ @@ -888,7 +889,7 @@ class MetaSig BOOL IsReturnTypeVoid() const; - enum RETURNTYPE {RETOBJ, RETBYREF, RETNONOBJ}; + enum RETURNTYPE {RETOBJ, RETBYREF, RETNONOBJ, RETVALUETYPE}; CorElementType GetReturnTypeNormalized(TypeHandle * pthValueType = NULL) const; |