diff options
author | Andy Ayers <andya@microsoft.com> | 2017-12-08 15:10:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 15:10:25 -0800 |
commit | d636649345f1f512be2f617564503a25f655757b (patch) | |
tree | f5f725a690d11c15f5ea7d10f3b3a9500bbff8aa | |
parent | ddab65b2643ec2c3b7a376f4f44a05073124b732 (diff) | |
download | coreclr-d636649345f1f512be2f617564503a25f655757b.tar.gz coreclr-d636649345f1f512be2f617564503a25f655757b.tar.bz2 coreclr-d636649345f1f512be2f617564503a25f655757b.zip |
Jit: fix long shift helper for overly long shift counts (#15443)
Reduce shift amount modulo 64 to match behavior on other platforms and the
jit optimizer.
Also, fix IL in related test case so it is valid for 32 bits too.
Also, make these two tests pri-0 so they get run with regular CI testing.
Fixes #15442.
4 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/i386/jithelp.asm b/src/vm/i386/jithelp.asm index 5d64b18c94..a4bbe1ccf7 100644 --- a/src/vm/i386/jithelp.asm +++ b/src/vm/i386/jithelp.asm @@ -483,6 +483,8 @@ ret ALIGN 16 PUBLIC JIT_LLsh JIT_LLsh PROC +; Reduce shift amount mod 64 + and ecx, 63 ; Handle shifts of between bits 0 and 31 cmp ecx, 32 jae short LLshMORE32 diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291.ilproj b/tests/src/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291.ilproj index 3f8f1cef85..b6ff20e7cf 100644 --- a/tests/src/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291.ilproj +++ b/tests/src/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291.ilproj @@ -8,7 +8,6 @@ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> <OutputType>Exe</OutputType> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> - <CLRTestPriority>1</CLRTestPriority> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup> diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.il b/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.il index 70691e717c..06bc06a6bf 100644 --- a/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.il +++ b/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.il @@ -17,6 +17,7 @@ ldarg.s 0x0 clt shl + conv.i4 ret } diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.ilproj b/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.ilproj index eb602658ad..a80194b1bc 100644 --- a/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.ilproj +++ b/tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.ilproj @@ -8,7 +8,6 @@ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> <OutputType>Exe</OutputType> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> - <CLRTestPriority>1</CLRTestPriority> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "></PropertyGroup> |