PPC64: Define 13 FPs regs as arguments

ABI mandates 13 but only 8 was implemented.
This commit is contained in:
Gustavo Serra Scalet 2016-09-06 13:04:16 -03:00
parent 747bff95ca
commit 8ccd23a538
3 changed files with 7 additions and 2 deletions

View File

@ -87,7 +87,7 @@ typedef union FPRArg {
#if LJ_ARCH_PPC64 #if LJ_ARCH_PPC64
#define CCALL_NARG_GPR 8 #define CCALL_NARG_GPR 8
#define CCALL_NARG_FPR 8 #define CCALL_NARG_FPR 13
#define CCALL_NRET_GPR 4 /* For complex double. */ #define CCALL_NRET_GPR 4 /* For complex double. */
#define CCALL_NRET_FPR 1 #define CCALL_NRET_FPR 1
#define CCALL_SPS_EXTRA 14 #define CCALL_SPS_EXTRA 14

View File

@ -153,7 +153,7 @@ typedef struct CType {
/* Simplify target-specific configuration. Checked in lj_ccall.h. */ /* Simplify target-specific configuration. Checked in lj_ccall.h. */
#define CCALL_MAX_GPR 8 #define CCALL_MAX_GPR 8
#define CCALL_MAX_FPR 8 #define CCALL_MAX_FPR 13
typedef LJ_ALIGN(8) union FPRCBArg { double d; float f[2]; } FPRCBArg; typedef LJ_ALIGN(8) union FPRCBArg { double d; float f[2]; } FPRCBArg;

View File

@ -2394,6 +2394,11 @@ static void build_subroutines(BuildCtx *ctx)
| lfd f6, CCSTATE->fpr[5] | lfd f6, CCSTATE->fpr[5]
| lfd f7, CCSTATE->fpr[6] | lfd f7, CCSTATE->fpr[6]
| lfd f8, CCSTATE->fpr[7] | lfd f8, CCSTATE->fpr[7]
| lfd f9, CCSTATE->fpr[8]
| lfd f10, CCSTATE->fpr[9]
| lfd f11, CCSTATE->fpr[10]
| lfd f12, CCSTATE->fpr[11]
| lfd f13, CCSTATE->fpr[12]
|3: |3:
| ld r12, CCSTATE->func | ld r12, CCSTATE->func
| ld CARG2, CCSTATE->gpr[1] | ld CARG2, CCSTATE->gpr[1]