From 32bed04914a9e2a6f1d5b1985ca1522fd8959624 Mon Sep 17 00:00:00 2001 From: mlokr Date: Mon, 9 Sep 2024 22:52:34 +0200 Subject: [PATCH] fixing vm bug --- hblang/README.md | 2 +- hbvm/src/vmrun.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hblang/README.md b/hblang/README.md index c4aa842..be51965 100644 --- a/hblang/README.md +++ b/hblang/README.md @@ -888,7 +888,7 @@ create_back_buffer := fn(total_pages: int): ^u32 { } main := fn(): void { - create_back_buffer(10) + create_back_buffer(400) return } ``` diff --git a/hbvm/src/vmrun.rs b/hbvm/src/vmrun.rs index 603dac3..4aba34f 100644 --- a/hbvm/src/vmrun.rs +++ b/hbvm/src/vmrun.rs @@ -270,10 +270,10 @@ where self.bump_pc::(); } } - JLTS => self.cond_jmp::(Ordering::Less), - JGTS => self.cond_jmp::(Ordering::Greater), - JLTU => self.cond_jmp::(Ordering::Less), - JGTU => self.cond_jmp::(Ordering::Greater), + JLTS => self.cond_jmp::(Ordering::Less), + JGTS => self.cond_jmp::(Ordering::Greater), + JLTU => self.cond_jmp::(Ordering::Less), + JGTU => self.cond_jmp::(Ordering::Greater), ECA => { // So we don't get timer interrupt after ECALL if TIMER_QUOTIENT != 0 {