File tree Expand file tree Collapse file tree 7 files changed +68
-0
lines changed
Expand file tree Collapse file tree 7 files changed +68
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,13 @@ pub use self::neon::*;
1414
1515mod crypto;
1616pub use self :: crypto:: * ;
17+
18+ #[ cfg( test) ]
19+ use stdsimd_test:: assert_instr;
20+
21+ /// Generates the trap instruction `BRK 1`
22+ #[ cfg_attr( test, assert_instr( brk) ) ]
23+ #[ inline]
24+ pub unsafe fn brk ( ) -> ! {
25+ :: _core:: intrinsics:: abort ( )
26+ }
Original file line number Diff line number Diff line change @@ -42,3 +42,14 @@ mod neon;
4242 dox
4343) ) ]
4444pub use self :: neon:: * ;
45+
46+ #[ cfg( test) ]
47+ use stdsimd_test:: assert_instr;
48+
49+ /// Generates the trap instruction `UDF`
50+ #[ cfg( target_arch = "arm" ) ]
51+ #[ cfg_attr( test, assert_instr( udf) ) ]
52+ #[ inline]
53+ pub unsafe fn udf ( ) -> ! {
54+ :: _core:: intrinsics:: abort ( )
55+ }
Original file line number Diff line number Diff line change 22
33mod msa;
44pub use self :: msa:: * ;
5+
6+ #[ cfg( test) ]
7+ use stdsimd_test:: assert_instr;
8+
9+ /// Generates the trap instruction `BREAK`
10+ #[ cfg_attr( test, assert_instr( break ) ) ]
11+ #[ inline]
12+ pub unsafe fn break_ ( ) -> ! {
13+ :: _core:: intrinsics:: abort ( )
14+ }
Original file line number Diff line number Diff line change 1111//! [llvm_docs]:
1212//! https://llvm.org/docs/NVPTXUsage.html
1313
14+ #[ cfg( test) ]
15+ use stdsimd_test:: assert_instr;
16+
1417#[ allow( improper_ctypes) ]
1518extern "C" {
1619 #[ link_name = "llvm.nvvm.barrier0" ]
@@ -118,3 +121,10 @@ pub unsafe fn _thread_idx_y() -> i32 {
118121pub unsafe fn _thread_idx_z ( ) -> i32 {
119122 thread_idx_z ( )
120123}
124+
125+ /// Generates the trap instruction `TRAP`
126+ #[ cfg_attr( test, assert_instr( trap) ) ]
127+ #[ inline]
128+ pub unsafe fn trap ( ) -> ! {
129+ :: _core:: intrinsics:: abort ( )
130+ }
Original file line number Diff line number Diff line change @@ -7,3 +7,13 @@ pub use self::altivec::*;
77
88mod vsx;
99pub use self :: vsx:: * ;
10+
11+ #[ cfg( test) ]
12+ use stdsimd_test:: assert_instr;
13+
14+ /// Generates the trap instruction `TRAP`
15+ #[ cfg_attr( test, assert_instr( trap) ) ]
16+ #[ inline]
17+ pub unsafe fn trap ( ) -> ! {
18+ :: _core:: intrinsics:: abort ( )
19+ }
Original file line number Diff line number Diff line change @@ -38,3 +38,10 @@ pub unsafe fn grow_memory(delta: i32) -> i32 {
3838
3939pub mod atomic;
4040pub mod memory;
41+
42+ /// Generates the trap instruction `UNREACHABLE`
43+ #[ cfg_attr( test, assert_instr( unreachable) ) ]
44+ #[ inline]
45+ pub unsafe fn unreachable ( ) -> ! {
46+ :: _core:: intrinsics:: abort ( )
47+ }
Original file line number Diff line number Diff line change @@ -512,3 +512,13 @@ pub use self::rdrand::*;
512512
513513mod sha;
514514pub use self :: sha:: * ;
515+
516+ #[ cfg( test) ]
517+ use stdsimd_test:: assert_instr;
518+
519+ /// Generates the trap instruction `UD2`
520+ #[ cfg_attr( test, assert_instr( ud2) ) ]
521+ #[ inline]
522+ pub unsafe fn ud2 ( ) -> ! {
523+ :: _core:: intrinsics:: abort ( )
524+ }
You can’t perform that action at this time.
0 commit comments