Mercurial > pub > dyncall > dyncall
diff dyncallback/dyncall_args_mips.h @ 305:b104c5beec8b
- softfloat support for mips64/n64 abi
author | Tassilo Philipp |
---|---|
date | Wed, 23 May 2018 11:41:34 +0200 |
parents | d55f9d508074 |
children |
line wrap: on
line diff
--- a/dyncallback/dyncall_args_mips.h Wed May 23 11:39:40 2018 +0200 +++ b/dyncallback/dyncall_args_mips.h Wed May 23 11:41:34 2018 +0200 @@ -33,19 +33,37 @@ { /* Don't change order or types, laid out for asm code to fill in! */ #if defined(DC__Arch_MIPS) && defined(DC__ABI_MIPS_O32) + DCint freg_count; /* unused on soft-float targets, but keep as 4b-padding */ + #else + +# if defined(DC__Arch_MIPS) + # define DCARGS_MIPS_NUM_IREGS 8 # define DCARGS_MIPS_NUM_FREGS 8 -# if defined(DC__Arch_MIPS) DCint ireg_data[DCARGS_MIPS_NUM_IREGS]; DCfloat freg_data[DCARGS_MIPS_NUM_FREGS]; struct { DCshort i; DCshort f; } reg_count; -# elif defined(DC__Arch_MIPS64) - DClonglong ireg_data[DCARGS_MIPS_NUM_IREGS]; - DCdouble freg_data[DCARGS_MIPS_NUM_FREGS]; + +# elif defined(DC__Arch_MIPS64) + + /* single counter for both, int & float: mips64 uses 8 max, total, either */ + /* skipping over other/type's reg, or only using int regs on soft-float */ +# define DCARGS_MIPS_NUM_REGS 8 +# if defined(DC__ABI_SOFTFLOAT) + union +# else + struct +# endif + { + DClonglong ireg_data[DCARGS_MIPS_NUM_REGS]; + DCdouble freg_data[DCARGS_MIPS_NUM_REGS]; + }; DClonglong reg_count; -# endif + +# endif + #endif DCuchar* stackptr; };