diff -r 7909d3c7e712 tcc.c --- a/tcc.c Sat Sep 08 17:30:03 2007 -0500 +++ b/tcc.c Mon Sep 10 00:26:42 2007 +0200 @@ -38,12 +38,14 @@ static int do_bounds_check = 0; static int do_bounds_check = 0; #ifdef TCC_TARGET_I386 -#include "i386/i386-gen.c" +#define TCC_TARGET_GEN "i386/i386-gen.c" #endif #ifdef TCC_TARGET_ARM #include "arm-gen.c" #endif + +#include TCC_TARGET_GEN #ifdef TCC_TARGET_C67 #include "c67-gen.c" @@ -4902,8 +4904,11 @@ void gen_op(int op) } /* generic itof for unsigned long long case */ -void gen_cvt_itof1(int t) -{ +void gen_cvt_itof2(int t) +{ +#if defined(TCC_TARGET_ARM) + gen_cvt_itof(dbt); +#else if ((vtop->type.t & (VT_BTYPE | VT_UNSIGNED)) == (VT_LLONG | VT_UNSIGNED)) { @@ -4920,6 +4925,7 @@ void gen_cvt_itof1(int t) } else { gen_cvt_itof(t); } +#endif } /* generic ftoi for unsigned long long case */ @@ -5044,11 +5050,7 @@ static void gen_cast(CType *type) } } else { do_itof: -#if !defined(TCC_TARGET_ARM) - gen_cvt_itof1(dbt); -#else - gen_cvt_itof(dbt); -#endif + gen_cvt_itof2(dbt); } } else if (sf) { /* convert fp to int */