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::*;
14
14
15
15
mod crypto;
16
16
pub 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;
42
42
dox
43
43
) ) ]
44
44
pub 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 2
2
3
3
mod msa;
4
4
pub 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 11
11
//! [llvm_docs]:
12
12
//! https://llvm.org/docs/NVPTXUsage.html
13
13
14
+ #[ cfg( test) ]
15
+ use stdsimd_test:: assert_instr;
16
+
14
17
#[ allow( improper_ctypes) ]
15
18
extern "C" {
16
19
#[ link_name = "llvm.nvvm.barrier0" ]
@@ -118,3 +121,10 @@ pub unsafe fn _thread_idx_y() -> i32 {
118
121
pub unsafe fn _thread_idx_z ( ) -> i32 {
119
122
thread_idx_z ( )
120
123
}
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::*;
7
7
8
8
mod vsx;
9
9
pub 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 {
38
38
39
39
pub mod atomic;
40
40
pub 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::*;
512
512
513
513
mod sha;
514
514
pub 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