Skip to content

Commit 277a0b5

Browse files
joshtriplettAmanieu
authored andcommitted
Remove ud2 intrinsic (in favor of asm! or abort as needed)
1 parent ea9b0a3 commit 277a0b5

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

crates/core_arch/src/x86/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -804,13 +804,6 @@ pub use self::adx::*;
804804
#[cfg(test)]
805805
use stdarch_test::assert_instr;
806806

807-
/// Generates the trap instruction `UD2`
808-
#[cfg_attr(test, assert_instr(ud2))]
809-
#[inline]
810-
pub unsafe fn ud2() -> ! {
811-
intrinsics::abort()
812-
}
813-
814807
mod avx512f;
815808
pub use self::avx512f::*;
816809

crates/stdarch-verify/tests/x86-intel.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ fn verify_all_signatures() {
261261
"_mm_setr_pi16",
262262
"_mm_setr_pi32",
263263
"_mm_setr_pi8",
264-
"ud2",
265264
"_mm_min_epi8",
266265
"_mm_min_epi32",
267266
"_xbegin",
@@ -332,11 +331,7 @@ fn verify_all_signatures() {
332331
"__cpuid" |
333332
"__get_cpuid_max" |
334333
// Not listed with intel, but manually verified
335-
"cmpxchg16b" |
336-
// The UD2 intrinsic is not defined by Intel, but it was agreed on
337-
// in the RFC Issue 2512:
338-
// https://github.com/rust-lang/rfcs/issues/2512
339-
"ud2"
334+
"cmpxchg16b"
340335
=> continue,
341336
// Intel requires the mask argument for _mm_shuffle_ps to be an
342337
// unsigned integer, but all other _mm_shuffle_.. intrinsics

0 commit comments

Comments
 (0)