summaryrefslogtreecommitdiffhomepage
path: root/crt
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-17 00:38:00 +0000
committermidipix <writeonce@midipix.org>2020-05-01 19:03:04 +0000
commitb702e4db292e5fd5c304298a3ca76f7f69243cad (patch)
tree35fe1068a5ca8dfda2a22bf98c25ce8400ff7f33 /crt
parentc279900837b042b24f5b6378efb65072668eb7e8 (diff)
downloadmmglue-b702e4db292e5fd5c304298a3ca76f7f69243cad.tar.bz2
mmglue-b702e4db292e5fd5c304298a3ca76f7f69243cad.tar.xz
nt64: crt1.c: _start(): explicitly set the desired float mode.
Diffstat (limited to 'crt')
-rw-r--r--crt/nt64/crt1.c6
1 files changed, 6 insertions, 0 deletions
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