Skip to content

Commit 65335df

Browse files
author
Eric Holk
committed
---
yaml --- r: 3137 b: refs/heads/master c: 260aa40 h: refs/heads/master i: 3135: 9f7c8cf v: v3
1 parent bca2cd9 commit 65335df

File tree

6 files changed

+27
-10
lines changed

6 files changed

+27
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 97765561a24412c99485fba7491e5898c7459791
2+
refs/heads/master: 260aa408f390cf457eb19507fc80ec388a039f8e

trunk/src/comp/middle/trans.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5932,7 +5932,8 @@ fn mk_spawn_wrapper(&@block_ctxt cx, &@ast::expr func, &ty::t args_ty) ->
59325932
let str wrap_name =
59335933
mangle_internal_name_by_path_and_seq(cx.fcx.lcx.ccx, cx.fcx.lcx.path,
59345934
"spawn_wrapper");
5935-
auto llfndecl = decl_fastcall_fn(llmod, wrap_name, wrapper_fn_type);
5935+
auto llfndecl = decl_cdecl_fn(llmod, wrap_name, wrapper_fn_type);
5936+
59365937
auto fcx = new_fn_ctxt(cx.fcx.lcx, cx.sp, llfndecl);
59375938
auto fbcx = new_top_block_ctxt(fcx);
59385939
// 3u to skip the three implicit args

trunk/src/rt/main.ll.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ declare i32 @rust_start(i32, i32, i32, i32)
1616

1717
%task = type { i32, i32, i32, i32, i32, i32, i32, i32 }
1818

19+
define void @_rust_main_wrap(i1* nocapture, %task *, %2* nocapture, %5 *)
20+
{
21+
tail call fastcc void @_rust_main(i1* %0, %task *%1, %2* nocapture %2, %5 *%3)
22+
ret void
23+
}
24+
1925
define i32 @"MAIN"(i32, i32) {
20-
%3 = tail call i32 @rust_start(i32 ptrtoint (void (i1*, %task*, %2*, %5*)* @_rust_main to i32), i32 %0, i32 %1, i32 ptrtoint (%0* @_rust_crate_map_toplevel to i32))
26+
%3 = tail call i32 @rust_start(i32 ptrtoint (void (i1*, %task*, %2*, %5*)* @_rust_main_wrap to i32), i32 %0, i32 %1, i32 ptrtoint (%0* @_rust_crate_map_toplevel to i32))
2127
ret i32 %3
2228
}

trunk/src/rt/rust.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,7 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
9393
DLOG(dom, dom, "startup: arg[%d] = '%s'", i, args->argv[i]);
9494
}
9595

96-
/*
97-
uintptr_t main_args[4] = {0, 0, 0, (uintptr_t)args->args};
98-
dom->root_task->start(main_fn,
99-
(uintptr_t)&main_args, sizeof(main_args));
100-
*/
101-
dom->root_task->start(main_fn,
96+
dom->root_task->start(main_fn,
10297
(uintptr_t)args->args, sizeof(args->args));
10398

10499
int ret = dom->start_main_loop();

trunk/src/rt/rust_task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct spawn_args {
118118
rust_task *task;
119119
uintptr_t a3;
120120
uintptr_t a4;
121-
void (*FASTCALL f)(int *, rust_task *,
121+
void (*CDECL f)(int *, rust_task *,
122122
uintptr_t, uintptr_t);
123123
};
124124

trunk/src/snapshots.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
S 2011-06-15 02018fe
2+
linux-i386 74661121d9ea02881abd77e488f448038268c4df
3+
macos-i386 4942eeb8897d75cbdb8cf15bef3b9bc941bc9f34
4+
winnt-i386 b8cf72007bf751062de0802984e7e5a68b66ae61
5+
6+
S 2011-06-15 92bd350
7+
linux-i386 145b68488a780623cc31c5e043c6770007273f80
8+
macos-i386 d3149431f12603927bb211f53f8572fc188eb7d2
9+
winnt-i386 8ee37c22195ce180961db1fad013a0743cf97cdd
10+
11+
S 2011-06-15 01ea27b
12+
linux-i386 10a8fe7ed1ea30508a06f2e883e2177e14af7b1c
13+
macos-i386 d431f6e57c331c12fd1ec0ffcb2f567ef5e22c35
14+
winnt-i386 096e4dd5ddfef37f9e3c3cb55037041b2198cc9a
15+
116
S 2011-06-14 c3015b8
217
linux-i386 b091d33519a1bbf6cf12ee1954a1607940ae3915
318
macos-i386 7d47cece095a7b30f5a3e2467417652d3b2353e5

0 commit comments

Comments
 (0)