+/* set_stackptr without changing mode */
+void
+static __inline set_current_stackptr(u_int address)
+{
+ __asm __volatile("mov r13, %0" : /* no outputs */
+ : "r" (address)
+ : "r13" );
+}
+
It wouldn't surprise me if this seriously upsets the compiler. Even
making this non-inline may not work.
R.