Bug 1281759 - Try to work around mysterious AMD crashes (take 2). r=jandem
authorHannes Verschore <hv1989@gmail.com>
Fri, 28 Oct 2016 21:44:39 +0200
changeset 320074 d77c9965e9b287150fcc5fc23d386a9ade278bd2
parent 320073 3ecd7c2308e72d85b9797458c1d2594ade5458c3
child 320075 683d731aad23ced97d7ba5f0e16400fc570a4454
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1281759
milestone52.0a1
Bug 1281759 - Try to work around mysterious AMD crashes (take 2). r=jandem
js/src/jit/SharedIC.cpp
--- a/js/src/jit/SharedIC.cpp
+++ b/js/src/jit/SharedIC.cpp
@@ -3988,20 +3988,24 @@ ICTypeMonitor_PrimitiveSet::Compiler::ge
     EmitReturnFromIC(masm);
     return true;
 }
 
 static void
 MaybeWorkAroundAmdBug(MacroAssembler& masm)
 {
     // Attempt to work around an AMD bug (see bug 1034706 and bug 1281759), by
-    // inserting a 4-byte NOP.
+    // inserting 32-bytes of NOPs.
 #if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
-    if (CPUInfo::NeedAmdBugWorkaround())
-        masm.nop(4);
+    if (CPUInfo::NeedAmdBugWorkaround()) {
+        masm.nop(9);
+        masm.nop(9);
+        masm.nop(9);
+        masm.nop(5);
+    }
 #endif
 }
 
 bool
 ICTypeMonitor_SingleObject::Compiler::generateStubCode(MacroAssembler& masm)
 {
     Label failure;
     masm.branchTestObject(Assembler::NotEqual, R0, &failure);