From b702e4db292e5fd5c304298a3ca76f7f69243cad Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 17 Jan 2020 00:38:00 +0000 Subject: nt64: crt1.c: _start(): explicitly set the desired float mode. --- crt/nt64/crt1.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crt') diff --git a/crt/nt64/crt1.c b/crt/nt64/crt1.c index 3834d32..3b49915 100644 --- a/crt/nt64/crt1.c +++ b/crt/nt64/crt1.c @@ -11,6 +11,12 @@ void __hidden __libc_loader_init(void * __main, int flags); void __hidden _start(void) { + const unsigned short fmode = 0x37f; + + __asm__ __volatile__ ( + "fldcw %0" + : : "m" (*&fmode)); + __libc_loader_init( main, __crtopt_posix -- cgit v1.2.3