@@ -490,12 +490,12 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
490
490
unsafe {
491
491
llvm:: LLVMSetAlignment ( load, type_of:: align_of ( ccx, tp_ty) ) ;
492
492
}
493
- from_arg_ty ( bcx, load, tp_ty)
493
+ to_arg_ty ( bcx, load, tp_ty)
494
494
} ,
495
495
( _, "volatile_store" ) => {
496
496
let tp_ty = * substs. types . get ( FnSpace , 0 ) ;
497
497
let ptr = to_arg_ty_ptr ( bcx, llargs[ 0 ] , tp_ty) ;
498
- let val = to_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
498
+ let val = from_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
499
499
let store = VolatileStore ( bcx, val, ptr) ;
500
500
unsafe {
501
501
llvm:: LLVMSetAlignment ( store, type_of:: align_of ( ccx, tp_ty) ) ;
@@ -777,8 +777,8 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
777
777
778
778
let tp_ty = * substs. types . get ( FnSpace , 0 ) ;
779
779
let ptr = to_arg_ty_ptr ( bcx, llargs[ 0 ] , tp_ty) ;
780
- let cmp = to_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
781
- let src = to_arg_ty ( bcx, llargs[ 2 ] , tp_ty) ;
780
+ let cmp = from_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
781
+ let src = from_arg_ty ( bcx, llargs[ 2 ] , tp_ty) ;
782
782
let res = AtomicCmpXchg ( bcx, ptr, cmp, src, order,
783
783
strongest_failure_ordering) ;
784
784
ExtractValue ( bcx, res, 0 )
@@ -787,12 +787,12 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
787
787
"load" => {
788
788
let tp_ty = * substs. types . get ( FnSpace , 0 ) ;
789
789
let ptr = to_arg_ty_ptr ( bcx, llargs[ 0 ] , tp_ty) ;
790
- from_arg_ty ( bcx, AtomicLoad ( bcx, ptr, order) , tp_ty)
790
+ to_arg_ty ( bcx, AtomicLoad ( bcx, ptr, order) , tp_ty)
791
791
}
792
792
"store" => {
793
793
let tp_ty = * substs. types . get ( FnSpace , 0 ) ;
794
794
let ptr = to_arg_ty_ptr ( bcx, llargs[ 0 ] , tp_ty) ;
795
- let val = to_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
795
+ let val = from_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
796
796
AtomicStore ( bcx, val, ptr, order) ;
797
797
C_nil ( ccx)
798
798
}
@@ -826,7 +826,7 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
826
826
827
827
let tp_ty = * substs. types . get ( FnSpace , 0 ) ;
828
828
let ptr = to_arg_ty_ptr ( bcx, llargs[ 0 ] , tp_ty) ;
829
- let val = to_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
829
+ let val = from_arg_ty ( bcx, llargs[ 1 ] , tp_ty) ;
830
830
AtomicRMW ( bcx, atom_op, ptr, val, order)
831
831
}
832
832
}
0 commit comments