rust/src/comp/back/x86.rs

42 lines
1.2 KiB
Rust
Raw Normal View History

import lib::llvm::llvm;
import lib::llvm::llvm::ModuleRef;
import std::str;
import std::os::target_os;
2011-09-02 17:34:58 -05:00
fn get_module_asm() -> str { ret ""; }
2011-09-02 17:34:58 -05:00
fn get_meta_sect_name() -> str {
if str::eq(target_os(), "macos") { ret "__DATA,__note.rustc"; }
if str::eq(target_os(), "win32") { ret ".note.rustc"; }
ret ".note.rustc";
}
2011-09-02 17:34:58 -05:00
fn get_data_layout() -> str {
if str::eq(target_os(), "macos") {
ret "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16" + "-i32:32:32-i64:32:64" +
"-f32:32:32-f64:32:64-v64:64:64" +
"-v128:128:128-a0:0:64-f80:128:128" + "-n8:16:32";
}
2011-09-02 17:34:58 -05:00
if str::eq(target_os(), "win32") {
ret "e-p:32:32-f64:64:64-i64:64:64-f80:32:32-n8:16:32";
}
2011-09-02 17:34:58 -05:00
ret "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32";
}
2011-09-02 17:34:58 -05:00
fn get_target_triple() -> str {
if str::eq(target_os(), "macos") { ret "i686-apple-darwin"; }
if str::eq(target_os(), "win32") { ret "i686-pc-mingw32"; }
ret "i686-unknown-linux-gnu";
}
//
// Local Variables:
// mode: rust
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
// End:
//