diff options
| author | Graydon Hoare <[email protected]> | 2011-03-08 13:20:16 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-08 13:20:16 -0800 |
| commit | 27547c6514cf4f358ef2c8d935bd296eb0312ac1 (patch) | |
| tree | 94f4949ba5a65a56633e374aee0e1851b4f42ffc /src/comp | |
| parent | Move the glue asm code to a .o file. This reduces how much asm we print (diff) | |
| download | rust-27547c6514cf4f358ef2c8d935bd296eb0312ac1.tar.xz rust-27547c6514cf4f358ef2c8d935bd296eb0312ac1.zip | |
Revert "Move the glue asm code to a .o file. This reduces how much asm we print"
This reverts commit 55c80e763bfd850682b3217fcfc5cdb516eafae0.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/glue.rc | 37 | ||||
| -rw-r--r-- | src/comp/glue/glue.rs | 11 | ||||
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
3 files changed, 2 insertions, 48 deletions
diff --git a/src/comp/glue.rc b/src/comp/glue.rc deleted file mode 100644 index 1048341a..00000000 --- a/src/comp/glue.rc +++ /dev/null @@ -1,37 +0,0 @@ -// -*- rust -*- - -use std; - -mod front { - mod ast; -} - -mod middle { - mod ty; -} - -mod driver { - mod session; -} - -mod glue { - mod glue; -} - -mod back { - mod abi; - mod x86; -} - -mod util { - mod common; -} - - -// Local Variables: -// fill-column: 78; -// indent-tabs-mode: nil -// c-basic-offset: 4 -// buffer-file-coding-system: utf-8-unix -// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'"; -// End: diff --git a/src/comp/glue/glue.rs b/src/comp/glue/glue.rs deleted file mode 100644 index 96bdba76..00000000 --- a/src/comp/glue/glue.rs +++ /dev/null @@ -1,11 +0,0 @@ -import back.x86; -import std._str; -import std._vec; -import std.os.libc; - -fn main(vec[str] args) { - auto module_asm = x86.get_module_asm() + "\n"; - auto bytes = _str.bytes(module_asm); - auto b = _vec.buf[u8](bytes); - libc.write(1, b, _vec.len[u8](bytes)); -} diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index e4512a47..7457a532 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -5708,6 +5708,8 @@ fn trans_crate(session.session sess, @ast.crate crate, str output, let ValueRef crate_ptr = llvm.LLVMAddGlobal(llmod, T_crate(tn), _str.buf("rust_crate")); + llvm.LLVMSetModuleInlineAsm(llmod, _str.buf(x86.get_module_asm())); + auto intrinsics = declare_intrinsics(llmod); auto glues = make_glues(llmod, tn); |