diff options
Diffstat (limited to '')
-rw-r--r-- | src/lj_ccall.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/lj_ccall.c b/src/lj_ccall.c index 1011a1ad..fd9683dc 100644 --- a/src/lj_ccall.c +++ b/src/lj_ccall.c | |||
@@ -338,42 +338,6 @@ | |||
338 | if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ | 338 | if (ctype_isfp(ctr->info) && ctr->size == sizeof(float)) \ |
339 | ctr = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ | 339 | ctr = ctype_get(cts, CTID_DOUBLE); /* FPRs always hold doubles. */ |
340 | 340 | ||
341 | #elif LJ_TARGET_PPCSPE | ||
342 | /* -- PPC/SPE calling conventions ----------------------------------------- */ | ||
343 | |||
344 | #define CCALL_HANDLE_STRUCTRET \ | ||
345 | cc->retref = 1; /* Return all structs by reference. */ \ | ||
346 | cc->gpr[ngpr++] = (GPRArg)dp; | ||
347 | |||
348 | #define CCALL_HANDLE_COMPLEXRET \ | ||
349 | /* Complex values are returned in 2 or 4 GPRs. */ \ | ||
350 | cc->retref = 0; | ||
351 | |||
352 | #define CCALL_HANDLE_COMPLEXRET2 \ | ||
353 | memcpy(dp, sp, ctr->size); /* Copy complex from GPRs. */ | ||
354 | |||
355 | #define CCALL_HANDLE_STRUCTARG \ | ||
356 | rp = cdataptr(lj_cdata_new(cts, did, sz)); \ | ||
357 | sz = CTSIZE_PTR; /* Pass all structs by reference. */ | ||
358 | |||
359 | #define CCALL_HANDLE_COMPLEXARG \ | ||
360 | /* Pass complex by value in 2 or 4 GPRs. */ | ||
361 | |||
362 | /* PPC/SPE has a softfp ABI. */ | ||
363 | #define CCALL_HANDLE_REGARG \ | ||
364 | if (n > 1) { /* Doesn't fit in a single GPR? */ \ | ||
365 | lua_assert(n == 2 || n == 4); /* int64_t, double or complex (float). */ \ | ||
366 | if (n == 2) \ | ||
367 | ngpr = (ngpr + 1u) & ~1u; /* Only align 64 bit value to regpair. */ \ | ||
368 | else if (ngpr + n > maxgpr) \ | ||
369 | ngpr = maxgpr; /* Prevent reordering. */ \ | ||
370 | } \ | ||
371 | if (ngpr + n <= maxgpr) { \ | ||
372 | dp = &cc->gpr[ngpr]; \ | ||
373 | ngpr += n; \ | ||
374 | goto done; \ | ||
375 | } | ||
376 | |||
377 | #elif LJ_TARGET_MIPS | 341 | #elif LJ_TARGET_MIPS |
378 | /* -- MIPS calling conventions -------------------------------------------- */ | 342 | /* -- MIPS calling conventions -------------------------------------------- */ |
379 | 343 | ||