From 860e8a6c2e4097a5d96b5de7fe2fcf60b0200442 Mon Sep 17 00:00:00 2001 From: Egggggg Date: Wed, 12 Jul 2023 06:25:38 -0400 Subject: [PATCH] fixed argument order of BMC and BRC --- hbvm/src/vm/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hbvm/src/vm/mod.rs b/hbvm/src/vm/mod.rs index 7c3a50f..872099c 100644 --- a/hbvm/src/vm/mod.rs +++ b/hbvm/src/vm/mod.rs @@ -243,7 +243,7 @@ impl<'a, PfHandler: HandlePageFault, const TIMER_QUOTIENT: usize> )?; } BMC => { - let ParamBBD(src, dst, count) = param!(self, ParamBBD); + let ParamBBD(dst, src, count) = param!(self, ParamBBD); self.memory.block_copy( self.read_reg(src).as_u64(), self.read_reg(dst).as_u64(), @@ -252,7 +252,7 @@ impl<'a, PfHandler: HandlePageFault, const TIMER_QUOTIENT: usize> )?; } BRC => { - let ParamBBB(src, dst, count) = param!(self, ParamBBB); + let ParamBBB(dst, src, count) = param!(self, ParamBBB); core::ptr::copy( self.registers.get_unchecked(usize::from(src)), self.registers.get_unchecked_mut(usize::from(dst)),