9 .private_extern __a1a2_tramphead
10 .private_extern __a1a2_firsttramp
11 .private_extern __a1a2_nexttramp
12 .private_extern __a1a2_trampend
14 // This must match a2a3-blocktramps-arm.s
15 #if defined(_ARM_ARCH_7)
23 .thumb_func __a1a2_tramphead
24 .thumb_func __a1a2_firsttramp
25 .thumb_func __a1a2_nexttramp
26 .thumb_func __a1a2_trampend
37 r1 == pc of trampoline's first instruction + PC bias
38 lr == original return address
41 // calculate the trampoline's index (512 entries, 8 bytes each)
43 // PC bias is only 4, no need to correct with 8-byte trampolines
46 sub r1, r1, #8 // correct PC bias
51 // load block pointer from trampoline's data
52 // nt label works around thumb integrated asm bug rdar://11315197
53 adr r12, __a1a2_tramphead_nt // text page
54 sub r12, r12, #4096 // data page precedes text page
55 ldr r12, [r12, r1, LSL #3] // load block pointer from data + index*8
58 mov r1, r0 // _cmd = self
59 mov r0, r12 // self = block pointer
61 // tail call block->invoke
65 // Make v6 and v7 match so they have the same number of TrampolineEntry
66 // below. Debug asserts in objc-block-trampoline.m check this.
71 .macro TrampolineEntry
78 .private_extern __a1a2_firsttramp
82 .private_extern __a1a2_nexttramp
591 .private_extern __a1a2_trampend