@@ -403,7 +403,7 @@ impl<'a> VisitOperator<'a> for FuncTranslator {
403403 let global_idx = ir:: index:: Global :: from ( global_index) ;
404404 self . push_instr_with_result (
405405 content,
406- |result| Op :: global_get ( result , global_idx ) ,
406+ |result| Op :: global_get ( global_idx , result ) ,
407407 FuelCostsProvider :: instance,
408408 ) ?;
409409 Ok ( ( ) )
@@ -430,10 +430,10 @@ impl<'a> VisitOperator<'a> for FuncTranslator {
430430 debug_assert_eq ! ( global_type. content( ) , value. ty( ) ) ;
431431 let global_set_instr = match global_type. content ( ) {
432432 ValType :: I32 => Op :: global_set32 ( global, u32:: from ( value) ) ,
433- ValType :: I64 => Op :: global_set64 ( global , u64:: from ( value) ) ,
433+ ValType :: I64 => Op :: global_set64 ( u64:: from ( value) , global ) ,
434434 ValType :: F32 => Op :: global_set32 ( global, f32:: from ( value) . to_bits ( ) ) ,
435- ValType :: F64 => Op :: global_set64 ( global , f64:: from ( value) . to_bits ( ) ) ,
436- ValType :: FuncRef | ValType :: ExternRef => Op :: global_set64 ( global , u64:: from ( value) ) ,
435+ ValType :: F64 => Op :: global_set64 ( f64:: from ( value) . to_bits ( ) , global ) ,
436+ ValType :: FuncRef | ValType :: ExternRef => Op :: global_set64 ( u64:: from ( value) , global ) ,
437437 ValType :: V128 => {
438438 let consume_fuel = self . stack . consume_fuel_instr ( ) ;
439439 let temp = self . copy_operand_to_temp ( input, consume_fuel) ?;
0 commit comments