From: Andy Ayers Date: Fri, 8 Dec 2017 23:10:25 +0000 (-0800) Subject: Jit: fix long shift helper for overly long shift counts (#15443) X-Git-Tag: accepted/tizen/base/20180629.140029~373 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d636649345f1f512be2f617564503a25f655757b;p=platform%2Fupstream%2Fcoreclr.git 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. --- diff --git a/src/vm/i386/jithelp.asm b/src/vm/i386/jithelp.asm index 5d64b18..a4bbe1c 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 3f8f1ce..b6ff20e 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 @@ {95DFC527-4DC1-495E-97D7-E94EE1F7140D} Exe ..\..\ - 1 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 70691e7..06bc06a 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 eb60265..a80194b 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 @@ {95DFC527-4DC1-495E-97D7-E94EE1F7140D} Exe ..\..\ - 1