diff options
| author | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-05-05 23:16:59 -0400 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-05-05 23:16:59 -0400 |
| commit | 8df37716ce040e34b0097f7c3f9a48f9f3749aae (patch) | |
| tree | 0253a73458659dd8addaa526e0d8d107da75b70c /src/rt/rust_task.cpp | |
| parent | 518e2d249c062211c2c1211327f2e21451920047 (diff) | |
| download | rust-8df37716ce040e34b0097f7c3f9a48f9f3749aae.tar.gz rust-8df37716ce040e34b0097f7c3f9a48f9f3749aae.zip | |
Fix OS X build.
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index ab75798817c..20843d51460 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -264,13 +264,6 @@ rust_task::start_rustc(uintptr_t exit_task_glue, // Set sp to last uintptr_t-sized cell of segment rust_sp -= sizeof(uintptr_t); - // NB: Darwin needs "16-byte aligned" stacks *at the point of the call - // instruction in the caller*. This means that the address at which the - // word before retpc is pushed must always be 16-byte aligned. - // - // see: "Mac OS X ABI Function Call Guide" - - // Begin synthesizing the exit_task_glue frame. We will return to // exit_task_glue and it is responsible for calling the user code // and passing the value returned by the user to the system @@ -282,7 +275,14 @@ rust_task::start_rustc(uintptr_t exit_task_glue, uintptr_t args_size = callsz - 3*sizeof(uintptr_t); uintptr_t frame_size = args_size + 4*sizeof(uintptr_t); - make_aligned_room_for_bytes(spp, frame_size); + + // NB: Darwin needs "16-byte aligned" stacks *at the point of the call + // instruction in the caller*. This means that the address at which the + // word before retpc is pushed must always be 16-byte aligned. + // + // see: "Mac OS X ABI Function Call Guide" + + make_aligned_room_for_bytes(spp, frame_size - sizeof(uintptr_t)); // Copy args from spawner to spawnee. uintptr_t *src = (uintptr_t *)args; @@ -295,9 +295,9 @@ rust_task::start_rustc(uintptr_t exit_task_glue, *spp-- = (uintptr_t) this; // task *spp-- = (uintptr_t) dummy_ret; // output address + I(dom, spp == align_down(spp)); *spp-- = (uintptr_t) (uintptr_t) spawnee_fn; - I(dom, spp == align_down(spp)); *spp-- = (uintptr_t) 0x0; // retp |
