diff options
author | Tanner Gooding <tagoo@outlook.com> | 2018-11-05 15:37:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 15:37:14 -0800 |
commit | d3a7c973723bf2610c7dcdcd00318c06a72a36f8 (patch) | |
tree | f38f09f96a6078f4bbd812e5c0029af42cc792f0 /src/jit | |
parent | 0eb2dbbc3cd45b2a118aa44ac05bac9b8ca1eec4 (diff) | |
download | coreclr-d3a7c973723bf2610c7dcdcd00318c06a72a36f8.tar.gz coreclr-d3a7c973723bf2610c7dcdcd00318c06a72a36f8.tar.bz2 coreclr-d3a7c973723bf2610c7dcdcd00318c06a72a36f8.zip |
Updating the importer to throw a NotImplementedException if it finds a mustExpand intrinsic that it can't expand (#20792)
* Updating the importer to throw a NotImplementedException if it finds a mustExpand hwintrinsic that it can't expand
* Updating the JITEEVersionIdentifier
Diffstat (limited to 'src/jit')
-rw-r--r-- | src/jit/importer.cpp | 16 | ||||
-rw-r--r-- | src/jit/utils.cpp | 1 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 1037c9d7db..94b78cee9e 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -3386,7 +3386,14 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, #ifdef FEATURE_HW_INTRINSICS if (ni > NI_HW_INTRINSIC_START && ni < NI_HW_INTRINSIC_END) { - return impHWIntrinsic(ni, method, sig, mustExpand); + GenTree* hwintrinsic = impHWIntrinsic(ni, method, sig, mustExpand); + + if (mustExpand && (hwintrinsic == nullptr)) + { + return impUnsupportedHWIntrinsic(CORINFO_HELP_THROW_NOT_IMPLEMENTED, method, sig, mustExpand); + } + + return hwintrinsic; } #endif // FEATURE_HW_INTRINSICS } @@ -3932,12 +3939,9 @@ GenTree* Compiler::impIntrinsic(GenTree* newobjThis, } } - if (mustExpand) + if (mustExpand && (retNode == nullptr)) { - if (retNode == nullptr) - { - NO_WAY("JIT must expand the intrinsic!"); - } + NO_WAY("JIT must expand the intrinsic!"); } // Optionally report if this intrinsic is special diff --git a/src/jit/utils.cpp b/src/jit/utils.cpp index b73f79f447..13a02dd2a3 100644 --- a/src/jit/utils.cpp +++ b/src/jit/utils.cpp @@ -1416,6 +1416,7 @@ void HelperCallProperties::init() case CORINFO_HELP_RETHROW: case CORINFO_HELP_THROW_ARGUMENTEXCEPTION: case CORINFO_HELP_THROW_ARGUMENTOUTOFRANGEEXCEPTION: + case CORINFO_HELP_THROW_NOT_IMPLEMENTED: case CORINFO_HELP_THROW_PLATFORM_NOT_SUPPORTED: case CORINFO_HELP_THROW_TYPE_NOT_SUPPORTED: |