From 9dc3f3f18371144daef8cfadb0bb9fce61c7b463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Wed, 16 Mar 2011 18:06:09 -0400 Subject: Fixed version of my previous patch to rename the upcall functions. This time also update the inline assembly. --- src/comp/back/x86.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/comp/back') 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"); } -- cgit v1.2.3