@@ -291,10 +291,10 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
291291 // and need to pack arguments
292292 Abi :: Rust => {
293293 trace ! (
294- "arg_locals: {:?}" ,
294+ "arg_locals: {:# ?}" ,
295295 self . frame( ) . mir. args_iter( ) . collect:: <Vec <_>>( )
296296 ) ;
297- trace ! ( "args: {:?}" , args) ;
297+ trace ! ( "args: {:# ?}" , args) ;
298298 let local = arg_locals. nth ( 1 ) . unwrap ( ) ;
299299 for ( i, & valty) in args. into_iter ( ) . enumerate ( ) {
300300 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> {
321321 let mut arg_locals = self . frame ( ) . mir . args_iter ( ) ;
322322 trace ! ( "ABI: {:?}" , sig. abi) ;
323323 trace ! (
324- "arg_locals: {:?}" ,
324+ "arg_locals: {:# ?}" ,
325325 self . frame( ) . mir. args_iter( ) . collect:: <Vec <_>>( )
326326 ) ;
327- trace ! ( "args: {:?}" , args) ;
327+ trace ! ( "args: {:# ?}" , args) ;
328328 match sig. abi {
329329 Abi :: RustCall => {
330330 assert_eq ! ( args. len( ) , 2 ) ;
@@ -376,14 +376,26 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> {
376376 }
377377 break ;
378378 }
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( ) ) ;
387399 }
388400 }
389401 } else {
0 commit comments