Bug 1499128 - Use MacroAssembler::branctTestPtr with NonZero instead of NotEqual condition in WasmBaselineCompile; r=nbp
authorDragan Mladjenovic <dragan.mladjenovic>
Mon, 15 Oct 2018 19:15:52 +0200
changeset 499962 2a75c991871634b64f4dbf179130be4d279f521d
parent 499961 26d29ab41cdf753774f2d7ccdc0a7b460a5528cc
child 499963 458bf1864db00b40822ad8954b6f9c7d1c5429db
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1499128
milestone64.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 1499128 - Use MacroAssembler::branctTestPtr with NonZero instead of NotEqual condition in WasmBaselineCompile; r=nbp
js/src/wasm/WasmBaselineCompile.cpp
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -9774,17 +9774,17 @@ BaseCompiler::emitStructNew()
     const StructType& structType = env_.types[typeIndex].structType();
 
     pushI32(structType.moduleIndex_);
     emitInstanceCall(lineOrBytecode, SigPI_, ExprType::AnyRef, SymbolicAddress::StructNew);
 
     // Null pointer check.
 
     Label ok;
-    masm.branchTestPtr(Assembler::NotEqual, ReturnReg, ReturnReg, &ok);
+    masm.branchTestPtr(Assembler::NonZero, ReturnReg, ReturnReg, &ok);
     trap(Trap::ThrowReported);
     masm.bind(&ok);
 
     // As many arguments as there are fields.
 
     MOZ_ASSERT(args.length() == structType.fields_.length());
 
     // Optimization opportunity: Iterate backward to pop arguments off the
@@ -9903,17 +9903,17 @@ BaseCompiler::emitStructGet()
         return true;
     }
 
     const StructType& structType = env_.types[typeIndex].structType();
 
     RegPtr rp = popRef();
 
     Label ok;
-    masm.branchTestPtr(Assembler::NotEqual, rp, rp, &ok);
+    masm.branchTestPtr(Assembler::NonZero, rp, rp, &ok);
     trap(Trap::NullPointerDereference);
     masm.bind(&ok);
 
     if (!structType.isInline_) {
         masm.loadPtr(Address(rp, OutlineTypedObject::offsetOfData()), rp);
     }
 
     uint32_t offs = structType.fields_[fieldIndex].offset;
@@ -10008,17 +10008,17 @@ BaseCompiler::emitStructSet()
         break;
       default:
         MOZ_CRASH("Unexpected field type");
     }
 
     RegPtr rp = popRef();
 
     Label ok;
-    masm.branchTestPtr(Assembler::NotEqual, rp, rp, &ok);
+    masm.branchTestPtr(Assembler::NonZero, rp, rp, &ok);
     trap(Trap::NullPointerDereference);
     masm.bind(&ok);
 
     if (!structType.isInline_) {
         masm.loadPtr(Address(rp, OutlineTypedObject::offsetOfData()), rp);
     }
 
     uint32_t offs = structType.fields_[fieldIndex].offset;
@@ -10080,17 +10080,17 @@ BaseCompiler::emitStructNarrow()
         return true;
     }
 
     // Null pointers are just passed through.
 
     Label done;
     Label doTest;
     RegPtr rp = popRef();
-    masm.branchTestPtr(Assembler::NotEqual, rp, rp, &doTest);
+    masm.branchTestPtr(Assembler::NonZero, rp, rp, &doTest);
     pushRef(NULLREF_VALUE);
     masm.jump(&done);
 
     // AnyRef -> (ref T) must first unbox; leaves rp or null
 
     bool mustUnboxAnyref = inputType == ValType::AnyRef;
 
     // Dynamic downcast (ref T) -> (ref U), leaves rp or null