diff options
| -rw-r--r-- | arm-gen.c | 10 | ||||
| -rwxr-xr-x | configure | 17 | ||||
| -rw-r--r-- | tcc.h | 8 |
3 files changed, 23 insertions, 12 deletions
@@ -829,7 +829,7 @@ void gfunc_call(int nb_args) --nb_args; } - vpushi(0); + vpushi(0), nb_args++; vtop->type.t = VT_LLONG; args_size = 0; #endif @@ -845,7 +845,7 @@ void gfunc_call(int nb_args) structures in the first zone are moved just after the SValue pointed by before_vfpreg_hfa. SValue's representing structures in the second zone are moved just after the SValue pointer by before_stack. */ - for(i = nb_args + 1 ; i-- ;) { + for(i = nb_args; i-- ;) { int j, assigned_vfpreg = 0; size = type_size(&vtop[-i].type, &align); switch(vtop[-i].type.t & VT_BTYPE) { @@ -920,9 +920,11 @@ void gfunc_call(int nb_args) } continue; default: +#ifdef TCC_ARM_EABI if (!i) { break; } +#endif if (ncrn < 4) { int is_long = (vtop[-i].type.t & VT_BTYPE) == VT_LLONG; @@ -953,7 +955,9 @@ void gfunc_call(int nb_args) #endif args_size += (size + 3) & -4; } - vtop--; +#ifdef TCC_ARM_EABI + vtop--, nb_args--; +#endif args_size = keep = 0; for(i = 0;i < nb_args; i++) { vrotb(keep+1); @@ -51,7 +51,21 @@ case "$cpu" in x86_64) cpu="x86-64" ;; - arm|armv4l|armv5tel|armv5tejl|armv6j|armv6l|armv7a|armv7l) + arm*) + case "$cpu" in + arm|armv4l) + cpuver=4 + ;; + armv5tel|armv5tejl) + cpuver=5 + ;; + armv6j|armv6l) + cpuver=6 + ;; + armv7a|armv7l) + cpuver=7 + ;; + esac cpu="armv4l" ;; alpha) @@ -411,6 +425,7 @@ elif test "$cpu" = "x86-64" ; then elif test "$cpu" = "armv4l" ; then echo "ARCH=arm" >> config.mak echo "#define HOST_ARM 1" >> $TMPH + echo "#define TCC_ARM_VERSION $cpuver" >> $TMPH elif test "$cpu" = "powerpc" ; then echo "ARCH=ppc" >> config.mak echo "#define HOST_PPC 1" >> $TMPH @@ -105,14 +105,6 @@ #define TCC_TARGET_I386 #endif -#if defined (TCC_TARGET_ARM) && !defined(TCC_ARM_VERSION) - #ifdef TCC_ARM_HARDFLOAT - #define TCC_ARM_VERSION 7 - #else - #define TCC_ARM_VERSION 4 - #endif -#endif - #if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \ !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64) #define CONFIG_TCC_BCHECK /* enable bound checking code */ |
