Skip to content

Commit 02f669c

Browse files
committed
Pass the task pointer as just another i32.
1 parent 10d8b4e commit 02f669c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/comp/middle/trans.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ fn decl_upcall_glue(ModuleRef llmod, type_names tn, uint _n) -> ValueRef {
832832
let str s = abi.upcall_glue_name(n);
833833
let vec[TypeRef] args =
834834
vec(T_int(), // callee
835-
T_taskptr(tn)) // taskptr
835+
T_int()) // taskptr
836836
+ _vec.init_elt[TypeRef](T_int(), n as uint);
837837

838838
ret decl_fastcall_fn(llmod, s, T_fn(args, T_int()));
@@ -856,7 +856,8 @@ fn trans_upcall(@block_ctxt cx, str name, vec[ValueRef] args) -> result {
856856
llupcall = llvm.LLVMConstPointerCast(llupcall, T_int());
857857

858858
let ValueRef llglue = cx.fcx.ccx.glues.upcall_glues.(n);
859-
let vec[ValueRef] call_args = vec(llupcall, cx.fcx.lltaskptr);
859+
let vec[ValueRef] call_args = vec(llupcall);
860+
call_args += cx.build.PtrToInt(cx.fcx.lltaskptr, T_int());
860861

861862
for (ValueRef a in args) {
862863
call_args += cx.build.ZExtOrBitCast(a, T_int());

0 commit comments

Comments
 (0)