summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorAaron Robinson <arobins@microsoft.com>2018-11-21 11:21:24 -0800
committerAaron Robinson <arobins@microsoft.com>2018-11-21 11:55:50 -0800
commit0f38161b1323d5fb20289290f0ef8e4d1b7188ce (patch)
tree282d48e08242f17822f0830d7b0b86430a161110 /src/vm
parentfac2d42c8c1546c87317675728e048961004a2ee (diff)
downloadcoreclr-0f38161b1323d5fb20289290f0ef8e4d1b7188ce.tar.gz
coreclr-0f38161b1323d5fb20289290f0ef8e4d1b7188ce.tar.bz2
coreclr-0f38161b1323d5fb20289290f0ef8e4d1b7188ce.zip
Minor clean up in COMToCLRWorker
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/comtoclrcall.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/vm/comtoclrcall.cpp b/src/vm/comtoclrcall.cpp
index d2573262c9..e87723baa3 100644
--- a/src/vm/comtoclrcall.cpp
+++ b/src/vm/comtoclrcall.cpp
@@ -54,7 +54,6 @@ static PCODE g_pGenericComCallStub = NULL;
UINT64 FieldCallWorker(Thread *pThread, ComMethodFrame* pFrame);
void FieldCallWorkerDebuggerWrapper(Thread *pThread, ComMethodFrame* pFrame);
void FieldCallWorkerBody(Thread *pThread, ComMethodFrame* pFrame);
-extern "C" HRESULT STDCALL StubRareDisableHRWorker(Thread *pThread);
#ifndef CROSSGEN_COMPILE
//---------------------------------------------------------
@@ -680,7 +679,7 @@ extern "C" UINT64 __stdcall COMToCLRWorker(Thread *pThread, ComMethodFrame* pFra
HRESULT hr = S_OK;
pThread = GetThread();
- if (NULL == pThread)
+ if (pThread == NULL)
{
pThread = SetupThreadNoThrow();
if (pThread == NULL)
@@ -769,7 +768,7 @@ extern "C" UINT64 __stdcall COMToCLRWorker(Thread *pThread, ComMethodFrame* pFra
LOG((LF_STUBS, LL_INFO1000000, "COMToCLRWorker leave\n"));
- // The call was successfull. If the native return type is a floating point
+ // The call was successful. If the native return type is a floating point
// value, then we need to set the floating point registers appropriately.
if (pCMD->IsNativeFloatingPointRetVal()) // single check skips both cases
{
@@ -782,7 +781,7 @@ extern "C" UINT64 __stdcall COMToCLRWorker(Thread *pThread, ComMethodFrame* pFra
#ifndef _TARGET_X86_
ErrorExit:
- if (pThread != nullptr && pThread->PreemptiveGCDisabled())
+ if (pThread != NULL && pThread->PreemptiveGCDisabled())
pThread->EnablePreemptiveGC();
// The call failed so we need to report an error to the caller.
@@ -792,13 +791,22 @@ ErrorExit:
retVal = hr;
}
else if (pCMD->IsNativeBoolRetVal())
- retVal = 0;
+ {
+ retVal = FALSE;
+ }
else if (pCMD->IsNativeR4RetVal())
+ {
setFPReturn(4, CLR_NAN_32);
+ }
else if (pCMD->IsNativeR8RetVal())
+ {
setFPReturn(8, CLR_NAN_64);
+ }
else
+ {
_ASSERTE(pCMD->IsNativeVoidRetVal());
+ }
+
return retVal;
#endif // _TARGET_X86_
}