Bug 1455016 - [MIPS64] Fix potentially undefined behavior of rotateLeft64. r=bbouvier
☠☠ backed out by 6e69352a940e ☠ ☠
authorDragan Mladjenovic <dragan.mladjenovic@rt-rk.com>
Wed, 18 Apr 2018 09:36:00 -0400
changeset 469263 f93d567284f7365632af954635ccfd438e8f2ed8
parent 469262 f9c00fb269a09a7944eb0be45eafc719f621d129
child 469264 1b5f2913b206dec1926bd8f482ec97d4897bc97e
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1455016
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455016 - [MIPS64] Fix potentially undefined behavior of rotateLeft64. r=bbouvier
js/src/jit/mips64/MacroAssembler-mips64.cpp
--- a/js/src/jit/mips64/MacroAssembler-mips64.cpp
+++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp
@@ -325,17 +325,17 @@ void
 MacroAssemblerMIPS64::ma_dror(Register rd, Register rt, Register shift)
 {
     as_drotrv(rd, rt, shift);
 }
 
 void
 MacroAssemblerMIPS64::ma_drol(Register rd, Register rt, Register shift)
 {
-    ma_negu(ScratchRegister, shift);
+    as_dsubu(ScratchRegister, zero, shift);
     as_drotrv(rd, rt, ScratchRegister);
 }
 
 void
 MacroAssemblerMIPS64::ma_dins(Register rt, Register rs, Imm32 pos, Imm32 size)
 {
     if (pos.value >= 0 && pos.value < 32) {
         if (pos.value + size.value > 32)