2 Copyright Oliver Kowalke 2009.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt)
8 /*******************************************************
10 * ------------------------------------------------- *
11 * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | *
12 * ------------------------------------------------- *
13 * |bchai| CR | LR |compl| link| TOC | R14 | R15 | *
14 * ------------------------------------------------- *
15 * ------------------------------------------------- *
16 * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | *
17 * ------------------------------------------------- *
18 * | R16 | R17 | R18 | R19 | R20 | R21 | R22 | R23 | *
19 * ------------------------------------------------- *
20 * ------------------------------------------------- *
21 * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | *
22 * ------------------------------------------------- *
23 * | R24 | R25 | R26 | R27 | R28 | R29 | R30 | R31 | *
24 * ------------------------------------------------- *
25 * ------------------------------------------------- *
26 * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | *
27 * ------------------------------------------------- *
28 * | F14 | F15 | F16 | F17 | *
29 * ------------------------------------------------- *
30 * ------------------------------------------------- *
31 * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | *
32 * ------------------------------------------------- *
33 * | F18 | F19 | F20 | F21 | *
34 * ------------------------------------------------- *
35 * ------------------------------------------------- *
36 * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | *
37 * ------------------------------------------------- *
38 * | F22 | F23 | F24 | F25 | *
39 * ------------------------------------------------- *
40 * ------------------------------------------------- *
41 * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | *
42 * ------------------------------------------------- *
43 * | F26 | F27 | F28 | F29 | *
44 * ------------------------------------------------- *
45 * ------------------------------------------------- *
46 * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | *
47 * ------------------------------------------------- *
48 * | F30 | F31 | PC |hiddn| fpscr | *
49 * ------------------------------------------------- *
50 * ------------------------------------------------- *
51 * | 256 | 260 | 264 | 268 | 272 | 276 | 280 | 284 | *
52 * ------------------------------------------------- *
53 * |bchai|savCR|savLR|compl| link|svTOC| FCTX| DATA| *
54 * ------------------------------------------------- *
56 *******************************************************/
58 .file "jump_ppc32_sysv_xcoff_gas.S"
61 .globl jump_fcontext[DS]
63 .csect jump_fcontext[DS]
65 .long .jump_fcontext[PR], TOC[tc0], 0
68 # reserve space on stack
82 # Save registers R14 to R31.
102 # Save registers F14 to F31 in slots with 8-byte alignment.
103 # 4-byte alignment may stall the pipeline of some processors.
104 # Less than 4 may cause alignment traps.
128 stfd 0, 248(1) # save FPSCR
131 # store RSP (pointing to context-data) in R6
134 # restore RSP (pointing to context-data) from R4
193 lfd 0, 248(1) # load FPSCR
194 mtfsf 0xff, 0 # restore FPSCR
199 # zero in r3 indicates first jump to context-function
211 # copy transfer_t into transfer_fn arg registers