File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ install_manifest.txt
7777# VIM
7878. * .swo
7979. * .swp
80+ tags
8081
8182# VS Code
8283.vscode /
Original file line number Diff line number Diff line change @@ -98,6 +98,12 @@ IR::Instr *Lowerer::PeepShl(IR::Instr *instrShl)
9898 instrDef->Remove ();
9999
100100 IntConstType oldValue = src2->AsIntConstOpnd ()->GetValue ();
101+
102+ // Left shift operator (<<) on arm32 is implemented by LSL which doesn't discard bits beyond lowerest 5-bit.
103+ // Need to discard such bits to conform to << in JavaScript. This is not a problem for x86 and x64 because
104+ // behavior of SHL is consistent with JavaScript but keep the below line for clarity.
105+ oldValue %= sizeof (int32) * 8 ;
106+
101107 oldValue = ~((1 << oldValue) - 1 );
102108 src2->AsIntConstOpnd ()->SetValue (oldValue);
103109
Original file line number Diff line number Diff line change 1+ 28442624
2+ 28442624
Original file line number Diff line number Diff line change 1+ //-------------------------------------------------------------------------------------------------------
2+ // Copyright (C) Microsoft. All rights reserved.
3+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+ //-------------------------------------------------------------------------------------------------------
5+
6+ function test0 ( ) {
7+ WScript . Echo ( 28510759.1 >> 49 << 49 )
8+ }
9+ test0 ( ) ;
10+ test0 ( ) ;
Original file line number Diff line number Diff line change 367367 <compile-flags >-maxinterpretcount:1 -off:simplejit</compile-flags >
368368 </default >
369369 </test >
370+ <test >
371+ <default >
372+ <files >bug10026875.js</files >
373+ <baseline >bug10026875.baseline</baseline >
374+ <compile-flags >-maxinterpretcount:1 -off:simplejit</compile-flags >
375+ </default >
376+ </test >
370377</regress-exe >
You can’t perform that action at this time.
0 commit comments