#endif // LEGACY_BACKEND
#ifdef FEATURE_READYTORUN_COMPILER
- node->gtCall.gtEntryPoint.addr = nullptr;
+ node->gtEntryPoint.addr = nullptr;
#endif
#if defined(DEBUG) || defined(INLINE_DATA)
// These get updated after call node is built.
- node->gtCall.gtInlineObservation = InlineObservation::CALLEE_UNUSED_INITIAL;
- node->gtCall.gtRawILOffset = BAD_IL_OFFSET;
+ node->gtInlineObservation = InlineObservation::CALLEE_UNUSED_INITIAL;
+ node->gtRawILOffset = BAD_IL_OFFSET;
#endif
// Spec: Managed Retval sequence points needs to be generated while generating debug info for debuggable code.
// Initialize spill flags of gtOtherRegs
node->ClearOtherRegFlags();
+#if defined(_TARGET_X86_) && !defined(LEGACY_BACKEND)
+ // Initialize the multi-reg long return info if necessary
+ if (varTypeIsLong(node))
+ {
+ // The return type will remain as the incoming long type
+ node->gtReturnType = node->gtType;
+
+ // Initialize Return type descriptor of call node
+ ReturnTypeDesc* retTypeDesc = node->GetReturnTypeDesc();
+ retTypeDesc->InitializeLongReturnType(this);
+
+ // must be a long returned in two registers
+ assert(retTypeDesc->GetReturnRegCount() == 2);
+ }
+#endif // defined(_TARGET_X86_) && !defined(_LEGACY_BACKEND_)
+
return node;
}
{
call = impFixupCallStructReturn(call, sig->retTypeClass);
}
- else if (varTypeIsLong(callRetTyp))
- {
- call = impInitCallLongReturn(call);
- }
if ((call->gtFlags & GTF_CALL_INLINE_CANDIDATE) != 0)
{
return call;
}
-//-------------------------------------------------------------------------------------
-// impInitCallLongReturn:
-// Initialize the ReturnTypDesc for a call that returns a TYP_LONG
-//
-// Arguments:
-// call - GT_CALL GenTree node
-//
-// Return Value:
-// Returns new GenTree node after initializing the ReturnTypeDesc of call node
-//
-GenTreePtr Compiler::impInitCallLongReturn(GenTreePtr call)
-{
- assert(call->gtOper == GT_CALL);
-
-#if defined(_TARGET_X86_) && !defined(LEGACY_BACKEND)
- // LEGACY_BACKEND does not use multi reg returns for calls with long return types
-
- if (varTypeIsLong(call))
- {
- GenTreeCall* callNode = call->AsCall();
-
- // The return type will remain as the incoming long type
- callNode->gtReturnType = call->gtType;
-
- // Initialize Return type descriptor of call node
- ReturnTypeDesc* retTypeDesc = callNode->GetReturnTypeDesc();
- retTypeDesc->InitializeLongReturnType(this);
-
- // must be a long returned in two registers
- assert(retTypeDesc->GetReturnRegCount() == 2);
- }
-#endif // _TARGET_X86_ && !LEGACY_BACKEND
-
- return call;
-}
-
/*****************************************************************************
For struct return values, re-type the operand in the case where the ABI
does not use a struct return buffer