From 57f6b41047e95374701ee276248f0f8615168450 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 13 Mar 2025 19:20:56 +0200 Subject: improve register allocation + Still linear, but orders regs by some kind of priority + Use all registers available, not just callee-save --- src/interp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interp.inc') diff --git a/src/interp.inc b/src/interp.inc index 735eb09..a88bec8 100644 --- a/src/interp.inc +++ b/src/interp.inc @@ -217,8 +217,8 @@ size_t prev_fprs = fprs_len(&state->fprs); size_t prev_argc = args_len(&state->args); - gprs_reserve(&state->gprs, prev_gprs + f->gpr); - fprs_reserve(&state->fprs, prev_fprs + f->fpr); + gprs_reserve(&state->gprs, prev_gprs + gpr_stats_len(&f->gpr)); + fprs_reserve(&state->fprs, prev_fprs + fpr_stats_len(&f->fpr)); union fpr { double d; -- cgit v1.2.3