Jit: fix long shift helper for overly long shift counts (#15443)
authorAndy Ayers <andya@microsoft.com>
Fri, 8 Dec 2017 23:10:25 +0000 (15:10 -0800)
committerGitHub <noreply@github.com>
Fri, 8 Dec 2017 23:10:25 +0000 (15:10 -0800)
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.

src/vm/i386/jithelp.asm
tests/src/JIT/Regression/JitBlue/GitHub_15291/GitHub_15291.ilproj
tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.il
tests/src/JIT/Regression/JitBlue/GitHub_15319/GitHub_15319_1.ilproj

index 5d64b18..a4bbe1c 100644 (file)
@@ -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
index 3f8f1ce..b6ff20e 100644 (file)
@@ -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>
index 70691e7..06bc06a 100644 (file)
@@ -17,6 +17,7 @@
        ldarg.s      0x0
        clt         
        shl         
+       conv.i4
        ret 
   }
 
index eb60265..a80194b 100644 (file)
@@ -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>