diff options
Diffstat (limited to 'src/lj_ccall.h')
-rw-r--r-- | src/lj_ccall.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lj_ccall.h b/src/lj_ccall.h index d0979781..9a927745 100644 --- a/src/lj_ccall.h +++ b/src/lj_ccall.h | |||
@@ -53,10 +53,22 @@ typedef intptr_t GPRArg; | |||
53 | #define CCALL_NARG_FPR 0 | 53 | #define CCALL_NARG_FPR 0 |
54 | #define CCALL_NRET_GPR 2 /* For softfp double. */ | 54 | #define CCALL_NRET_GPR 2 /* For softfp double. */ |
55 | #define CCALL_NRET_FPR 0 | 55 | #define CCALL_NRET_FPR 0 |
56 | #define CCALL_SPS_FREE 0 /* NYI */ | 56 | #define CCALL_SPS_FREE 0 |
57 | 57 | ||
58 | typedef intptr_t GPRArg; | 58 | typedef intptr_t GPRArg; |
59 | 59 | ||
60 | #elif LJ_TARGET_PPC | ||
61 | |||
62 | #define CCALL_NARG_GPR 8 | ||
63 | #define CCALL_NARG_FPR 8 | ||
64 | #define CCALL_NRET_GPR 4 /* For complex double. */ | ||
65 | #define CCALL_NRET_FPR 1 | ||
66 | #define CCALL_SPS_EXTRA 3 | ||
67 | #define CCALL_SPS_FREE 1 | ||
68 | |||
69 | typedef intptr_t GPRArg; | ||
70 | typedef double FPRArg; | ||
71 | |||
60 | #elif LJ_TARGET_PPCSPE | 72 | #elif LJ_TARGET_PPCSPE |
61 | 73 | ||
62 | #define CCALL_NARG_GPR 8 | 74 | #define CCALL_NARG_GPR 8 |
@@ -100,8 +112,13 @@ typedef struct CCallState { | |||
100 | uint8_t nfpr; /* Number of arguments in FPRs. */ | 112 | uint8_t nfpr; /* Number of arguments in FPRs. */ |
101 | #elif LJ_TARGET_X86 | 113 | #elif LJ_TARGET_X86 |
102 | uint8_t resx87; /* Result on x87 stack: 1:float, 2:double. */ | 114 | uint8_t resx87; /* Result on x87 stack: 1:float, 2:double. */ |
115 | #elif LJ_TARGET_PPC || LJ_TARGET_PPCSPE | ||
116 | uint8_t nfpr; /* Number of arguments in FPRs. */ | ||
103 | #endif | 117 | #endif |
104 | #if CCALL_NUM_FPR | 118 | #if CCALL_NUM_FPR |
119 | #if LJ_32 | ||
120 | int32_t align1; | ||
121 | #endif | ||
105 | FPRArg fpr[CCALL_NUM_FPR]; /* Arguments/results in FPRs. */ | 122 | FPRArg fpr[CCALL_NUM_FPR]; /* Arguments/results in FPRs. */ |
106 | #endif | 123 | #endif |
107 | GPRArg gpr[CCALL_NUM_GPR]; /* Arguments/results in GPRs. */ | 124 | GPRArg gpr[CCALL_NUM_GPR]; /* Arguments/results in GPRs. */ |