mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-04 21:26:36 +08:00
Fix long double to long long for x86_64
Some checks are pending
build and test / test-x86_64-linux (push) Waiting to run
build and test / test-x86_64-osx (push) Waiting to run
build and test / test-aarch64-osx (push) Waiting to run
build and test / test-x86_64-win32 (push) Waiting to run
build and test / test-i386-win32 (push) Waiting to run
build and test / test-armv7-linux (push) Waiting to run
build and test / test-aarch64-linux (push) Waiting to run
build and test / test-riscv64-linux (push) Waiting to run
Some checks are pending
build and test / test-x86_64-linux (push) Waiting to run
build and test / test-x86_64-osx (push) Waiting to run
build and test / test-aarch64-osx (push) Waiting to run
build and test / test-x86_64-win32 (push) Waiting to run
build and test / test-i386-win32 (push) Waiting to run
build and test / test-armv7-linux (push) Waiting to run
build and test / test-aarch64-linux (push) Waiting to run
build and test / test-riscv64-linux (push) Waiting to run
This commit is contained in:
parent
acb2a909dd
commit
6ca6328e29
3
tcctok.h
3
tcctok.h
@ -290,6 +290,9 @@
|
|||||||
DEF(TOK___fixdfdi, "__fixdfdi")
|
DEF(TOK___fixdfdi, "__fixdfdi")
|
||||||
DEF(TOK___fixxfdi, "__fixxfdi")
|
DEF(TOK___fixxfdi, "__fixxfdi")
|
||||||
#endif
|
#endif
|
||||||
|
#if defined TCC_TARGET_X86_64
|
||||||
|
DEF(TOK___fixxfdi, "__fixxfdi")
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
#if defined TCC_TARGET_I386 || defined TCC_TARGET_X86_64
|
||||||
DEF(TOK_alloca, "alloca")
|
DEF(TOK_alloca, "alloca")
|
||||||
|
|||||||
@ -2153,6 +2153,15 @@ void gen_cvt_ftoi(int t)
|
|||||||
ft = vtop->type.t;
|
ft = vtop->type.t;
|
||||||
bt = ft & VT_BTYPE;
|
bt = ft & VT_BTYPE;
|
||||||
if (bt == VT_LDOUBLE) {
|
if (bt == VT_LDOUBLE) {
|
||||||
|
if (t != VT_INT) {
|
||||||
|
vpush_helper_func(TOK___fixxfdi);
|
||||||
|
vswap();
|
||||||
|
gfunc_call(1);
|
||||||
|
vpushi(0);
|
||||||
|
vtop->r = REG_IRET;
|
||||||
|
vtop->r2 = REG_IRE2;
|
||||||
|
return;
|
||||||
|
}
|
||||||
gen_cvt_ftof(VT_DOUBLE);
|
gen_cvt_ftof(VT_DOUBLE);
|
||||||
bt = VT_DOUBLE;
|
bt = VT_DOUBLE;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user