pub inline fn current() Arm
460 461 462 463 464 465 466 467 468 469 470 471 472 473
pub inline fn current() Arm { var ctx: Arm = undefined; asm volatile ( \\ // For compatibility with Thumb, we can't write r13 (sp) or r15 (pc) with stm. \\ stm r0, {r0-r12} \\ str r13, [r0, #0x34] \\ str r14, [r0, #0x38] \\ mov r1, pc \\ str r1, [r0, #0x3c] : : [r] "{r0}" (&ctx.r), : .{ .r1 = true, .memory = true }); return ctx; }