mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-04 22:30:18 +02:00
Add assertion to check for register allocation leaks
* lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c, lib/jit_x86.c: Add an assertion to all code generation "drivers" to ensure _jitc->regarg is empty or in an expected state, after translation of a lightning instruction to native code. This change was a brute force test to find out other cases of a temporary not being release (like was happening with _bmsi and _bmci on x86), but no other case was found, after running make check, with assertions enabled, on all backends.
This commit is contained in:
parent
ddd7a7550b
commit
44519452d9
11 changed files with 29 additions and 0 deletions
|
@ -1139,6 +1139,7 @@ _emit_code(jit_state_t *_jit)
|
|||
abort();
|
||||
}
|
||||
jit_regarg_clr(node, value);
|
||||
assert(_jitc->regarg == 0);
|
||||
/* update register live state */
|
||||
jit_reglive(node);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue