Selaa lähdekoodia

Manually init FPU context in pte_clone.

4lDO2 2 vuotta sitten
vanhempi
commit
db16393fd7
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      src/platform/redox/clone.rs

+ 9 - 1
src/platform/redox/clone.rs

@@ -296,7 +296,6 @@ fork_ret:
     .globl pte_clone_ret
     .type pte_clone_ret, @function
 pte_clone_ret:
-
     # Load registers
     pop rax
     pop rdi
@@ -306,6 +305,15 @@ pte_clone_ret:
     pop r8
     pop r9
 
+    sub rsp, 8
+
+    mov DWORD PTR [rsp], 0x00001F80
+    ldmxcsr [rsp]
+    mov WORD PTR [rsp], 0x031F
+    fldcw [rsp]
+
+    add rsp, 8
+
     # Call entry point
     call rax