1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-04 14:20:26 +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:
pcpa 2014-10-26 18:25:41 -02:00
parent ddd7a7550b
commit 44519452d9
11 changed files with 29 additions and 0 deletions

View file

@ -1467,6 +1467,7 @@ _emit_code(jit_state_t *_jit)
}
}
jit_regarg_clr(node, value);
assert(_jitc->regarg == jit_carry == _NOREG ? 0 : (1 << jit_carry));
/* update register live state */
jit_reglive(node);
}