Bug 1425387 - Skip automatically-inserted NOPs while patching. r=bbouvier
authorSean Stangl <sstangl@mozilla.com>
Wed, 20 Dec 2017 23:32:41 -0500
changeset 397057 2e6b873b57f5f5e0cf7de9b62c71981eef4f59b5
parent 397056 8be14b21f4b1badb69cb3c65e0574091584db60c
child 397058 6fda621a4e3b037a3caf873905ec0b8dff5272e5
push id98449
push userryanvm@gmail.com
push dateThu, 21 Dec 2017 04:32:57 +0000
treeherdermozilla-inbound@2e6b873b57f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1425387
milestone59.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 1425387 - Skip automatically-inserted NOPs while patching. r=bbouvier
js/src/jit/arm/MacroAssembler-arm-inl.h
--- a/js/src/jit/arm/MacroAssembler-arm-inl.h
+++ b/js/src/jit/arm/MacroAssembler-arm-inl.h
@@ -368,16 +368,17 @@ MacroAssembler::add32ToPtrWithPatch(Regi
     return offs;
 }
 
 void
 MacroAssembler::patchAdd32ToPtr(CodeOffset offset, Imm32 imm)
 {
     ScratchRegisterScope scratch(*this);
     BufferInstructionIterator iter(BufferOffset(offset.offset()), &m_buffer);
+    iter.maybeSkipAutomaticInstructions();
     ma_mov_patch(imm, scratch, Always, HasMOVWT() ? L_MOVWT : L_LDR, iter);
 }
 
 void
 MacroAssembler::addDouble(FloatRegister src, FloatRegister dest)
 {
     ma_vadd(dest, src, dest);
 }