Rollup merge of #117170 - he32:netbsd-i586, r=bjorn3
Add support for i586-unknown-netbsd as target. This restricts instructions to those offered by Pentium, to support e.g. AMD Geode. There is already an entry for this target in the NetBSD platform support page at src/doc/rustc/src/platform-support/netbsd.md ...so this should forestall its removal. Additional fixes are needed for some vendored modules, this is the changes in the rust compiler core itself.
This commit is contained in:
commit
78b04b54f8
4 changed files with 26 additions and 0 deletions
18
compiler/rustc_target/src/spec/i586_unknown_netbsd.rs
Normal file
18
compiler/rustc_target/src/spec/i586_unknown_netbsd.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
use crate::spec::{StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut base = super::netbsd_base::opts();
|
||||
base.cpu = "pentium".into();
|
||||
base.max_atomic_width = Some(64);
|
||||
base.stack_probes = StackProbeType::Call;
|
||||
|
||||
Target {
|
||||
llvm_target: "i586-unknown-netbsdelf".into(),
|
||||
pointer_width: 32,
|
||||
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
|
||||
f64:32:64-f80:32-n8:16:32-S128"
|
||||
.into(),
|
||||
arch: "x86".into(),
|
||||
options: TargetOptions { mcount: "__mcount".into(), ..base },
|
||||
}
|
||||
}
|
|
@ -1564,6 +1564,7 @@ supported_targets! {
|
|||
("aarch64_be-unknown-netbsd", aarch64_be_unknown_netbsd),
|
||||
("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),
|
||||
("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
|
||||
("i586-unknown-netbsd", i586_unknown_netbsd),
|
||||
("i686-unknown-netbsd", i686_unknown_netbsd),
|
||||
("powerpc-unknown-netbsd", powerpc_unknown_netbsd),
|
||||
("riscv64gc-unknown-netbsd", riscv64gc_unknown_netbsd),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue