@@ -65,7 +65,7 @@ macro_rules! atomic_binop_return_old {
6565 let old = $fx. bcx. ins( ) . load( clif_ty, MemFlags :: new( ) , $ptr, 0 ) ;
6666 let new = $fx. bcx. ins( ) . $op( old, $src) ;
6767 $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) ) ) ;
6969 } ;
7070}
7171
@@ -82,7 +82,7 @@ macro_rules! atomic_minmax {
8282 // Write new
8383 $fx. bcx. ins( ) . store( MemFlags :: new( ) , new, $ptr, 0 ) ;
8484
85- let ret_val = CValue :: ByVal ( old, $ret. layout( ) ) ;
85+ let ret_val = CValue :: by_val ( old, $ret. layout( ) ) ;
8686 $ret. write_cvalue( $fx, ret_val) ;
8787 } ;
8888}
@@ -165,7 +165,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
165165 . ins( )
166166 . iconst( fx. pointer_type, layout. size. bytes( ) as i64 )
167167 } ;
168- ret. write_cvalue( fx, CValue :: ByVal ( size, usize_layout) ) ;
168+ ret. write_cvalue( fx, CValue :: by_val ( size, usize_layout) ) ;
169169 } ;
170170 min_align_of, <T > ( ) {
171171 let min_align = fx. layout_of( T ) . align. abi. bytes( ) ;
@@ -184,7 +184,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
184184 . ins( )
185185 . iconst( fx. pointer_type, layout. align. abi. bytes( ) as i64 )
186186 } ;
187- ret. write_cvalue( fx, CValue :: ByVal ( align, usize_layout) ) ;
187+ ret. write_cvalue( fx, CValue :: by_val ( align, usize_layout) ) ;
188188 } ;
189189 type_id, <T > ( ) {
190190 let type_id = fx. tcx. type_id_hash( T ) ;
@@ -312,12 +312,12 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
312312 rotate_left, <T >( v x, v y) {
313313 let layout = fx. layout_of( T ) ;
314314 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) ) ;
316316 } ;
317317 rotate_right, <T >( v x, v y) {
318318 let layout = fx. layout_of( T ) ;
319319 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) ) ;
321321 } ;
322322
323323 // 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>(
328328 let ptr_diff = fx. bcx. ins( ) . imul_imm( offset, pointee_size as i64 ) ;
329329 let base_val = base. load_scalar( fx) ;
330330 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( ) ) ) ;
332332 } ;
333333
334334 transmute, <src_ty, dst_ty> ( c from) {
@@ -386,19 +386,19 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
386386 ret. write_cvalue( fx, uninit_val) ;
387387 } ;
388388 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 ) ) ;
390390 ret. write_cvalue( fx, res) ;
391391 } ;
392392 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 ) ) ;
394394 ret. write_cvalue( fx, res) ;
395395 } ;
396396 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 ) ) ;
398398 ret. write_cvalue( fx, res) ;
399399 } ;
400400 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 ) ) ;
402402 ret. write_cvalue( fx, res) ;
403403 } ;
404404 needs_drop, <T > ( ) {
@@ -433,7 +433,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
433433 // Read old
434434 let clif_ty = fx. clif_type( T ) . unwrap( ) ;
435435 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 ) ) ) ;
437437
438438 // Write new
439439 let dest = CPlace :: Addr ( ptr, None , src. layout( ) ) ;
0 commit comments