diff options
author | Jarret Shook <jashoo@microsoft.com> | 2018-06-13 15:44:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-13 15:44:37 -0700 |
commit | c485d3fc4f8645fbfc381396c436711cb2344473 (patch) | |
tree | c0d989f2f5ccce7ce98f3c7c4e4a8322bc56e4e2 /src/jit/compiler.hpp | |
parent | f762f8b0e4a2870162badb58e77b9edceef58d97 (diff) | |
download | coreclr-c485d3fc4f8645fbfc381396c436711cb2344473.tar.gz coreclr-c485d3fc4f8645fbfc381396c436711cb2344473.tar.bz2 coreclr-c485d3fc4f8645fbfc381396c436711cb2344473.zip |
[Windows|Arm64|VarArgs] Correctly pass HFA arguments (#18364)
* Fix passing HFA of two floats to vararg methods
Previously, the type would be reported as HFA and enregistered; however,
this is not correct, as arm64 varargs abi requires passing using
int registers.
* Address linux build issue
* Apply final format patch
* Add _TARGET_WINDOWS_
Diffstat (limited to 'src/jit/compiler.hpp')
-rw-r--r-- | src/jit/compiler.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/jit/compiler.hpp b/src/jit/compiler.hpp index 4e606e6273..f7c7b3d1ac 100644 --- a/src/jit/compiler.hpp +++ b/src/jit/compiler.hpp @@ -690,11 +690,12 @@ inline bool isRegParamType(var_types type) // typeSize - Out param (if non-null) is updated with the size of 'type'. // forReturn - this is true when we asking about a GT_RETURN context; // this is false when we are asking about an argument context +// isVarArg - whether or not this is a vararg fixed arg or variable argument +// - if so on arm64 windows getArgTypeForStruct will ignore HFA +// - types // -inline bool Compiler::VarTypeIsMultiByteAndCanEnreg(var_types type, - CORINFO_CLASS_HANDLE typeClass, - unsigned* typeSize, - bool forReturn) +inline bool Compiler::VarTypeIsMultiByteAndCanEnreg( + var_types type, CORINFO_CLASS_HANDLE typeClass, unsigned* typeSize, bool forReturn, bool isVarArg) { bool result = false; unsigned size = 0; @@ -710,7 +711,7 @@ inline bool Compiler::VarTypeIsMultiByteAndCanEnreg(var_types type, else { structPassingKind howToPassStruct; - type = getArgTypeForStruct(typeClass, &howToPassStruct, size); + type = getArgTypeForStruct(typeClass, &howToPassStruct, isVarArg, size); } if (type != TYP_UNKNOWN) { |