aboutsummaryrefslogtreecommitdiff
path: root/src/interp.inc
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2025-03-13 19:20:56 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2025-03-13 19:25:59 +0200
commit57f6b41047e95374701ee276248f0f8615168450 (patch)
tree919a47249b2442dab31ae236f1f9f858651e5357 /src/interp.inc
parentba9145b0b7af2a82c62f8dfa28807958af5d0c8d (diff)
downloadejit-57f6b41047e95374701ee276248f0f8615168450.tar.gz
ejit-57f6b41047e95374701ee276248f0f8615168450.zip
improve register allocation
+ Still linear, but orders regs by some kind of priority + Use all registers available, not just callee-save
Diffstat (limited to 'src/interp.inc')
-rw-r--r--src/interp.inc4
1 files changed, 2 insertions, 2 deletions
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;