diff options
author | Jonghyun Park <parjong@gmail.com> | 2016-11-04 11:43:24 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-11-03 19:43:24 -0700 |
commit | 4822563366cec72e3e269e56a14a15bb238ba8b2 (patch) | |
tree | 5523e36c41a70e917704bbfc0eba6cb3daeb20c6 /src/vm/callingconvention.h | |
parent | cd33bb684837bf351875d64af27cc270675eae98 (diff) | |
download | coreclr-4822563366cec72e3e269e56a14a15bb238ba8b2.tar.gz coreclr-4822563366cec72e3e269e56a14a15bb238ba8b2.tar.bz2 coreclr-4822563366cec72e3e269e56a14a15bb238ba8b2.zip |
Do not use FP registers when soft-fp ABI is used (#7869)
Soft FP ABI enforces a return value to be passed via integer registers
even though it is of float/double type (which means that 'r0 ~ r4' should
be preseved even for functions that return a float/double value).
The current implementation of 'ArgIteratorTemplate<ARGITERATOR_BASE>::ComputeReturnFlags()' does
not consider this ABI difference, which makes 'CallDescrWorkerInternal'
function to preserve FP registers instead of 'r0 ~ r4' (and spoils
'r0/r1' during preservation), which leads to #7868.
This commit revises this function in order to fix #7868.
Diffstat (limited to 'src/vm/callingconvention.h')
-rw-r--r-- | src/vm/callingconvention.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vm/callingconvention.h b/src/vm/callingconvention.h index 3ef6be983a..c9a27c2371 100644 --- a/src/vm/callingconvention.h +++ b/src/vm/callingconvention.h @@ -1341,11 +1341,15 @@ void ArgIteratorTemplate<ARGITERATOR_BASE>::ComputeReturnFlags() break; case ELEMENT_TYPE_R4: +#ifndef ARM_SOFTFP flags |= sizeof(float) << RETURN_FP_SIZE_SHIFT; +#endif break; case ELEMENT_TYPE_R8: +#ifndef ARM_SOFTFP flags |= sizeof(double) << RETURN_FP_SIZE_SHIFT; +#endif break; case ELEMENT_TYPE_VALUETYPE: |