summaryrefslogtreecommitdiff
path: root/src/vm/i386
diff options
context:
space:
mode:
authorKonstantin Baladurin <k.baladurin@partner.samsung.com>2018-04-28 15:22:38 +0300
committerJan Kotas <jkotas@microsoft.com>2018-04-28 05:22:38 -0700
commit45544e0970df4ea4f6db20fd4a5b673ddb763ebb (patch)
tree59ef45a3fcbe76ea869363f790ffcb9fe88f9365 /src/vm/i386
parent1cd7d40d7bfaf1b6778eb2b982c1bd91d98961c6 (diff)
downloadcoreclr-45544e0970df4ea4f6db20fd4a5b673ddb763ebb.tar.gz
coreclr-45544e0970df4ea4f6db20fd4a5b673ddb763ebb.tar.bz2
coreclr-45544e0970df4ea4f6db20fd4a5b673ddb763ebb.zip
[Linux/x86] Fix 64 bit shift inconsistencies (#17826)
Apply #15443 and #15949 for Linux/x86
Diffstat (limited to 'src/vm/i386')
-rw-r--r--src/vm/i386/jithelp.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vm/i386/jithelp.S b/src/vm/i386/jithelp.S
index dd3f8042c5..f74039e927 100644
--- a/src/vm/i386/jithelp.S
+++ b/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)