@@ -52,7 +52,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
52
52
return Ok ( -1 ) ;
53
53
}
54
54
55
- let tp = this. force_ptr ( this . read_scalar ( tp_op) ? . not_undef ( ) ? ) ?;
55
+ let tp = this. deref_operand ( tp_op) ?;
56
56
57
57
let duration = get_time ( ) ?;
58
58
let tv_sec = duration. as_secs ( ) as i128 ;
@@ -63,7 +63,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
63
63
int_to_immty_checked ( tv_nsec, this. libc_ty_layout ( "c_long" ) ?) ?,
64
64
] ;
65
65
66
- this. write_immediates ( & tp, & imms) ?;
66
+ this. write_packed_immediates ( & tp, & imms) ?;
67
67
68
68
Ok ( 0 )
69
69
}
@@ -86,7 +86,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
86
86
return Ok ( -1 ) ;
87
87
}
88
88
89
- let tv = this. force_ptr ( this . read_scalar ( tv_op) ? . not_undef ( ) ? ) ?;
89
+ let tv = this. deref_operand ( tv_op) ?;
90
90
91
91
let duration = get_time ( ) ?;
92
92
let tv_sec = duration. as_secs ( ) as i128 ;
@@ -97,7 +97,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
97
97
int_to_immty_checked ( tv_usec, this. libc_ty_layout ( "suseconds_t" ) ?) ?,
98
98
] ;
99
99
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) ?;
101
104
102
105
Ok ( 0 )
103
106
}
0 commit comments