Rollup merge of #120820 - CKingX:cpu-base-minimum, r=petrochenkov,ChrisDenton
Enable CMPXCHG16B, SSE3, SAHF/LAHF and 128-bit Atomics (in nightly) in Windows x64 As Rust plans to set Windows 10 as the minimum supported OS for target x86_64-pc-windows-msvc, I have added the cmpxchg16b and sse3 feature. Windows 10 requires CMPXCHG16B, LAHF/SAHF, and PrefetchW as stated in the requirements [here](https://download.microsoft.com/download/c/1/5/c150e1ca-4a55-4a7e-94c5-bfc8c2e785c5/Windows%2010%20Minimum%20Hardware%20Requirements.pdf). Furthermore, CPUs that meet these requirements also have SSE3 ([see](https://walbourn.github.io/directxmath-sse3-and-ssse3/))
This commit is contained in:
commit
36bd9ef5a8
6 changed files with 11 additions and 6 deletions
|
@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, Target};
|
|||
pub fn target() -> Target {
|
||||
let mut base = base::windows_gnu::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.features = "+cx16,+sse3,+sahf".into();
|
||||
base.plt_by_default = false;
|
||||
// Use high-entropy 64 bit address space for ASLR
|
||||
base.add_pre_link_args(
|
||||
|
@ -10,7 +11,7 @@ pub fn target() -> Target {
|
|||
&["-m", "i386pep", "--high-entropy-va"],
|
||||
);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64", "-Wl,--high-entropy-va"]);
|
||||
base.max_atomic_width = Some(64);
|
||||
base.max_atomic_width = Some(128);
|
||||
base.linker = Some("x86_64-w64-mingw32-gcc".into());
|
||||
|
||||
Target {
|
||||
|
|
|
@ -3,9 +3,10 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, Target};
|
|||
pub fn target() -> Target {
|
||||
let mut base = base::windows_gnullvm::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.features = "+cx16,+sse3,+sahf".into();
|
||||
base.plt_by_default = false;
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
|
||||
base.max_atomic_width = Some(64);
|
||||
base.max_atomic_width = Some(128);
|
||||
base.linker = Some("x86_64-w64-mingw32-clang".into());
|
||||
|
||||
Target {
|
||||
|
|
|
@ -3,8 +3,9 @@ use crate::spec::{base, SanitizerSet, Target};
|
|||
pub fn target() -> Target {
|
||||
let mut base = base::windows_msvc::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.features = "+cx16,+sse3,+sahf".into();
|
||||
base.plt_by_default = false;
|
||||
base.max_atomic_width = Some(64);
|
||||
base.max_atomic_width = Some(128);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS;
|
||||
|
||||
Target {
|
||||
|
|
|
@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, Target};
|
|||
pub fn target() -> Target {
|
||||
let mut base = base::windows_uwp_gnu::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.features = "+cx16,+sse3,+sahf".into();
|
||||
base.plt_by_default = false;
|
||||
// Use high-entropy 64 bit address space for ASLR
|
||||
base.add_pre_link_args(
|
||||
|
@ -10,7 +11,7 @@ pub fn target() -> Target {
|
|||
&["-m", "i386pep", "--high-entropy-va"],
|
||||
);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64", "-Wl,--high-entropy-va"]);
|
||||
base.max_atomic_width = Some(64);
|
||||
base.max_atomic_width = Some(128);
|
||||
|
||||
Target {
|
||||
llvm_target: "x86_64-pc-windows-gnu".into(),
|
||||
|
|
|
@ -3,8 +3,9 @@ use crate::spec::{base, Target};
|
|||
pub fn target() -> Target {
|
||||
let mut base = base::windows_uwp_msvc::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.features = "+cx16,+sse3,+sahf".into();
|
||||
base.plt_by_default = false;
|
||||
base.max_atomic_width = Some(64);
|
||||
base.max_atomic_width = Some(128);
|
||||
|
||||
Target {
|
||||
llvm_target: "x86_64-pc-windows-msvc".into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue