diff options
author | Brian Sullivan <briansul@microsoft.com> | 2016-06-20 18:29:11 -0700 |
---|---|---|
committer | Brian Sullivan <briansul@microsoft.com> | 2016-06-20 19:09:11 -0700 |
commit | 3ddcd852cd36b350bcbb97ff0b6667e318e41e58 (patch) | |
tree | cdd9169ceb96514699a6180f6c14e2190e1f430d | |
parent | 370e4143dfec911790c0e06a15156ddf5c91f310 (diff) | |
download | coreclr-3ddcd852cd36b350bcbb97ff0b6667e318e41e58.tar.gz coreclr-3ddcd852cd36b350bcbb97ff0b6667e318e41e58.tar.bz2 coreclr-3ddcd852cd36b350bcbb97ff0b6667e318e41e58.zip |
Fix for generic unboxing stub with x8 return buffer argument
When we have nonstandard args we have to handle them before
we setup to expect the return buffer arg.
Added additional JitDump information about the call and its return type in impImportCall.
All of the ARM64 EXPECTED_PASS tests will now pass when hasFixedRerBufReg is enabled.
Additional changes are needed for the IL_STUB_PInvoke to get the Interop tests to pass
But these tests are currentlt alreay in the EXPECTED_FAIL catagory.
-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 |