diff options
Diffstat (limited to 'src/comp/back')
| -rw-r--r-- | src/comp/back/abi.rs | 12 | ||||
| -rw-r--r-- | src/comp/back/x86.rs | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/src/comp/back/abi.rs b/src/comp/back/abi.rs index 1a349a7b..ad4c066e 100644 --- a/src/comp/back/abi.rs +++ b/src/comp/back/abi.rs @@ -36,6 +36,18 @@ const int worst_case_glue_call_args = 7; const int n_upcall_glues = 7; +fn upcall_glue_name(int n) -> str { + ret "rust_upcall_" + util.common.istr(n); +} + +fn activate_glue_name() -> str { + ret "rust_activate_glue"; +} + +fn yield_glue_name() -> str { + ret "rust_yield_glue"; +} + // // Local Variables: // mode: rust diff --git a/src/comp/back/x86.rs b/src/comp/back/x86.rs index bfe50200..b3edcae6 100644 --- a/src/comp/back/x86.rs +++ b/src/comp/back/x86.rs @@ -121,7 +121,7 @@ fn decl_glue(int align, str prefix, str name, vec[str] insns) -> str { fn decl_upcall_glue(int align, str prefix, uint n) -> str { let int i = n as int; ret decl_glue(align, prefix, - "rust_upcall_" + istr(i), + abi.upcall_glue_name(i), upcall_glue(i)); } @@ -131,11 +131,11 @@ fn get_module_asm() -> str { auto glues = vec(decl_glue(align, prefix, - "rust_activate_glue", + abi.activate_glue_name(), rust_activate_glue()), decl_glue(align, prefix, - "rust_yield_glue", + abi.yield_glue_name(), rust_yield_glue())) + _vec.init_fn[str](bind decl_upcall_glue(align, prefix, _), |