Fix bug in gen_cvt_ftoi1. Add test 107_stack_safe for this fix.

(Thanks to the support of herman ten brugge)
This commit is contained in:
Pursuer2 2019-10-24 00:54:30 +08:00
parent 749dd15ee8
commit a7b37f9c63
3 changed files with 16 additions and 0 deletions

View File

@ -2627,7 +2627,9 @@ static void gen_cvt_ftoi1(int t)
gfunc_call(1);
vpushi(0);
vtop->r = REG_IRET;
#if PTR_SIZE == 4
vtop->r2 = REG_LRET;
#endif
} else {
gen_cvt_ftoi(t);
}

View File

@ -0,0 +1,13 @@
extern int printf(const char *, ...);
static void func_ull_ull(unsigned long long l1,unsigned long long l2){
}
int main()
{
int a,b,c,d;
a=1;b=2;c=3;d=4;
func_ull_ull((unsigned long long)a/1.0,(unsigned long long)b/1.0);
printf("%d %d %d %d",a,b,c,d);
return 0;
}

View File

@ -0,0 +1 @@
1 2 3 4