Bug 969375 - MIPS port: Fixed bug in ma_or and ma_xor found by Heiher. r=nbp
authorBranislav Rankov <branislav.rankov@imgtec.com>
Fri, 14 Mar 2014 11:27:41 -0700
changeset 173613 8d71d4826df95269ec1fef0075dd396a01298f36
parent 173612 6350391f85508f9d1365791212b09fa60181a472
child 173614 05532668570bf5e1205a54136998bd31963ad321
push id41052
push usernpierron@mozilla.com
push dateFri, 14 Mar 2014 18:28:00 +0000
treeherdermozilla-inbound@6bf817013e40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs969375
milestone30.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 969375 - MIPS port: Fixed bug in ma_or and ma_xor found by Heiher. r=nbp
js/src/jit/mips/MacroAssembler-mips.cpp
--- a/js/src/jit/mips/MacroAssembler-mips.cpp
+++ b/js/src/jit/mips/MacroAssembler-mips.cpp
@@ -403,17 +403,17 @@ void
 MacroAssemblerMIPS::ma_or(Register rd, Imm32 imm)
 {
     ma_or(rd, rd, imm);
 }
 
 void
 MacroAssemblerMIPS::ma_or(Register rd, Register rs, Imm32 imm)
 {
-    if (Imm16::isInSignedRange(imm.value)) {
+    if (Imm16::isInUnsignedRange(imm.value)) {
         as_ori(rd, rs, imm.value);
     } else {
         ma_li(ScratchRegister, imm);
         as_or(rd, rs, ScratchRegister);
     }
 }
 
 // xor
@@ -433,17 +433,17 @@ void
 MacroAssemblerMIPS::ma_xor(Register rd, Imm32 imm)
 {
     ma_xor(rd, rd, imm);
 }
 
 void
 MacroAssemblerMIPS::ma_xor(Register rd, Register rs, Imm32 imm)
 {
-    if (Imm16::isInSignedRange(imm.value)) {
+    if (Imm16::isInUnsignedRange(imm.value)) {
         as_xori(rd, rs, imm.value);
     } else {
         ma_li(ScratchRegister, imm);
         as_xor(rd, rs, ScratchRegister);
     }
 }
 
 // Arithmetic-based ops.