]> git.lizzy.rs Git - rust.git/blob - src/librustc_back/mipsel.rs
auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
[rust.git] / src / librustc_back / mipsel.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 use target_strs;
12 use syntax::abi;
13
14 pub fn get_target_strs(target_triple: String, target_os: abi::Os) -> target_strs::t {
15     return target_strs::t {
16         module_asm: "".to_string(),
17
18         data_layout: match target_os {
19           abi::OsMacos => {
20             "e-p:32:32:32\
21                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
22                 -f32:32:32-f64:64:64\
23                 -v64:64:64-v128:64:128\
24                 -a0:0:64-n32".to_string()
25           }
26
27           abi::OsiOS => {
28             "e-p:32:32:32\
29                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
30                 -f32:32:32-f64:64:64\
31                 -v64:64:64-v128:64:128\
32                 -a0:0:64-n32".to_string()
33           }
34
35           abi::OsWin32 => {
36             "e-p:32:32:32\
37                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
38                 -f32:32:32-f64:64:64\
39                 -v64:64:64-v128:64:128\
40                 -a0:0:64-n32".to_string()
41           }
42
43           abi::OsLinux => {
44             "e-p:32:32:32\
45                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
46                 -f32:32:32-f64:64:64\
47                 -v64:64:64-v128:64:128\
48                 -a0:0:64-n32".to_string()
49           }
50
51           abi::OsAndroid => {
52             "e-p:32:32:32\
53                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
54                 -f32:32:32-f64:64:64\
55                 -v64:64:64-v128:64:128\
56                 -a0:0:64-n32".to_string()
57           }
58
59           abi::OsFreebsd | abi::OsDragonfly => {
60             "e-p:32:32:32\
61                 -i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64\
62                 -f32:32:32-f64:64:64\
63                 -v64:64:64-v128:64:128\
64                 -a0:0:64-n32".to_string()
65           }
66         },
67
68         target_triple: target_triple,
69
70         cc_args: Vec::new(),
71     };
72 }