浏览代码

Fix push/pop of preserved registers on x86

Jeremy Soller 2 年之前
父节点
当前提交
60a4b59194
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/platform/redox/redox-exec/src/arch/x86.rs

+ 4 - 1
src/platform/redox/redox-exec/src/arch/x86.rs

@@ -54,9 +54,10 @@ __relibc_internal_fork_wrapper:
     push ebp
     mov ebp, esp
 
+    // Push preserved registers
     push ebx
-    push esi
     push edi
+    push esi
     push ebp
 
     sub esp, 32
@@ -86,6 +87,8 @@ __relibc_internal_fork_ret:
     .p2align 4
 2:
     add esp, 32
+
+    // Pop preserved registers
     pop ebp
     pop esi
     pop edi