mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
Merge pull request #3228 from rtfeldman/illegal_instruction_PENTIUM_N3700
WIP don't require avx, avx2, sse, sse4.2 on all x86-64
This commit is contained in:
commit
033efe33e5
5 changed files with 51 additions and 9 deletions
|
@ -254,7 +254,12 @@ fn fast_eat_spaces(state: &State) -> FastSpaceState {
|
|||
index += 1;
|
||||
|
||||
// try to use SIMD instructions explicitly
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
// run with RUSTFLAGS="-C target-cpu=native" to enable
|
||||
#[cfg(all(
|
||||
target_arch = "x86_64",
|
||||
target_feature = "sse2",
|
||||
target_feature = "sse4.2"
|
||||
))]
|
||||
{
|
||||
use std::arch::x86_64::*;
|
||||
|
||||
|
@ -287,7 +292,11 @@ fn fast_eat_spaces(state: &State) -> FastSpaceState {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
#[cfg(not(all(
|
||||
target_arch = "x86_64",
|
||||
target_feature = "sse2",
|
||||
target_feature = "sse4.2"
|
||||
)))]
|
||||
{
|
||||
while index < length {
|
||||
match bytes[index] {
|
||||
|
@ -431,7 +440,11 @@ fn eat_line_comment<'a>(
|
|||
|
||||
let loop_start = index;
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[cfg(all(
|
||||
target_arch = "x86_64",
|
||||
target_feature = "sse2",
|
||||
target_feature = "sse4.2"
|
||||
))]
|
||||
{
|
||||
use std::arch::x86_64::*;
|
||||
|
||||
|
@ -519,7 +532,11 @@ fn eat_line_comment<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
#[cfg(not(all(
|
||||
target_arch = "x86_64",
|
||||
target_feature = "sse2",
|
||||
target_feature = "sse4.2"
|
||||
)))]
|
||||
while index < length {
|
||||
match bytes[index] {
|
||||
b'\t' => unreachable!(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue