1
/* Trampoline for powerpc64 CPU with AIX calling convention */
4
* Copyright 1995-2006 Bruno Haible, <bruno@clisp.org>
6
* This is free software distributed under the GNU General Public Licence
7
* described in the file COPYING. Contact the author if you don't have this
8
* or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied,
12
/* Available registers: r0, r12, r11, r10, r9, r8, r7, r6, r5, r4, r3. */
13
/* However, r0 is special in that it cannot be used as a base register. */
14
/* And r3...r10 should not be clobbered because they contain the first 8
15
* integer arguments to the function being called. */
22
/* Move <data> into <variable> */
23
ld 11,0(2) /* get <variable> */
24
ld 12,8(2) /* get <data> */
29
* gcc-2.6.3 source says:
30
* A function pointer is a pointer to a data area whose first word contains
31
* the actual address of the function, whose second word contains a pointer
32
* to its TOC, and whose third word contains a value to place in the static
33
* chain register (r11).
35
ld 11,16(12) /* pass static chain in r11 */
36
ld 2,8(12) /* pass TOC in r2 */
37
ld 0,0(12) /* actual code address */