+void MacroAssemblerARM::ProbeContext::dump(const char* indentation)
+{
+ if (!indentation)
+ indentation = "";
+
+ dataLogF("%sProbeContext %p {\n", indentation, this);
+ dataLogF("%s probeFunction: %p\n", indentation, probeFunction);
+ dataLogF("%s arg1: %p %llu\n", indentation, arg1, reinterpret_cast<int64_t>(arg1));
+ dataLogF("%s arg2: %p %llu\n", indentation, arg2, reinterpret_cast<int64_t>(arg2));
+ dataLogF("%s cpu: {\n", indentation);
+
+ dumpCPURegisters(indentation);
+
+ dataLogF("%s }\n", indentation);
+ dataLogF("%s}\n", indentation);
+}
+
+
+extern "C" void ctiMasmProbeTrampoline();
+
+// For details on "What code is emitted for the probe?" and "What values are in
+// the saved registers?", see comment for MacroAssemblerX86::probe() in
+// MacroAssemblerX86_64.h.
+
+void MacroAssemblerARM::probe(MacroAssemblerARM::ProbeFunction function, void* arg1, void* arg2)
+{
+ push(RegisterID::sp);
+ push(RegisterID::lr);
+ push(RegisterID::ip);
+ push(RegisterID::S0);
+ // The following uses RegisterID::S0. So, they must come after we push S0 above.
+ push(trustedImm32FromPtr(arg2));
+ push(trustedImm32FromPtr(arg1));
+ push(trustedImm32FromPtr(function));
+
+ move(trustedImm32FromPtr(ctiMasmProbeTrampoline), RegisterID::S0);
+ m_assembler.blx(RegisterID::S0);
+
+}
+#endif // USE(MASM_PROBE)
+
+} // namespace JSC
+