Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/coreclr/inc/corjit.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@
// These are error codes returned by CompileMethod
enum CorJitResult
{
CORJIT_OK = 0,
CORJIT_BADCODE = (JITINTERFACE_HRESULT)0x80000001,
CORJIT_OUTOFMEM = (JITINTERFACE_HRESULT)0x80000002,
CORJIT_INTERNALERROR = (JITINTERFACE_HRESULT)0x80000003,
CORJIT_SKIPPED = (JITINTERFACE_HRESULT)0x80000004,
CORJIT_RECOVERABLEERROR = (JITINTERFACE_HRESULT)0x80000005,
CORJIT_IMPLLIMITATION= (JITINTERFACE_HRESULT)0x80000006,
CORJIT_OK = 0,
CORJIT_BADCODE = (JITINTERFACE_HRESULT)0x80000001,
CORJIT_OUTOFMEM = (JITINTERFACE_HRESULT)0x80000002,
CORJIT_INTERNALERROR = (JITINTERFACE_HRESULT)0x80000003,
CORJIT_SKIPPED = (JITINTERFACE_HRESULT)0x80000004,
CORJIT_RECOVERABLEERROR = (JITINTERFACE_HRESULT)0x80000005,
CORJIT_IMPLLIMITATION = (JITINTERFACE_HRESULT)0x80000006,
CORJIT_R2R_UNSUPPORTED = (JITINTERFACE_HRESULT)0x80000007,
};

/*****************************************************************************/
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

#include <minipal/guid.h>

constexpr GUID JITEEVersionIdentifier = { /* db46fd97-a8e8-4bda-9cec-d7feb061154c */
0xdb46fd97,
0xa8e8,
0x4bda,
{0x9c, 0xec, 0xd7, 0xfe, 0xb0, 0x61, 0x15, 0x4c}
constexpr GUID JITEEVersionIdentifier = { /* d98b5b0d-dd75-4e4d-b950-0d1cafd01dea */
0xd98b5b0d,
0xdd75,
0x4e4d,
{0xb9, 0x50, 0x0d, 0x1c, 0xaf, 0xd0, 0x1d, 0xea}
};

#endif // JIT_EE_VERSIONING_GUID_H
3 changes: 2 additions & 1 deletion src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7706,7 +7706,8 @@ int jitNativeCode(CORINFO_METHOD_HANDLE methodHnd,
result = param.result;

if (!inlineInfo &&
(result == CORJIT_INTERNALERROR || result == CORJIT_RECOVERABLEERROR || result == CORJIT_IMPLLIMITATION) &&
(result == CORJIT_INTERNALERROR || result == CORJIT_RECOVERABLEERROR || result == CORJIT_IMPLLIMITATION ||
result == CORJIT_R2R_UNSUPPORTED) &&
!jitFallbackCompile)
{
// If we failed the JIT, reattempt with debuggable code.
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -8480,7 +8480,7 @@ class Compiler
{
if (mustExpand)
{
implLimitation();
implReadyToRunUnsupported();
}
return true;
}
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/jit/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ void DECLSPEC_NORETURN implLimitation()
fatal(CORJIT_IMPLLIMITATION);
}

/*****************************************************************************/
void DECLSPEC_NORETURN implReadyToRunUnsupported()
{
fatal(CORJIT_R2R_UNSUPPORTED);
}

/*****************************************************************************/
void DECLSPEC_NORETURN NOMEM()
{
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/jit/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ extern void DECLSPEC_NORETURN badCode();
extern void DECLSPEC_NORETURN badCode3(const char* msg, const char* msg2, int arg, _In_z_ const char* file, unsigned line);
extern void DECLSPEC_NORETURN noWay();
extern void DECLSPEC_NORETURN implLimitation();
extern void DECLSPEC_NORETURN implReadyToRunUnsupported();
extern void DECLSPEC_NORETURN NOMEM();
extern void DECLSPEC_NORETURN fatal(int errCode);

Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ private CompilationResult CompileMethodInternal(IMethodNode methodCodeNodeNeedin
{
ThrowHelper.ThrowInvalidProgramException();
}
if (result == CorJitResult.CORJIT_IMPLLIMITATION)
if (result == CorJitResult.CORJIT_IMPLLIMITATION || result == CorJitResult.CORJIT_R2R_UNSUPPORTED)
{
#if READYTORUN
throw new RequiresRuntimeJitException("JIT implementation limitation");
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/tools/Common/JitInterface/CorInfoTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,7 @@ public enum CorJitResult
CORJIT_SKIPPED = unchecked((int)0x80000004),
CORJIT_RECOVERABLEERROR = unchecked((int)0x80000005),
CORJIT_IMPLLIMITATION = unchecked((int)0x80000006),
CORJIT_R2R_UNSUPPORTED = unchecked((int)0x80000007),
};

public enum TypeCompareState
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tools/superpmi/superpmi/jitinstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ ReplayResults JitInstance::CompileMethod(MethodContext* MethodToCompile, int mcI
}
}

if ((jitResult == CORJIT_OK) || (jitResult == CORJIT_BADCODE))
if ((jitResult == CORJIT_OK) || (jitResult == CORJIT_BADCODE) || (jitResult == CORJIT_R2R_UNSUPPORTED))
{
// capture the results of compilation
pParam->pThis->mc->cr->recCompileMethod(&NEntryBlock, &NCodeSizeBlock, jitResult);
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13148,6 +13148,7 @@ void ThrowExceptionForJit(HRESULT res)

case CORJIT_BADCODE:
case CORJIT_IMPLLIMITATION:
case CORJIT_R2R_UNSUPPORTED:
default:
COMPlusThrow(kInvalidProgramException);
break;
Expand Down
Loading