aboutsummaryrefslogtreecommitdiff
path: root/src/comp/back
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2011-03-16 18:06:09 -0400
committerRafael Ávila de Espíndola <[email protected]>2011-03-16 18:09:12 -0400
commit9dc3f3f18371144daef8cfadb0bb9fce61c7b463 (patch)
treea6717f328b28d9c6594e0a0372f5e19ed5cdba0c /src/comp/back
parentSwitch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tw... (diff)
downloadrust-9dc3f3f18371144daef8cfadb0bb9fce61c7b463.tar.xz
rust-9dc3f3f18371144daef8cfadb0bb9fce61c7b463.zip
Fixed version of my previous patch to rename the upcall functions. This time also update the inline assembly.
Diffstat (limited to 'src/comp/back')
-rw-r--r--src/comp/back/x86.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/back/x86.rs b/src/comp/back/x86.rs
index 0ed79db4..345603bb 100644
--- a/src/comp/back/x86.rs
+++ b/src/comp/back/x86.rs
@@ -212,10 +212,10 @@ fn upcall_glue(int n_args) -> vec[str] {
+ store_esp_to_rust_sp_second_arg()
+ load_esp_from_runtime_sp_second_arg()
- + vec("subl $" + wstr(n_args + 1) + ", %esp # esp -= args",
+ + vec("subl $" + wstr(n_args) + ", %esp # esp -= args",
"andl $~0xf, %esp # align esp down")
- + _vec.init_fn[str](carg, (n_args + 1) as uint)
+ + _vec.init_fn[str](carg, (n_args) as uint)
+ vec("movl %edx, %edi # save task from edx to edi",
"call *%ecx # call *%ecx",
@@ -268,7 +268,7 @@ fn get_module_asm() -> str {
rust_yield_glue()))
+ _vec.init_fn[str](bind decl_upcall_glue(align, prefix, _),
- abi.n_upcall_glues as uint);
+ (abi.n_upcall_glues + 1) as uint);
ret _str.connect(glues, "\n\n");
}