Bug 1549667 - [mips] Fix unaligned load with sign/zero extend.
☠☠ backed out by d4a9de6a57b7 ☠ ☠
authorYu Yin <yuyin-hf@loongson.cn>
Fri, 10 May 2019 09:43:52 +0300
changeset 473352 b0a2912f83a9bc268e8f1f0185608d1ccee22b55
parent 473351 acf19aefc4d23947c202b2eaf445b7ef332d7777
child 473353 47d40e2693bd341147547867b9458a603a7e9bd7
push id35996
push userdvarga@mozilla.com
push dateFri, 10 May 2019 21:46:48 +0000
treeherdermozilla-central@362df4629f8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1549667
milestone68.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 1549667 - [mips] Fix unaligned load with sign/zero extend. Reviewers: jandem, lth Reviewed By: lth Subscribers: jandem Bug #: 1549667 Differential Revision: https://phabricator.services.mozilla.com/D30337
js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
@@ -491,29 +491,29 @@ void MacroAssemblerMIPSShared::ma_load_u
     base = ScratchRegister;
     lowOffset = Imm16(0).encode();
     hiOffset = Imm16(size / 8 - 1).encode();
   }
 
   BufferOffset load;
   switch (size) {
     case SizeHalfWord:
-      if (extension != ZeroExtend) {
+      if (extension == ZeroExtend) {
         load = as_lbu(temp, base, hiOffset);
       } else {
         load = as_lb(temp, base, hiOffset);
       }
       as_lbu(dest, base, lowOffset);
       ma_ins(dest, temp, 8, 24);
       break;
     case SizeWord:
       load = as_lwl(dest, base, hiOffset);
       as_lwr(dest, base, lowOffset);
 #ifdef JS_CODEGEN_MIPS64
-      if (extension != ZeroExtend) {
+      if (extension == ZeroExtend) {
         as_dext(dest, dest, 0, 32);
       }
 #endif
       break;
 #ifdef JS_CODEGEN_MIPS64
     case SizeDouble:
       load = as_ldl(dest, base, hiOffset);
       as_ldr(dest, base, lowOffset);