1 /* 2 * Copyright 2005, Ingo Weinhold <bonefish@cs.tu-berlin.de>. All rights 3 * reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef SETJMP_INTERNAL_H 6 #define SETJMP_INTERNAL_H 7 8 /* PPC function call ABI register use: 9 r0 - volatile 10 r1 - stack frame 11 r2 - reserved 12 r3-r4 - param passing, return values 13 r5-r10 - param passing 14 r11-r12 - volatile 15 r13 - small data pointer 16 r14-r30 - local vars 17 r31 - local vars/environment 18 */ 19 20 /* These are the fields of the __jmp_regs structure */ 21 #define JMP_REGS_R1 0 22 #define JMP_REGS_R2 4 23 #define JMP_REGS_R13 8 24 #define JMP_REGS_R14 12 25 #define JMP_REGS_R15 16 26 #define JMP_REGS_R16 20 27 #define JMP_REGS_R17 24 28 #define JMP_REGS_R18 28 29 #define JMP_REGS_R19 32 30 #define JMP_REGS_R20 36 31 #define JMP_REGS_R21 40 32 #define JMP_REGS_R22 44 33 #define JMP_REGS_R23 48 34 #define JMP_REGS_R24 52 35 #define JMP_REGS_R25 56 36 #define JMP_REGS_R26 60 37 #define JMP_REGS_R27 64 38 #define JMP_REGS_R28 68 39 #define JMP_REGS_R29 72 40 #define JMP_REGS_R30 76 41 #define JMP_REGS_R31 80 42 #define JMP_REGS_LR 84 43 #define JMP_REGS_CR 88 44 45 #define FUNCTION(x) .global x; .type x,@function; x 46 47 #endif /* SETJMP_INTERNAL_H */ 48