aboutsummaryrefslogtreecommitdiff
path: root/src/comp/back
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-02-22 16:37:01 -0800
committerGraydon Hoare <[email protected]>2011-02-22 16:37:27 -0800
commitaf4d6ae76b05d4edb9d7074b971600a447c9c9a4 (patch)
tree20b65962db38b2c2cddd0eea9ba7563584fec0d0 /src/comp/back
parentRework typechecking of bind expressions (diff)
downloadrust-af4d6ae76b05d4edb9d7074b971600a447c9c9a4.tar.xz
rust-af4d6ae76b05d4edb9d7074b971600a447c9c9a4.zip
Add ABI tagging to crates, adjust rustc output and runtime stack-frame setup so access to argv works.
Diffstat (limited to 'src/comp/back')
-rw-r--r--src/comp/back/abi.rs3
-rw-r--r--src/comp/back/x86.rs4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/comp/back/abi.rs b/src/comp/back/abi.rs
index 82a85a6c..f41f6e20 100644
--- a/src/comp/back/abi.rs
+++ b/src/comp/back/abi.rs
@@ -60,6 +60,9 @@ const int worst_case_glue_call_args = 7;
const int n_upcall_glues = 7;
+const int abi_x86_rustboot_cdecl = 1;
+const int abi_x86_rustc_fastcall = 2;
+
fn memcpy_glue_name() -> str {
ret "rust_memcpy_glue";
}
diff --git a/src/comp/back/x86.rs b/src/comp/back/x86.rs
index 907cb32e..10227df7 100644
--- a/src/comp/back/x86.rs
+++ b/src/comp/back/x86.rs
@@ -98,12 +98,12 @@ fn rust_activate_glue() -> vec[str] {
* | esi |
* | ebx | <-- current task->rust_sp == current esp
*
- *
+ *
* This is a problem. If we return to "esp <- task->rust_sp" it
* will push esp back down by 5 words. This manifests as a rust
* stack that grows by 5 words on each yield/reactivate. Not
* good.
- *
+ *
* So what we do here is just adjust task->rust_sp up 5 words as
* well, to mirror the movement in esp we're about to
* perform. That way the "esp <- task->rust_sp" we 'ret' to below