@@ -7,21 +7,27 @@ extern "unadjusted" {
7
7
}
8
8
9
9
/// See [`prefetch`](fn._prefetch.html).
10
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
10
11
pub const _PREFETCH_READ: i32 = 0 ;
11
12
12
13
/// See [`prefetch`](fn._prefetch.html).
14
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
13
15
pub const _PREFETCH_WRITE: i32 = 1 ;
14
16
15
17
/// See [`prefetch`](fn._prefetch.html).
18
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
16
19
pub const _PREFETCH_LOCALITY0: i32 = 0 ;
17
20
18
21
/// See [`prefetch`](fn._prefetch.html).
22
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
19
23
pub const _PREFETCH_LOCALITY1: i32 = 1 ;
20
24
21
25
/// See [`prefetch`](fn._prefetch.html).
26
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
22
27
pub const _PREFETCH_LOCALITY2: i32 = 2 ;
23
28
24
29
/// See [`prefetch`](fn._prefetch.html).
30
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
25
31
pub const _PREFETCH_LOCALITY3: i32 = 3 ;
26
32
27
33
/// Fetch the cache line that contains address `p` using the given `RW` and `LOCALITY`.
@@ -64,6 +70,7 @@ pub const _PREFETCH_LOCALITY3: i32 = 3;
64
70
#[ cfg_attr( test, assert_instr( "prfm pstl2keep" , RW = _PREFETCH_WRITE, LOCALITY = _PREFETCH_LOCALITY2) ) ]
65
71
#[ cfg_attr( test, assert_instr( "prfm pstl1keep" , RW = _PREFETCH_WRITE, LOCALITY = _PREFETCH_LOCALITY3) ) ]
66
72
#[ rustc_legacy_const_generics( 1 , 2 ) ]
73
+ #[ unstable( feature = "stdarch_aarch64_prefetch" , issue = "117217" ) ]
67
74
// FIXME: Replace this with the standard ACLE __pld/__pldx/__pli/__plix intrinsics
68
75
pub unsafe fn _prefetch < const RW : i32 , const LOCALITY : i32 > ( p : * const i8 ) {
69
76
// We use the `llvm.prefetch` intrinsic with `cache type` = 1 (data cache).
0 commit comments