@@ -65,7 +65,7 @@ macro_rules! atomic_binop_return_old {
65
65
let old = $fx. bcx. ins( ) . load( clif_ty, MemFlags :: new( ) , $ptr, 0 ) ;
66
66
let new = $fx. bcx. ins( ) . $op( old, $src) ;
67
67
$fx. bcx. ins( ) . store( MemFlags :: new( ) , new, $ptr, 0 ) ;
68
- $ret. write_cvalue( $fx, CValue :: ByVal ( old, $fx. layout_of( $T) ) ) ;
68
+ $ret. write_cvalue( $fx, CValue :: by_val ( old, $fx. layout_of( $T) ) ) ;
69
69
} ;
70
70
}
71
71
@@ -82,7 +82,7 @@ macro_rules! atomic_minmax {
82
82
// Write new
83
83
$fx. bcx. ins( ) . store( MemFlags :: new( ) , new, $ptr, 0 ) ;
84
84
85
- let ret_val = CValue :: ByVal ( old, $ret. layout( ) ) ;
85
+ let ret_val = CValue :: by_val ( old, $ret. layout( ) ) ;
86
86
$ret. write_cvalue( $fx, ret_val) ;
87
87
} ;
88
88
}
@@ -165,7 +165,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
165
165
. ins( )
166
166
. iconst( fx. pointer_type, layout. size. bytes( ) as i64 )
167
167
} ;
168
- ret. write_cvalue( fx, CValue :: ByVal ( size, usize_layout) ) ;
168
+ ret. write_cvalue( fx, CValue :: by_val ( size, usize_layout) ) ;
169
169
} ;
170
170
min_align_of, <T > ( ) {
171
171
let min_align = fx. layout_of( T ) . align. abi. bytes( ) ;
@@ -184,7 +184,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
184
184
. ins( )
185
185
. iconst( fx. pointer_type, layout. align. abi. bytes( ) as i64 )
186
186
} ;
187
- ret. write_cvalue( fx, CValue :: ByVal ( align, usize_layout) ) ;
187
+ ret. write_cvalue( fx, CValue :: by_val ( align, usize_layout) ) ;
188
188
} ;
189
189
type_id, <T > ( ) {
190
190
let type_id = fx. tcx. type_id_hash( T ) ;
@@ -312,12 +312,12 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
312
312
rotate_left, <T >( v x, v y) {
313
313
let layout = fx. layout_of( T ) ;
314
314
let res = fx. bcx. ins( ) . rotl( x, y) ;
315
- ret. write_cvalue( fx, CValue :: ByVal ( res, layout) ) ;
315
+ ret. write_cvalue( fx, CValue :: by_val ( res, layout) ) ;
316
316
} ;
317
317
rotate_right, <T >( v x, v y) {
318
318
let layout = fx. layout_of( T ) ;
319
319
let res = fx. bcx. ins( ) . rotr( x, y) ;
320
- ret. write_cvalue( fx, CValue :: ByVal ( res, layout) ) ;
320
+ ret. write_cvalue( fx, CValue :: by_val ( res, layout) ) ;
321
321
} ;
322
322
323
323
// The only difference between offset and arith_offset is regarding UB. Because Cranelift
@@ -328,7 +328,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
328
328
let ptr_diff = fx. bcx. ins( ) . imul_imm( offset, pointee_size as i64 ) ;
329
329
let base_val = base. load_scalar( fx) ;
330
330
let res = fx. bcx. ins( ) . iadd( base_val, ptr_diff) ;
331
- ret. write_cvalue( fx, CValue :: ByVal ( res, args[ 0 ] . layout( ) ) ) ;
331
+ ret. write_cvalue( fx, CValue :: by_val ( res, args[ 0 ] . layout( ) ) ) ;
332
332
} ;
333
333
334
334
transmute, <src_ty, dst_ty> ( c from) {
@@ -386,19 +386,19 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
386
386
ret. write_cvalue( fx, uninit_val) ;
387
387
} ;
388
388
ctlz | ctlz_nonzero, <T > ( v arg) {
389
- let res = CValue :: ByVal ( fx. bcx. ins( ) . clz( arg) , fx. layout_of( T ) ) ;
389
+ let res = CValue :: by_val ( fx. bcx. ins( ) . clz( arg) , fx. layout_of( T ) ) ;
390
390
ret. write_cvalue( fx, res) ;
391
391
} ;
392
392
cttz | cttz_nonzero, <T > ( v arg) {
393
- let res = CValue :: ByVal ( fx. bcx. ins( ) . ctz( arg) , fx. layout_of( T ) ) ;
393
+ let res = CValue :: by_val ( fx. bcx. ins( ) . ctz( arg) , fx. layout_of( T ) ) ;
394
394
ret. write_cvalue( fx, res) ;
395
395
} ;
396
396
ctpop, <T > ( v arg) {
397
- let res = CValue :: ByVal ( fx. bcx. ins( ) . popcnt( arg) , fx. layout_of( T ) ) ;
397
+ let res = CValue :: by_val ( fx. bcx. ins( ) . popcnt( arg) , fx. layout_of( T ) ) ;
398
398
ret. write_cvalue( fx, res) ;
399
399
} ;
400
400
bitreverse, <T > ( v arg) {
401
- let res = CValue :: ByVal ( fx. bcx. ins( ) . bitrev( arg) , fx. layout_of( T ) ) ;
401
+ let res = CValue :: by_val ( fx. bcx. ins( ) . bitrev( arg) , fx. layout_of( T ) ) ;
402
402
ret. write_cvalue( fx, res) ;
403
403
} ;
404
404
needs_drop, <T > ( ) {
@@ -433,7 +433,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
433
433
// Read old
434
434
let clif_ty = fx. clif_type( T ) . unwrap( ) ;
435
435
let old = fx. bcx. ins( ) . load( clif_ty, MemFlags :: new( ) , ptr, 0 ) ;
436
- ret. write_cvalue( fx, CValue :: ByVal ( old, fx. layout_of( T ) ) ) ;
436
+ ret. write_cvalue( fx, CValue :: by_val ( old, fx. layout_of( T ) ) ) ;
437
437
438
438
// Write new
439
439
let dest = CPlace :: Addr ( ptr, None , src. layout( ) ) ;
0 commit comments