mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
libtcc1.c: Fix __asm__() in __tcc_fpinit and __tcc_cvt_ftol
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
This commit is contained in:
parent
9382d6f1a0
commit
235a65033f
@ -482,7 +482,7 @@ long long __ashldi3(long long a, int b)
|
||||
void __tcc_fpinit(void)
|
||||
{
|
||||
unsigned c = 0x137F;
|
||||
__asm__ __volatile__ ("fldcw %0" : "=m" (c));
|
||||
__asm__ __volatile__ ("fldcw %0" : : "m" (c));
|
||||
}
|
||||
#endif
|
||||
long long __tcc_cvt_ftol(long double x)
|
||||
@ -491,9 +491,9 @@ long long __tcc_cvt_ftol(long double x)
|
||||
long long ret;
|
||||
__asm__ __volatile__ ("fnstcw %0" : "=m" (c0));
|
||||
c1 = c0 | 0x0C00;
|
||||
__asm__ __volatile__ ("fldcw %0" : "=m" (c1));
|
||||
__asm__ __volatile__ ("fldcw %0" : : "m" (c1));
|
||||
__asm__ __volatile__ ("fistpll %0" : "=m" (ret));
|
||||
__asm__ __volatile__ ("fldcw %0" : "=m" (c0));
|
||||
__asm__ __volatile__ ("fldcw %0" : : "m" (c0));
|
||||
return ret;
|
||||
}
|
||||
#endif /* !__x86_64__ */
|
||||
|
Loading…
Reference in New Issue
Block a user