diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2016-07-12 11:16:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-12 11:16:22 -0700 |
commit | 36efe1f7527ed207b25283832b035a0db0fee2c8 (patch) | |
tree | 53935b933cd13e73ae129ea0ce18d30195496e98 /src | |
parent | 429139c4474ec944c271243c595d2b252aea52c7 (diff) | |
parent | 3c2ac22776444e36984046d789cce59b6de23fa8 (diff) | |
download | coreclr-36efe1f7527ed207b25283832b035a0db0fee2c8.tar.gz coreclr-36efe1f7527ed207b25283832b035a0db0fee2c8.tar.bz2 coreclr-36efe1f7527ed207b25283832b035a0db0fee2c8.zip |
Merge pull request #6137 from papaslavik/int_softfp_fix
Fix for #5877: pre-spill just the floating arguments
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/lclvars.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index c8eefb4fcc..af3399bc61 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -565,6 +565,10 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo * varDscInfo) // For ARM, ARM64, and AMD64 varargs, all arguments go in integer registers var_types argType = mangleVarArgsType(varDsc->TypeGet()); var_types origArgType = argType; + // ARM softfp calling convention should affect only the floating point arguments. + // Otherwise there appear too many surplus pre-spills and other memory operations + // with the associated locations . + bool isSoftFPPreSpill = opts.compUseSoftFP && varTypeIsFloating(varDsc->TypeGet()); unsigned argSize = eeGetArgSize(argLst, &info.compMethodInfo->args); unsigned cSlots = argSize / TARGET_POINTER_SIZE; // the total number of slots of this argument bool isHfaArg = false; @@ -599,7 +603,7 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo * varDscInfo) // But we pre-spill user arguments in varargs methods and structs. // unsigned cAlign; - bool preSpill = info.compIsVarArgs || opts.compUseSoftFP; + bool preSpill = info.compIsVarArgs || isSoftFPPreSpill; switch (origArgType) { @@ -929,7 +933,7 @@ void Compiler::lvaInitUserArgs(InitVarDscInfo * varDscInfo) #else // !FEATURE_UNIX_AMD64_STRUCT_PASSING compArgSize += argSize; #endif // !FEATURE_UNIX_AMD64_STRUCT_PASSING - if (info.compIsVarArgs || isHfaArg || opts.compUseSoftFP) + if (info.compIsVarArgs || isHfaArg || isSoftFPPreSpill) { #if defined(_TARGET_X86_) varDsc->lvStkOffs = compArgSize; |