File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 290290 DEF (TOK___fixdfdi , "__fixdfdi" )
291291 DEF (TOK___fixxfdi , "__fixxfdi" )
292292#endif
293+ #if defined TCC_TARGET_X86_64
294+ DEF (TOK___fixxfdi , "__fixxfdi" )
295+ #endif
293296
294297#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
295298 DEF (TOK_alloca , "alloca" )
Original file line number Diff line number Diff line change @@ -2153,6 +2153,15 @@ void gen_cvt_ftoi(int t)
21532153 ft = vtop -> type .t ;
21542154 bt = ft & VT_BTYPE ;
21552155 if (bt == VT_LDOUBLE ) {
2156+ if (t != VT_INT ) {
2157+ vpush_helper_func (TOK___fixxfdi );
2158+ vswap ();
2159+ gfunc_call (1 );
2160+ vpushi (0 );
2161+ vtop -> r = REG_IRET ;
2162+ vtop -> r2 = REG_IRE2 ;
2163+ return ;
2164+ }
21562165 gen_cvt_ftof (VT_DOUBLE );
21572166 bt = VT_DOUBLE ;
21582167 }
You can’t perform that action at this time.
0 commit comments