Bug 1530351 - GenerateProfilerExit frame use 64-bits math to remove the rectifier frame size. r=sstangl a=pascalc
authorNicolas B. Pierron <nicolas.b.pierron@nbp.name>
Tue, 02 Apr 2019 15:44:58 +0000
changeset 526072 0c6cb165ba726b0987fbe1df7ffc65c714b4e562
parent 526071 0d43ca71665f2f956269ab5b7d6bd00175a7fb11
child 526073 8d7c9a41c240c3577063cd4f34ef8c2647c54dd4
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl, pascalc
bugs1530351
milestone67.0
Bug 1530351 - GenerateProfilerExit frame use 64-bits math to remove the rectifier frame size. r=sstangl a=pascalc Differential Revision: https://phabricator.services.mozilla.com/D25755
js/src/jit-test/tests/profiler/ion-rectifier-frame-bug1530351.js
js/src/jit/arm64/Trampoline-arm64.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/profiler/ion-rectifier-frame-bug1530351.js
@@ -0,0 +1,6 @@
+function test(str) {
+  for (let i = 0; i < 100; ++i)
+    Reflect.apply(String.prototype.substring, str, [])
+}
+enableGeckoProfilingWithSlowAssertions();
+test("");
--- a/js/src/jit/arm64/Trampoline-arm64.cpp
+++ b/js/src/jit/arm64/Trampoline-arm64.cpp
@@ -1127,17 +1127,17 @@ void JitRuntime::generateProfilerExitFra
     masm.loadPtr(
         Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()),
         scratch3);
     masm.storePtr(scratch3, lastProfilingCallSite);
 
     // scratch3 := RectFrame + Rect-Descriptor.Size +
     //             RectifierFrameLayout::Size()
     masm.addPtr(scratch2, scratch1, scratch3);
-    masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
+    masm.addPtr(Imm32(RectifierFrameLayout::Size()), scratch3);
     masm.storePtr(scratch3, lastProfilingFrame);
     masm.ret();
 
     masm.bind(&notIonFrame);
 
     // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
     // frame.
     masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub),