forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS r6 is quite different with the previous version. It use some new target triples: mipsisa32r6-unknown-linux-gnu mipsisa32r6el-unknown-linux-gnu mipsisa64r6-unknown-linux-gnuabi64 mipsisa64r6el-unknown-linux-gnuabi64 This patch has been tested with Debian Port for mips64r6el, and the support of these triples also is included in llvm: https://reviews.llvm.org/rGe58c45a695f39004710b6ce940d489fee800dbd3
- Loading branch information
Showing
7 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; | ||
|
||
pub fn target() -> TargetResult { | ||
Ok(Target { | ||
llvm_target: "mipsisa32r6-unknown-linux-gnu".to_string(), | ||
target_endian: "big".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), | ||
arch: "mips".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "gnu".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
linker_flavor: LinkerFlavor::Gcc, | ||
options: TargetOptions { | ||
cpu: "mips32r6".to_string(), | ||
features: "+mips32r6".to_string(), | ||
max_atomic_width: Some(32), | ||
|
||
..super::linux_base::opts() | ||
}, | ||
}) | ||
} |
24 changes: 24 additions & 0 deletions
24
src/librustc_target/spec/mipsisa32r6el_unknown_linux_gnu.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; | ||
|
||
pub fn target() -> TargetResult { | ||
Ok(Target { | ||
llvm_target: "mipsisa32r6el-unknown-linux-gnu".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), | ||
arch: "mips".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "gnu".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
linker_flavor: LinkerFlavor::Gcc, | ||
|
||
options: TargetOptions { | ||
cpu: "mips32r6".to_string(), | ||
features: "+mips32r6".to_string(), | ||
max_atomic_width: Some(32), | ||
|
||
..super::linux_base::opts() | ||
}, | ||
}) | ||
} |
24 changes: 24 additions & 0 deletions
24
src/librustc_target/spec/mipsisa64r6_unknown_linux_gnuabi64.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; | ||
|
||
pub fn target() -> TargetResult { | ||
Ok(Target { | ||
llvm_target: "mipsisa64r6-unknown-linux-gnuabi64".to_string(), | ||
target_endian: "big".to_string(), | ||
target_pointer_width: "64".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), | ||
arch: "mips64".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "gnu".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
linker_flavor: LinkerFlavor::Gcc, | ||
options: TargetOptions { | ||
// NOTE(mips64r6) matches C toolchain | ||
cpu: "mips64r6".to_string(), | ||
features: "+mips64r6".to_string(), | ||
max_atomic_width: Some(64), | ||
|
||
..super::linux_base::opts() | ||
}, | ||
}) | ||
} |
24 changes: 24 additions & 0 deletions
24
src/librustc_target/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; | ||
|
||
pub fn target() -> TargetResult { | ||
Ok(Target { | ||
llvm_target: "mipsisa64r6el-unknown-linux-gnuabi64".to_string(), | ||
target_endian: "little".to_string(), | ||
target_pointer_width: "64".to_string(), | ||
target_c_int_width: "32".to_string(), | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), | ||
arch: "mips64".to_string(), | ||
target_os: "linux".to_string(), | ||
target_env: "gnu".to_string(), | ||
target_vendor: "unknown".to_string(), | ||
linker_flavor: LinkerFlavor::Gcc, | ||
options: TargetOptions { | ||
// NOTE(mips64r6) matches C toolchain | ||
cpu: "mips64r6".to_string(), | ||
features: "+mips64r6".to_string(), | ||
max_atomic_width: Some(64), | ||
|
||
..super::linux_base::opts() | ||
}, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters