@@ -291,10 +291,10 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
291
291
// and need to pack arguments
292
292
Abi :: Rust => {
293
293
trace ! (
294
- "arg_locals: {:?}" ,
294
+ "arg_locals: {:# ?}" ,
295
295
self . frame( ) . mir. args_iter( ) . collect:: <Vec <_>>( )
296
296
) ;
297
- trace ! ( "args: {:?}" , args) ;
297
+ trace ! ( "args: {:# ?}" , args) ;
298
298
let local = arg_locals. nth ( 1 ) . unwrap ( ) ;
299
299
for ( i, & valty) in args. into_iter ( ) . enumerate ( ) {
300
300
let dest = self . eval_place ( & mir:: Place :: Local ( local) . field (
@@ -321,10 +321,10 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
321
321
let mut arg_locals = self . frame ( ) . mir . args_iter ( ) ;
322
322
trace ! ( "ABI: {:?}" , sig. abi) ;
323
323
trace ! (
324
- "arg_locals: {:?}" ,
324
+ "arg_locals: {:# ?}" ,
325
325
self . frame( ) . mir. args_iter( ) . collect:: <Vec <_>>( )
326
326
) ;
327
- trace ! ( "args: {:?}" , args) ;
327
+ trace ! ( "args: {:# ?}" , args) ;
328
328
match sig. abi {
329
329
Abi :: RustCall => {
330
330
assert_eq ! ( args. len( ) , 2 ) ;
@@ -376,14 +376,26 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
376
376
}
377
377
break ;
378
378
}
379
- let dest = self . eval_place ( & mir:: Place :: Local (
380
- arg_locals. next ( ) . unwrap ( ) ,
381
- ) ) ?;
382
- let valty = ValTy {
383
- value : other,
384
- ty : layout. ty ,
385
- } ;
386
- self . write_value ( valty, dest) ?;
379
+ {
380
+ let mut write_next = |value| {
381
+ let dest = self . eval_place ( & mir:: Place :: Local (
382
+ arg_locals. next ( ) . unwrap ( ) ,
383
+ ) ) ?;
384
+ let valty = ValTy {
385
+ value : Value :: Scalar ( value) ,
386
+ ty : layout. ty ,
387
+ } ;
388
+ self . write_value ( valty, dest)
389
+ } ;
390
+ match other {
391
+ Value :: Scalar ( value) | Value :: ScalarPair ( value, _) => write_next ( value) ?,
392
+ _ => unreachable ! ( ) ,
393
+ }
394
+ if let Value :: ScalarPair ( _, value) = other {
395
+ write_next ( value) ?;
396
+ }
397
+ }
398
+ assert ! ( arg_locals. next( ) . is_none( ) ) ;
387
399
}
388
400
}
389
401
} else {
0 commit comments