diff options
| author | Graydon Hoare <[email protected]> | 2010-06-25 17:31:08 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-25 17:31:08 -0700 |
| commit | eb7807c4fe7a2c2ad3c074705fb70de5eae5abe3 (patch) | |
| tree | acef5f322d32c3992a53457961c25b2df614d597 | |
| parent | Debug GC glue enough that marking passes. (diff) | |
| download | rust-eb7807c4fe7a2c2ad3c074705fb70de5eae5abe3.tar.xz rust-eb7807c4fe7a2c2ad3c074705fb70de5eae5abe3.zip | |
I hear actually loading the next pointer into the right register helps when walking a list.
| -rw-r--r-- | src/boot/be/x86.ml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/boot/be/x86.ml b/src/boot/be/x86.ml index d90869f3..9d216658 100644 --- a/src/boot/be/x86.ml +++ b/src/boot/be/x86.ml @@ -820,7 +820,7 @@ let gc_glue let skip_jmp_fix = new_fixup "skip jump" in let exit_jmp_fix = new_fixup "exit jump" in - mov (rc edx) (c task_ptr); (* switch back to rust stack *) + mov (rc edx) (c task_ptr); (* switch back to rust stack *) mov (rc esp) (c (edx_n Abi.task_field_rust_sp)); @@ -830,11 +830,6 @@ let gc_glue push (ro eax); crawl_stack_calling_glue e Abi.frame_glue_fns_field_mark; - (* For now, stop after marking; sweep is still buggy. *) - pop (rc eax); - restore_callee_saves e; - Il.emit e Il.Ret; - (* Sweep pass. *) mov (rc edx) (c task_ptr); mov (rc edx) (c (edx_n Abi.task_field_gc_alloc_chain)); @@ -889,12 +884,16 @@ let gc_glue pop (rc eax); mark skip_jmp_fix; - mov (rc ecx) (* Advance down chain *) + mov (rc edx) (* Advance down chain *) (c (edx_n Abi.exterior_gc_slot_field_next)); emit (Il.jmp Il.JMP (codefix repeat_jmp_fix)); (* loop *) mark exit_jmp_fix; - emit Il.Ret; + + (* For now, stop after marking; sweep is still buggy. *) + pop (rc eax); + restore_callee_saves e; + Il.emit e Il.Ret; ;; |