Skip to content

Commit 0d8f468

Browse files
committed
test safe x86 intrinsics
1 parent d88ffcd commit 0d8f468

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
shallow = true
2121
[submodule "library/stdarch"]
2222
path = library/stdarch
23-
url = https://github.com/rust-lang/stdarch.git
23+
url = https://github.com/usamoi/stdarch.git
2424
shallow = true
2525
[submodule "src/doc/edition-guide"]
2626
path = src/doc/edition-guide

compiler/rustc_span/src/analyze_source_file.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ cfg_match! {
8787

8888
// For character in the chunk, see if its byte value is < 0, which
8989
// indicates that it's part of a UTF-8 char.
90-
let multibyte_test = unsafe { _mm_cmplt_epi8(chunk, _mm_set1_epi8(0)) };
90+
let multibyte_test = _mm_cmplt_epi8(chunk, _mm_set1_epi8(0));
9191
// Create a bit mask from the comparison results.
92-
let multibyte_mask = unsafe { _mm_movemask_epi8(multibyte_test) };
92+
let multibyte_mask = _mm_movemask_epi8(multibyte_test);
9393

9494
// If the bit mask is all zero, we only have ASCII chars here:
9595
if multibyte_mask == 0 {
9696
assert!(intra_chunk_offset == 0);
9797

9898
// Check for newlines in the chunk
99-
let newlines_test = unsafe { _mm_cmpeq_epi8(chunk, _mm_set1_epi8(b'\n' as i8)) };
100-
let mut newlines_mask = unsafe { _mm_movemask_epi8(newlines_test) };
99+
let newlines_test = _mm_cmpeq_epi8(chunk, _mm_set1_epi8(b'\n' as i8));
100+
let mut newlines_mask = _mm_movemask_epi8(newlines_test);
101101

102102
let output_offset = RelativeBytePos::from_usize(chunk_index * CHUNK_SIZE + 1);
103103

library/core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
#![feature(wasm_target_feature)]
217217
#![feature(x86_amx_intrinsics)]
218218
// tidy-alphabetical-end
219+
#![feature(target_feature_11)]
219220

220221
// allow using `core::` in intra-doc links
221222
#[allow(unused_extern_crates)]

library/stdarch

Submodule stdarch updated 167 files

0 commit comments

Comments
 (0)