1 .globl make_fcontext[DS]
2 .globl .make_fcontext[PR]
4 .csect make_fcontext[DS]
6 .long .make_fcontext[PR]
7 .csect .make_fcontext[PR], 3
9 # save return address into R6
12 # first arg of make_fcontext() == top address of context-function
13 # shift address in R3 to lower 16 byte boundary
16 # reserve space for context-data on context-stack
17 # including 64 byte of linkage + parameter area (R1 % 16 == 0)
20 # third arg of make_fcontext() == address of context-function
23 # set back-chain to zero
27 # compute address of returned transfer_t
39 # compute abs address of label .L_finish
40 addi 4, 4, .L_finish - .Label
43 # save address of finish as return-address for context-function
44 # will be entered after context-function returns
47 # restore return address from R6
50 blr # return pointer to context-data
53 # save return address into R0
55 # save return address on stack, set up stack frame
57 # allocate stack space, R1 % 16 == 0