From f029b7b1fa68c08d3c531e7a02c336346b9aed95 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 18 Jan 2020 11:07:37 +0000 Subject: nt32: crt1.c: _start(): explicitly set the desired float mode. --- crt/nt32/crt1.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crt') diff --git a/crt/nt32/crt1.c b/crt/nt32/crt1.c index 3834d32..3b49915 100644 --- a/crt/nt32/crt1.c +++ b/crt/nt32/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