Bug 1367629 - IonMonkey: MIPS: Fix sync instruction encoding for Loongson. r=h4writer
authorHeiher <r@hev.cc>
Wed, 31 May 2017 13:21:31 +0800
changeset 409631 e011d885b00b28124c89ce74fca5924e0aafbf57
parent 409630 8429360d3050f174202a1a8133489b6f7291348f
child 409632 4c2698925268c7cc51ac8aa83a38115c8ad06164
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1367629
milestone55.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 1367629 - IonMonkey: MIPS: Fix sync instruction encoding for Loongson. r=h4writer --- js/src/jit/mips-shared/Assembler-mips-shared.cpp | 2 ++ 1 file changed, 2 insertions(+)
js/src/jit/mips-shared/Assembler-mips-shared.cpp
--- a/js/src/jit/mips-shared/Assembler-mips-shared.cpp
+++ b/js/src/jit/mips-shared/Assembler-mips-shared.cpp
@@ -1615,16 +1615,18 @@ AssemblerMIPSShared::as_break(uint32_t c
     MOZ_ASSERT(code <= MAX_BREAK_CODE);
     writeInst(op_special | code << FunctionBits | ff_break);
 }
 
 void
 AssemblerMIPSShared::as_sync(uint32_t stype)
 {
     MOZ_ASSERT(stype <= 31);
+    if (isLoongson())
+        stype = 0;
     writeInst(InstReg(op_special, zero, zero, zero, stype, ff_sync).encode());
 }
 
 // This just stomps over memory with 32 bits of raw data. Its purpose is to
 // overwrite the call of JITed code with 32 bits worth of an offset. This will
 // is only meant to function on code that has been invalidated, so it should
 // be totally safe. Since that instruction will never be executed again, a
 // ICache flush should not be necessary