|
| 1 | +//! Bare MIPS32r2, little endian, softfloat, O32 calling convention |
| 2 | +//! |
| 3 | +//! Can be used for MIPS M4K core (e.g. on PIC32MX devices) |
| 4 | +
|
| 5 | +use crate::spec::abi::Abi; |
| 6 | +use crate::spec::{LinkerFlavor, LldFlavor, RelocModel}; |
| 7 | +use crate::spec::{PanicStrategy, Target, TargetOptions}; |
| 8 | + |
| 9 | +pub fn target() -> Target { |
| 10 | + Target { |
| 11 | + llvm_target: "mipsel-unknown-none".to_string(), |
| 12 | + target_endian: "little".to_string(), |
| 13 | + pointer_width: 32, |
| 14 | + target_c_int_width: "32".to_string(), |
| 15 | + data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), |
| 16 | + arch: "mips".to_string(), |
| 17 | + target_os: "none".to_string(), |
| 18 | + target_env: String::new(), |
| 19 | + target_vendor: String::new(), |
| 20 | + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), |
| 21 | + |
| 22 | + options: TargetOptions { |
| 23 | + cpu: "mips32r2".to_string(), |
| 24 | + features: "+mips32r2,+soft-float,+noabicalls".to_string(), |
| 25 | + max_atomic_width: Some(32), |
| 26 | + executables: true, |
| 27 | + linker: Some("rust-lld".to_owned()), |
| 28 | + panic_strategy: PanicStrategy::Abort, |
| 29 | + relocation_model: RelocModel::Static, |
| 30 | + unsupported_abis: vec![ |
| 31 | + Abi::Stdcall, |
| 32 | + Abi::Fastcall, |
| 33 | + Abi::Vectorcall, |
| 34 | + Abi::Thiscall, |
| 35 | + Abi::Win64, |
| 36 | + Abi::SysV64, |
| 37 | + ], |
| 38 | + emit_debug_gdb_scripts: false, |
| 39 | + ..Default::default() |
| 40 | + }, |
| 41 | + } |
| 42 | +} |
0 commit comments