From 36c5e82c5224743ca76c777293165214eaf436c6 Mon Sep 17 00:00:00 2001 From: Egggggg Date: Wed, 12 Jul 2023 06:50:07 -0400 Subject: [PATCH] hehe oops --- hbvm/src/vm/mod.rs | 4 ++-- spec.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hbvm/src/vm/mod.rs b/hbvm/src/vm/mod.rs index 872099ca..7c3a50f4 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(dst, src, count) = param!(self, ParamBBD); + let ParamBBD(src, dst, 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(dst, src, count) = param!(self, ParamBBB); + let ParamBBB(src, dst, count) = param!(self, ParamBBB); core::ptr::copy( self.registers.get_unchecked(usize::from(src)), self.registers.get_unchecked_mut(usize::from(dst)), diff --git a/spec.md b/spec.md index 4c64f267..b9adf175 100644 --- a/spec.md +++ b/spec.md @@ -153,7 +153,7 @@ | Opcode | Name | Action | |:------:|:----:|:--------------------------------:| -| 30 | BMC | `[#0] ← [#1], copy imm #2 bytes` | +| 30 | BMC | `[#1] ← [#0], copy imm #2 bytes` | ### Register copy - Type BBB @@ -161,7 +161,7 @@ | Opcode | Name | Action | |:------:|:----:|:--------------------------------:| -| 31 | BRC | `#0 ← #1, copy imm #2 registers` | +| 31 | BRC | `#1 ← #0, copy imm #2 registers` | ## Control flow