diff options
author | Brian Sullivan <briansul@microsoft.com> | 2016-06-21 11:45:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-21 11:45:15 -0700 |
commit | fb79613c44df5ad80831dba1460ffb14dd6497a3 (patch) | |
tree | 7e21a7f77b367b2ace94d8b7078f24c7726aea3b | |
parent | 0d462da2173627b454dbe74f33828e0698cd963b (diff) | |
parent | 3ddcd852cd36b350bcbb97ff0b6667e318e41e58 (diff) | |
download | coreclr-fb79613c44df5ad80831dba1460ffb14dd6497a3.tar.gz coreclr-fb79613c44df5ad80831dba1460ffb14dd6497a3.tar.bz2 coreclr-fb79613c44df5ad80831dba1460ffb14dd6497a3.zip |
Merge pull request #5895 from briansull/UnboxingStub-Fix
Fix for generic unboxing stub with x8 return buffer argument
-rw-r--r-- | src/jit/importer.cpp | 17 | ||||
-rw-r--r-- | src/jit/morph.cpp | 37 |
2 files changed, 35 insertions, 19 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 9eefa5fbe4..f2f8388df2 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -5989,7 +5989,14 @@ var_types Compiler::impImportCall(OPCODE opcode, // assume the worst-case. mflags = (calliSig.callConv & CORINFO_CALLCONV_HASTHIS) ? 0 : CORINFO_FLG_STATIC; - +#ifdef DEBUG + if (verbose) + { + unsigned structSize = (callRetTyp == TYP_STRUCT) ? info.compCompHnd->getClassSize(calliSig.retTypeSigClass) : 0; + printf("\nIn Compiler::impImportCall: opcode is %s, kind=%d, callRetType is %s, structSize is %d\n", + opcodeNames[opcode], callInfo->kind, varTypeName(callRetTyp), structSize); + } +#endif //This should be checked in impImportBlockCode. assert(!compIsForInlining() || !(impInlineInfo->inlineCandidateInfo->dwRestrictions & INLINE_RESPECT_BOUNDARY)); @@ -6021,6 +6028,14 @@ var_types Compiler::impImportCall(OPCODE opcode, mflags = callInfo->methodFlags; +#ifdef DEBUG + if (verbose) + { + unsigned structSize = (callRetTyp == TYP_STRUCT) ? info.compCompHnd->getClassSize(sig->retTypeSigClass) : 0; + printf("\nIn Compiler::impImportCall: opcode is %s, kind=%d, callRetType is %s, structSize is %d\n", + opcodeNames[opcode], callInfo->kind, varTypeName(callRetTyp), structSize); + } +#endif if (compIsForInlining()) { /* Does this call site have security boundary restrictions? */ diff --git a/src/jit/morph.cpp b/src/jit/morph.cpp index 98b3a4396d..a80640c769 100644 --- a/src/jit/morph.cpp +++ b/src/jit/morph.cpp @@ -3683,24 +3683,6 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode) assert(size == 1); #endif #endif - // If 'expectRetBuffArg' is true then the next argument is the RetBufArg - // and we may need to change nextRegNum to the theFixedRetBuffReg - // - if (expectRetBuffArg) - { - assert(passUsingFloatRegs == false); - - if (hasFixedRetBuffReg()) - { - // Change the register used to pass the next argument to the fixed return buffer register - nextRegNum = theFixedRetBuffReg(); - // Note that later in this method we don't increment intArgRegNum when we - // have setup nextRegRun to be the fixed retrurn buffer register - } - - // We no longer are expecting the RetBufArg - expectRetBuffArg = false; - } #ifndef LEGACY_BACKEND // If there are nonstandard args (outside the calling convention) they were inserted above @@ -3735,6 +3717,25 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* callNode) continue; #endif // !LEGACY_BACKEND + // If 'expectRetBuffArg' is true then the next argument is the RetBufArg + // and we may need to change nextRegNum to the theFixedRetBuffReg + // + if (expectRetBuffArg) + { + assert(passUsingFloatRegs == false); + + if (hasFixedRetBuffReg()) + { + // Change the register used to pass the next argument to the fixed return buffer register + nextRegNum = theFixedRetBuffReg(); + // Note that later in this method we don't increment intArgRegNum when we + // have setup nextRegRun to be the fixed retrurn buffer register + } + + // We no longer are expecting the RetBufArg + expectRetBuffArg = false; + } + if (!lateArgsComputed) { // This is a register argument - put it in the table |