summaryrefslogtreecommitdiff
path: root/src/user
diff options
context:
space:
mode:
Diffstat (limited to 'src/user')
-rw-r--r--src/user/lib/_start.s6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/user/lib/_start.s b/src/user/lib/_start.s
index 0d5b5de..12d2c5f 100644
--- a/src/user/lib/_start.s
+++ b/src/user/lib/_start.s
@@ -5,6 +5,12 @@
_start:
mov %rsp, %rdi
and $~0xF, %rsp
+
+ /* prevent floating point crashes. thanks heat */
+ push $0x1f80
+ ldmxcsr (%rsp)
+ add $8, %rsp
+
call _start2
hlt
/* the call shouldn't return, thus the hlt.