@@ -52,7 +52,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
5252 return Ok ( -1 ) ;
5353 }
5454
55- let tp = this. force_ptr ( this . read_scalar ( tp_op) ? . not_undef ( ) ? ) ?;
55+ let tp = this. deref_operand ( tp_op) ?;
5656
5757 let duration = get_time ( ) ?;
5858 let tv_sec = duration. as_secs ( ) as i128 ;
@@ -63,7 +63,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
6363 int_to_immty_checked ( tv_nsec, this. libc_ty_layout ( "c_long" ) ?) ?,
6464 ] ;
6565
66- this. write_immediates ( & tp, & imms) ?;
66+ this. write_packed_immediates ( & tp, & imms) ?;
6767
6868 Ok ( 0 )
6969 }
@@ -86,7 +86,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
8686 return Ok ( -1 ) ;
8787 }
8888
89- let tv = this. force_ptr ( this . read_scalar ( tv_op) ? . not_undef ( ) ? ) ?;
89+ let tv = this. deref_operand ( tv_op) ?;
9090
9191 let duration = get_time ( ) ?;
9292 let tv_sec = duration. as_secs ( ) as i128 ;
@@ -97,7 +97,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
9797 int_to_immty_checked ( tv_usec, this. libc_ty_layout ( "suseconds_t" ) ?) ?,
9898 ] ;
9999
100- this. write_immediates ( & tv, & imms) ?;
100+ // let tv_ty = this.tcx.tcx.mk_tup(imms.iter().map(|imm| imm.layout.ty));
101+ // let tv_local = Local::from(tv);
102+ // let tv_place = PlaceTy{ place: tv_local.into(), layout: tv_ty.layout};
103+ this. write_packed_immediates ( & tv, & imms) ?;
101104
102105 Ok ( 0 )
103106 }
0 commit comments