@@ -63,7 +63,7 @@ macro_rules! atomic_binop_return_old {
63
63
( $fx: expr, $op: ident<$T: ident>( $ptr: ident, $src: ident) -> $ret: ident) => {
64
64
let clif_ty = $fx. clif_type( $T) . unwrap( ) ;
65
65
let old = $fx. bcx. ins( ) . load( clif_ty, MemFlags :: new( ) , $ptr, 0 ) ;
66
- let new = $fx. bcx. ins( ) . band ( old, $src) ;
66
+ let new = $fx. bcx. ins( ) . $op ( old, $src) ;
67
67
$fx. bcx. ins( ) . store( MemFlags :: new( ) , new, $ptr, 0 ) ;
68
68
$ret. write_cvalue( $fx, CValue :: ByVal ( old, $fx. layout_of( $T) ) ) ;
69
69
} ;
@@ -465,7 +465,7 @@ pub fn codegen_intrinsic_call<'a, 'tcx: 'a>(
465
465
atomic_binop_return_old! ( fx, band<T >( ptr, src) -> ret) ;
466
466
} ;
467
467
_ if intrinsic. starts_with( "atomic_nand" ) , <T > ( v ptr, v src) {
468
- atomic_binop_return_old! ( fx, bnand <T >( ptr, src) -> ret) ;
468
+ atomic_binop_return_old! ( fx, band_not <T >( ptr, src) -> ret) ;
469
469
} ;
470
470
_ if intrinsic. starts_with( "atomic_or" ) , <T > ( v ptr, v src) {
471
471
atomic_binop_return_old! ( fx, bor<T >( ptr, src) -> ret) ;
0 commit comments