From 45544e0970df4ea4f6db20fd4a5b673ddb763ebb Mon Sep 17 00:00:00 2001 From: Konstantin Baladurin Date: Sat, 28 Apr 2018 15:22:38 +0300 Subject: [Linux/x86] Fix 64 bit shift inconsistencies (#17826) Apply #15443 and #15949 for Linux/x86 --- src/vm/i386/jithelp.S | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/vm/i386') 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) -- cgit v1.2.3