From: Bryan English Date: Wed, 28 Jan 2026 04:50:38 +0000 (-0500) Subject: correct register ordering in pop_some_to X-Git-Url: https://rethought.computer/gitweb//gitweb//git?a=commitdiff_plain;h=efe15316bff7672793ad468df4cb2b33182e3813;p=sorel-lang.git correct register ordering in pop_some_to --- diff --git a/hylo-lang/hyloc/src/riscv_asm_codegen.rs b/hylo-lang/hyloc/src/riscv_asm_codegen.rs index 362571b..ca3cd99 100644 --- a/hylo-lang/hyloc/src/riscv_asm_codegen.rs +++ b/hylo-lang/hyloc/src/riscv_asm_codegen.rs @@ -75,7 +75,8 @@ impl<'a> CodeGen<'a> { } fn pop_some_to(&mut self, regs: &str) { - let regs = regs.trim().split(" ").collect::>(); + let mut regs = regs.trim().split(" ").collect::>(); + regs.reverse(); let count = regs.len(); let mut index = 0; for reg in regs {