Skip to content

Commit 27e037b

Browse files
authored
Update intrinsics table (rust-lang#1437)
* Update intrinsics table * Update trigonometry tests linked in documentation
1 parent e151d22 commit 27e037b

File tree

5 files changed

+59
-54
lines changed

5 files changed

+59
-54
lines changed

docs/src/rust-feature-support/intrinsics.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Name | Support | Notes |
1616
--- | --- | --- |
1717
abort | Yes | |
1818
add_with_overflow | Yes | |
19-
arith_offset | No | |
19+
arith_offset | Yes | |
2020
assert_inhabited | Yes | |
2121
assert_uninit_valid | Yes | |
2222
assert_zero_valid | Yes | |
@@ -52,16 +52,16 @@ atomic_load | Partial | See [Atomics](#atomics) |
5252
atomic_load_acq | Partial | See [Atomics](#atomics) |
5353
atomic_load_relaxed | Partial | See [Atomics](#atomics) |
5454
atomic_load_unordered | Partial | See [Atomics](#atomics) |
55-
atomic_max | No | See [Atomics](#atomics) |
56-
atomic_max_acq | No | See [Atomics](#atomics) |
57-
atomic_max_acqrel | No | See [Atomics](#atomics) |
58-
atomic_max_rel | No | See [Atomics](#atomics) |
59-
atomic_max_relaxed | No | See [Atomics](#atomics) |
60-
atomic_min | No | See [Atomics](#atomics) |
61-
atomic_min_acq | No | See [Atomics](#atomics) |
62-
atomic_min_acqrel | No | See [Atomics](#atomics) |
63-
atomic_min_rel | No | See [Atomics](#atomics) |
64-
atomic_min_relaxed | No | See [Atomics](#atomics) |
55+
atomic_max | Partial | See [Atomics](#atomics) |
56+
atomic_max_acq | Partial | See [Atomics](#atomics) |
57+
atomic_max_acqrel | Partial | See [Atomics](#atomics) |
58+
atomic_max_rel | Partial | See [Atomics](#atomics) |
59+
atomic_max_relaxed | Partial | See [Atomics](#atomics) |
60+
atomic_min | Partial | See [Atomics](#atomics) |
61+
atomic_min_acq | Partial | See [Atomics](#atomics) |
62+
atomic_min_acqrel | Partial | See [Atomics](#atomics) |
63+
atomic_min_rel | Partial | See [Atomics](#atomics) |
64+
atomic_min_relaxed | Partial | See [Atomics](#atomics) |
6565
atomic_nand | Partial | See [Atomics](#atomics) |
6666
atomic_nand_acq | Partial | See [Atomics](#atomics) |
6767
atomic_nand_acqrel | Partial | See [Atomics](#atomics) |
@@ -80,16 +80,16 @@ atomic_store | Partial | See [Atomics](#atomics) |
8080
atomic_store_rel | Partial | See [Atomics](#atomics) |
8181
atomic_store_relaxed | Partial | See [Atomics](#atomics) |
8282
atomic_store_unordered | Partial | See [Atomics](#atomics) |
83-
atomic_umax | No | See [Atomics](#atomics) |
84-
atomic_umax_acq | No | See [Atomics](#atomics) |
85-
atomic_umax_acqrel | No | See [Atomics](#atomics) |
86-
atomic_umax_rel | No | See [Atomics](#atomics) |
87-
atomic_umax_relaxed | No | See [Atomics](#atomics) |
88-
atomic_umin | No | See [Atomics](#atomics) |
89-
atomic_umin_acq | No | See [Atomics](#atomics) |
90-
atomic_umin_acqrel | No | See [Atomics](#atomics) |
91-
atomic_umin_rel | No | See [Atomics](#atomics) |
92-
atomic_umin_relaxed | No | See [Atomics](#atomics) |
83+
atomic_umax | Partial | See [Atomics](#atomics) |
84+
atomic_umax_acq | Partial | See [Atomics](#atomics) |
85+
atomic_umax_acqrel | Partial | See [Atomics](#atomics) |
86+
atomic_umax_rel | Partial | See [Atomics](#atomics) |
87+
atomic_umax_relaxed | Partial | See [Atomics](#atomics) |
88+
atomic_umin | Partial | See [Atomics](#atomics) |
89+
atomic_umin_acq | Partial | See [Atomics](#atomics) |
90+
atomic_umin_acqrel | Partial | See [Atomics](#atomics) |
91+
atomic_umin_rel | Partial | See [Atomics](#atomics) |
92+
atomic_umin_relaxed | Partial | See [Atomics](#atomics) |
9393
atomic_xadd | Partial | See [Atomics](#atomics) |
9494
atomic_xadd_acq | Partial | See [Atomics](#atomics) |
9595
atomic_xadd_acqrel | Partial | See [Atomics](#atomics) |
@@ -115,14 +115,14 @@ bitreverse | Yes | |
115115
breakpoint | Yes | |
116116
bswap | Yes | |
117117
caller_location | No | |
118-
ceilf32 | No | |
119-
ceilf64 | No | |
120-
copy | No | |
121-
copy_nonoverlapping | No | |
122-
copysignf32 | No | |
123-
copysignf64 | No | |
124-
cosf32 | Yes | |
125-
cosf64 | Yes | |
118+
ceilf32 | Yes | |
119+
ceilf64 | Yes | |
120+
copy | Yes | |
121+
copy_nonoverlapping | Yes | |
122+
copysignf32 | Yes | |
123+
copysignf64 | Yes | |
124+
cosf32 | Partial | Results are overapproximated; [this test](https://github.com/model-checking/kani/blob/main/tests/kani/Intrinsics/Math/Trigonometry/cosf32.rs) explains how |
125+
cosf64 | Partial | Results are overapproximated; [this test](https://github.com/model-checking/kani/blob/main/tests/kani/Intrinsics/Math/Trigonometry/cosf64.rs) explains how |
126126
ctlz | Yes | |
127127
ctlz_nonzero | Yes | |
128128
ctpop | Yes | |
@@ -140,8 +140,8 @@ fabsf64 | Yes | |
140140
fadd_fast | Yes | |
141141
fdiv_fast | Partial | [#809](https://github.com/model-checking/kani/issues/809) |
142142
float_to_int_unchecked | No | |
143-
floorf32 | No | |
144-
floorf64 | No | |
143+
floorf32 | Yes | |
144+
floorf64 | Yes | |
145145
fmaf32 | No | |
146146
fmaf64 | No | |
147147
fmul_fast | Partial | [#809](https://github.com/model-checking/kani/issues/809) |
@@ -155,16 +155,16 @@ log2f32 | No | |
155155
log2f64 | No | |
156156
logf32 | No | |
157157
logf64 | No | |
158-
maxnumf32 | No | |
159-
maxnumf64 | No | |
158+
maxnumf32 | Yes | |
159+
maxnumf64 | Yes | |
160160
min_align_of | Yes | |
161161
min_align_of_val | Yes | |
162-
minnumf32 | No | |
163-
minnumf64 | No | |
162+
minnumf32 | Yes | |
163+
minnumf64 | Yes | |
164164
move_val_init | No | |
165165
mul_with_overflow | Yes | |
166-
nearbyintf32 | No | |
167-
nearbyintf64 | No | |
166+
nearbyintf32 | Yes | |
167+
nearbyintf64 | Yes | |
168168
needs_drop | Yes | |
169169
nontemporal_store | No | |
170170
offset | Partial | Doesn't check [all UB conditions](https://doc.rust-lang.org/std/primitive.pointer.html#safety-2) |
@@ -181,25 +181,25 @@ ptr_guaranteed_eq | Yes | |
181181
ptr_guaranteed_ne | Yes | |
182182
ptr_offset_from | Partial | Doesn't check [all UB conditions](https://doc.rust-lang.org/std/primitive.pointer.html#safety-4) |
183183
raw_eq | Partial | Cannot detect [uninitialized memory](#uninitialized-memory) |
184-
rintf32 | No | |
185-
rintf64 | No | |
184+
rintf32 | Yes | |
185+
rintf64 | Yes | |
186186
rotate_left | Yes | |
187187
rotate_right | Yes | |
188-
roundf32 | No | |
189-
roundf64 | No | |
188+
roundf32 | Yes | |
189+
roundf64 | Yes | |
190190
rustc_peek | No | |
191191
saturating_add | Yes | |
192192
saturating_sub | Yes | |
193-
sinf32 | Yes | |
194-
sinf64 | Yes | |
193+
sinf32 | Partial | Results are overapproximated; [this test](https://github.com/model-checking/kani/blob/main/tests/kani/Intrinsics/Math/Trigonometry/sinf32.rs) explains how |
194+
sinf64 | Partial | Results are overapproximated; [this test](https://github.com/model-checking/kani/blob/main/tests/kani/Intrinsics/Math/Trigonometry/sinf64.rs) explains how |
195195
size_of | Yes | |
196196
size_of_val | Yes | |
197197
sqrtf32 | No | |
198198
sqrtf64 | No | |
199199
sub_with_overflow | Yes | |
200200
transmute | Partial | Doesn't check [all UB conditions](https://doc.rust-lang.org/nomicon/transmutes.html) |
201-
truncf32 | No | |
202-
truncf64 | No | |
201+
truncf32 | Yes | |
202+
truncf64 | Yes | |
203203
try | No | [#267](https://github.com/model-checking/kani/issues/267) |
204204
type_id | Yes | |
205205
type_name | Yes | |
@@ -217,7 +217,7 @@ unreachable | Yes | |
217217
variant_count | No | |
218218
volatile_copy_memory | No | See [Notes - Concurrency](#concurrency) |
219219
volatile_copy_nonoverlapping_memory | No | See [Notes - Concurrency](#concurrency) |
220-
volatile_load | No | See [Notes - Concurrency](#concurrency) |
220+
volatile_load | Partial | See [Notes - Concurrency](#concurrency) |
221221
volatile_set_memory | No | See [Notes - Concurrency](#concurrency) |
222222
volatile_store | Partial | See [Notes - Concurrency](#concurrency) |
223223
wrapping_add | Yes | |

tests/kani/Intrinsics/Math/Trigonometry/cosf32.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
// Check that `cosf32` returns the expected results.
5-
// Note: The CBMC model for this function is an over-approximation that returns:
6-
// * A nondet. value between -1 and 1
5+
//
6+
// The CBMC model for `cosf32` is an overapproximation that returns:
77
// * 1.0 if the argument is 0.0
8+
// * A symbolic value between -1.0 and 1.0 otherwise
89
#![feature(core_intrinsics)]
910

1011
fn fp_equals(value: f32, expected: f32) -> bool {

tests/kani/Intrinsics/Math/Trigonometry/cosf64.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
// Check that `cosf64` returns the expected results.
5-
// Note: The CBMC model for this function is an over-approximation that returns:
6-
// * A nondet. value between -1 and 1
5+
//
6+
// The CBMC model for `cosf64` is an overapproximation that returns:
77
// * 1.0 if the argument is 0.0
8+
// * A symbolic value between -1.0 and 1.0 otherwise
89
#![feature(core_intrinsics)]
910

1011
fn fp_equals(value: f64, expected: f64) -> bool {

tests/kani/Intrinsics/Math/Trigonometry/sinf32.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
// Check that `sinf32` returns the expected results.
5-
// Note: The CBMC model for this function is an over-approximation that returns:
6-
// * A nondet. value between -1 and 1
5+
6+
//
7+
// The CBMC model for `sinf32` is an overapproximation that returns:
78
// * 0.0 if the argument is 0.0
9+
// * A symbolic value between -1.0 and 1.0 otherwise
810
#![feature(core_intrinsics)]
911

1012
fn fp_equals(value: f32, expected: f32) -> bool {

tests/kani/Intrinsics/Math/Trigonometry/sinf64.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0 OR MIT
33

44
// Check that `sinf64` returns the expected results.
5-
// Note: The CBMC model for this function is an over-approximation that returns:
6-
// * A nondet. value between -1 and 1
5+
//
6+
// The CBMC model for `sinf64` is an overapproximation that returns:
77
// * 0.0 if the argument is 0.0
8+
// * A symbolic value between -1.0 and 1.0 otherwise
89
#![feature(core_intrinsics)]
910

1011
fn fp_equals(value: f64, expected: f64) -> bool {

0 commit comments

Comments
 (0)