From: Konstantin Baladurin Date: Sat, 28 Apr 2018 12:22:38 +0000 (+0300) Subject: [Linux/x86] Fix 64 bit shift inconsistencies (dotnet/coreclr#17826) X-Git-Tag: submit/tizen/20210909.063632~11030^2~4923 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23b742e122445fbabc0a623098226d03a380010f;p=platform%2Fupstream%2Fdotnet%2Fruntime.git [Linux/x86] Fix 64 bit shift inconsistencies (dotnet/coreclr#17826) Apply dotnet/coreclr#15443 and dotnet/coreclr#15949 for Linux/x86 Commit migrated from https://github.com/dotnet/coreclr/commit/45544e0970df4ea4f6db20fd4a5b673ddb763ebb --- diff --git a/src/coreclr/src/vm/i386/jithelp.S b/src/coreclr/src/vm/i386/jithelp.S index dd3f804..f74039e 100644 --- a/src/coreclr/src/vm/i386/jithelp.S +++ b/src/coreclr/src/vm/i386/jithelp.S @@ -441,6 +441,9 @@ LEAF_END JIT_PollGC_Nop, _TEXT // .align 16 LEAF_ENTRY JIT_LLsh, _TEXT + // Reduce shift amount mod 64 + and ecx, 63 + cmp ecx, 32 jae LOCAL_LABEL(LLshMORE32) @@ -476,6 +479,9 @@ LEAF_END JIT_LLsh, _TEXT // .align 16 LEAF_ENTRY JIT_LRsh, _TEXT + // Reduce shift amount mod 64 + and ecx, 63 + cmp ecx, 32 jae LOCAL_LABEL(LRshMORE32) @@ -510,6 +516,9 @@ LEAF_END JIT_LRsh, _TEXT // .align 16 LEAF_ENTRY JIT_LRsz, _TEXT + // Reduce shift amount mod 64 + and ecx, 63 + cmp ecx, 32 jae LOCAL_LABEL(LRszMORE32)