@@ -261,7 +261,7 @@ pub unsafe fn atomic_fence<const ORD: AtomicOrdering>();
261
261
pub unsafe fn atomic_singlethreadfence < const ORD : AtomicOrdering > ( ) ;
262
262
263
263
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
264
- /// if supported; otherwise, it is a no-op.
264
+ /// for the given address if supported; otherwise, it is a no-op.
265
265
/// Prefetches have no effect on the behavior of the program but can change its performance
266
266
/// characteristics.
267
267
///
@@ -271,9 +271,15 @@ pub unsafe fn atomic_singlethreadfence<const ORD: AtomicOrdering>();
271
271
/// This intrinsic does not have a stable counterpart.
272
272
#[ rustc_intrinsic]
273
273
#[ rustc_nounwind]
274
- pub unsafe fn prefetch_read_data < T > ( data : * const T , locality : i32 ) ;
274
+ #[ miri:: intrinsic_fallback_is_spec]
275
+ pub unsafe fn prefetch_read_data < T > ( data : * const T , locality : i32 ) {
276
+ // This operation is a no-op, unless it is overridden by the backend.
277
+ let _ = data;
278
+ let _ = locality;
279
+ }
280
+
275
281
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
276
- /// if supported; otherwise, it is a no-op.
282
+ /// for the given address if supported; otherwise, it is a no-op.
277
283
/// Prefetches have no effect on the behavior of the program but can change its performance
278
284
/// characteristics.
279
285
///
@@ -283,9 +289,15 @@ pub unsafe fn prefetch_read_data<T>(data: *const T, locality: i32);
283
289
/// This intrinsic does not have a stable counterpart.
284
290
#[ rustc_intrinsic]
285
291
#[ rustc_nounwind]
286
- pub unsafe fn prefetch_write_data < T > ( data : * const T , locality : i32 ) ;
292
+ #[ miri:: intrinsic_fallback_is_spec]
293
+ pub unsafe fn prefetch_write_data < T > ( data : * const T , locality : i32 ) {
294
+ // This operation is a no-op, unless it is overridden by the backend.
295
+ let _ = data;
296
+ let _ = locality;
297
+ }
298
+
287
299
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
288
- /// if supported; otherwise, it is a no-op.
300
+ /// for the given address if supported; otherwise, it is a no-op.
289
301
/// Prefetches have no effect on the behavior of the program but can change its performance
290
302
/// characteristics.
291
303
///
@@ -295,9 +307,15 @@ pub unsafe fn prefetch_write_data<T>(data: *const T, locality: i32);
295
307
/// This intrinsic does not have a stable counterpart.
296
308
#[ rustc_intrinsic]
297
309
#[ rustc_nounwind]
298
- pub unsafe fn prefetch_read_instruction < T > ( data : * const T , locality : i32 ) ;
310
+ #[ miri:: intrinsic_fallback_is_spec]
311
+ pub unsafe fn prefetch_read_instruction < T > ( data : * const T , locality : i32 ) {
312
+ // This operation is a no-op, unless it is overridden by the backend.
313
+ let _ = data;
314
+ let _ = locality;
315
+ }
316
+
299
317
/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
300
- /// if supported; otherwise, it is a no-op.
318
+ /// for the given address if supported; otherwise, it is a no-op.
301
319
/// Prefetches have no effect on the behavior of the program but can change its performance
302
320
/// characteristics.
303
321
///
@@ -307,7 +325,12 @@ pub unsafe fn prefetch_read_instruction<T>(data: *const T, locality: i32);
307
325
/// This intrinsic does not have a stable counterpart.
308
326
#[ rustc_intrinsic]
309
327
#[ rustc_nounwind]
310
- pub unsafe fn prefetch_write_instruction < T > ( data : * const T , locality : i32 ) ;
328
+ #[ miri:: intrinsic_fallback_is_spec]
329
+ pub unsafe fn prefetch_write_instruction < T > ( data : * const T , locality : i32 ) {
330
+ // This operation is a no-op, unless it is overridden by the backend.
331
+ let _ = data;
332
+ let _ = locality;
333
+ }
311
334
312
335
/// Executes a breakpoint trap, for inspection by a debugger.
313
336
///
0 commit comments