@@ -244,8 +244,11 @@ fn ptr_offset_from() {
244
244
check_number (
245
245
r#"
246
246
//- minicore: index, slice, coerce_unsized
247
+
247
248
#[rustc_intrinsic]
248
249
pub unsafe fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
250
+
251
+ #[rustc_intrinsic]
249
252
pub unsafe fn ptr_offset_from_unsigned<T>(ptr: *const T, base: *const T) -> usize;
250
253
251
254
const GOAL: isize = {
@@ -402,9 +405,14 @@ fn floating_point() {
402
405
// FIXME(#17451): Add `f16` and `f128` tests once intrinsics are added.
403
406
check_number (
404
407
r#"
408
+
405
409
#[rustc_intrinsic]
406
410
pub unsafe fn sqrtf32(x: f32) -> f32;
411
+
412
+ #[rustc_intrinsic]
407
413
pub unsafe fn powf32(a: f32, x: f32) -> f32;
414
+
415
+ #[rustc_intrinsic]
408
416
pub unsafe fn fmaf32(a: f32, b: f32, c: f32) -> f32;
409
417
410
418
const GOAL: f32 = sqrtf32(1.2) + powf32(3.4, 5.6) + fmaf32(-7.8, 1.3, 2.4);
@@ -417,9 +425,14 @@ fn floating_point() {
417
425
#[ allow( unknown_lints, clippy:: unnecessary_min_or_max) ]
418
426
check_number (
419
427
r#"
428
+
420
429
#[rustc_intrinsic]
421
430
pub unsafe fn powif64(a: f64, x: i32) -> f64;
431
+
432
+ #[rustc_intrinsic]
422
433
pub unsafe fn sinf64(x: f64) -> f64;
434
+
435
+ #[rustc_intrinsic]
423
436
pub unsafe fn minnumf64(x: f64, y: f64) -> f64;
424
437
425
438
const GOAL: f64 = powif64(1.2, 5) + sinf64(3.4) + minnumf64(-7.8, 1.3);
@@ -436,19 +449,44 @@ fn atomic() {
436
449
check_number (
437
450
r#"
438
451
//- minicore: copy
452
+
439
453
#[rustc_intrinsic]
440
454
pub unsafe fn atomic_load_seqcst<T: Copy>(src: *const T) -> T;
455
+
456
+ #[rustc_intrinsic]
441
457
pub unsafe fn atomic_xchg_acquire<T: Copy>(dst: *mut T, src: T) -> T;
458
+
459
+ #[rustc_intrinsic]
442
460
pub unsafe fn atomic_cxchg_release_seqcst<T: Copy>(dst: *mut T, old: T, src: T) -> (T, bool);
461
+
462
+ #[rustc_intrinsic]
443
463
pub unsafe fn atomic_cxchgweak_acquire_acquire<T: Copy>(dst: *mut T, old: T, src: T) -> (T, bool);
464
+
465
+ #[rustc_intrinsic]
444
466
pub unsafe fn atomic_store_release<T: Copy>(dst: *mut T, val: T);
467
+
468
+ #[rustc_intrinsic]
445
469
pub unsafe fn atomic_xadd_acqrel<T: Copy>(dst: *mut T, src: T) -> T;
470
+
471
+ #[rustc_intrinsic]
446
472
pub unsafe fn atomic_xsub_seqcst<T: Copy>(dst: *mut T, src: T) -> T;
473
+
474
+ #[rustc_intrinsic]
447
475
pub unsafe fn atomic_and_acquire<T: Copy>(dst: *mut T, src: T) -> T;
476
+
477
+ #[rustc_intrinsic]
448
478
pub unsafe fn atomic_nand_seqcst<T: Copy>(dst: *mut T, src: T) -> T;
479
+
480
+ #[rustc_intrinsic]
449
481
pub unsafe fn atomic_or_release<T: Copy>(dst: *mut T, src: T) -> T;
482
+
483
+ #[rustc_intrinsic]
450
484
pub unsafe fn atomic_xor_seqcst<T: Copy>(dst: *mut T, src: T) -> T;
485
+
486
+ #[rustc_intrinsic]
451
487
pub unsafe fn atomic_fence_seqcst();
488
+
489
+ #[rustc_intrinsic]
452
490
pub unsafe fn atomic_singlethreadfence_acqrel();
453
491
454
492
fn should_not_reach() {
@@ -485,8 +523,11 @@ fn offset() {
485
523
check_number (
486
524
r#"
487
525
//- minicore: coerce_unsized, index, slice
526
+
488
527
#[rustc_intrinsic]
489
528
pub unsafe fn offset<Ptr, Delta>(dst: Ptr, offset: Delta) -> Ptr;
529
+
530
+ #[rustc_intrinsic]
490
531
pub unsafe fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
491
532
492
533
const GOAL: i32 = unsafe {
0 commit comments