compiler_builtins.rs (9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e) compiler_builtins.rs (89eed1ab1161e7d60595917e3b982e03dfcc0f8d)
1// SPDX-License-Identifier: GPL-2.0
2
3//! Our own `compiler_builtins`.
4//!
5//! Rust provides [`compiler_builtins`] as a port of LLVM's [`compiler-rt`].
6//! Since we do not need the vast majority of them, we avoid the dependency
7//! by providing this file.
8//!

--- 23 unchanged lines hidden (view full) ---

32 pub extern "C" fn $ident() {
33 panic!($reason);
34 }
35 )*
36 }
37);
38
39define_panicking_intrinsics!("`f32` should not be used", {
1// SPDX-License-Identifier: GPL-2.0
2
3//! Our own `compiler_builtins`.
4//!
5//! Rust provides [`compiler_builtins`] as a port of LLVM's [`compiler-rt`].
6//! Since we do not need the vast majority of them, we avoid the dependency
7//! by providing this file.
8//!

--- 23 unchanged lines hidden (view full) ---

32 pub extern "C" fn $ident() {
33 panic!($reason);
34 }
35 )*
36 }
37);
38
39define_panicking_intrinsics!("`f32` should not be used", {
40 __addsf3,
40 __eqsf2,
41 __gesf2,
42 __lesf2,
41 __eqsf2,
42 __gesf2,
43 __lesf2,
44 __ltsf2,
45 __mulsf3,
43 __nesf2,
44 __unordsf2,
45});
46
47define_panicking_intrinsics!("`f64` should not be used", {
46 __nesf2,
47 __unordsf2,
48});
49
50define_panicking_intrinsics!("`f64` should not be used", {
51 __adddf3,
52 __ledf2,
53 __ltdf2,
54 __muldf3,
48 __unorddf2,
49});
50
51define_panicking_intrinsics!("`i128` should not be used", {
52 __ashrti3,
53 __muloti4,
54 __multi3,
55});
56
57define_panicking_intrinsics!("`u128` should not be used", {
58 __ashlti3,
59 __lshrti3,
60 __udivmodti4,
61 __udivti3,
62 __umodti3,
63});
64
65// NOTE: if you are adding a new intrinsic here, you should also add it to
66// `redirect-intrinsics` in `rust/Makefile`.
55 __unorddf2,
56});
57
58define_panicking_intrinsics!("`i128` should not be used", {
59 __ashrti3,
60 __muloti4,
61 __multi3,
62});
63
64define_panicking_intrinsics!("`u128` should not be used", {
65 __ashlti3,
66 __lshrti3,
67 __udivmodti4,
68 __udivti3,
69 __umodti3,
70});
71
72// NOTE: if you are adding a new intrinsic here, you should also add it to
73// `redirect-intrinsics` in `rust/Makefile`.