summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-18 11:07:37 +0000
committermidipix <writeonce@midipix.org>2020-05-01 19:03:04 +0000
commitf029b7b1fa68c08d3c531e7a02c336346b9aed95 (patch)
tree183faa16b523a058cb4c85c16739e0f21c50bd7f
parentb702e4db292e5fd5c304298a3ca76f7f69243cad (diff)
downloadmmglue-f029b7b1fa68c08d3c531e7a02c336346b9aed95.tar.bz2
mmglue-f029b7b1fa68c08d3c531e7a02c336346b9aed95.tar.xz
nt32: crt1.c: _start(): explicitly set the desired float mode.
-rw-r--r--crt/nt32/crt1.c6
1 files changed, 6 insertions, 0 deletions
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