mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-06 20:20:20 +02:00
Do not have assertions with a long type test
* lib/lightning.c: Change assertions to have an int result and correct a bad bit mask assertion.
This commit is contained in:
parent
b23322100c
commit
dbf2847e47
2 changed files with 14 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-08-10 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
|
* lib/lightning.c: Change assertions to have an int
|
||||||
|
result and correct a bad bit mask assertion.
|
||||||
|
|
||||||
2014-08-10 Paulo Andrade <pcpa@gnu.org>
|
2014-08-10 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
* lib/jit_aarch64.c: Correct bad setup for assertion
|
* lib/jit_aarch64.c: Correct bad setup for assertion
|
||||||
|
|
|
@ -236,7 +236,7 @@ _jit_get_reg(jit_state_t *_jit, jit_int32_t regspec)
|
||||||
!jit_regset_tstbit(&_jitc->regarg, regno) &&
|
!jit_regset_tstbit(&_jitc->regarg, regno) &&
|
||||||
!(regspec & jit_class_nospill)) {
|
!(regspec & jit_class_nospill)) {
|
||||||
spill:
|
spill:
|
||||||
assert(_jitc->function);
|
assert(_jitc->function != NULL);
|
||||||
if (spec & jit_class_gpr) {
|
if (spec & jit_class_gpr) {
|
||||||
if (!_jitc->function->regoff[regno]) {
|
if (!_jitc->function->regoff[regno]) {
|
||||||
_jitc->function->regoff[regno] =
|
_jitc->function->regoff[regno] =
|
||||||
|
@ -275,7 +275,7 @@ _jit_get_reg(jit_state_t *_jit, jit_int32_t regspec)
|
||||||
if (jit_class(_rvs[regno].spec) & jit_class_sav) {
|
if (jit_class(_rvs[regno].spec) & jit_class_sav) {
|
||||||
/* if will modify callee save registers without a
|
/* if will modify callee save registers without a
|
||||||
* function prolog, better patch this assertion */
|
* function prolog, better patch this assertion */
|
||||||
assert(_jitc->function);
|
assert(_jitc->function != NULL);
|
||||||
if (!jit_regset_tstbit(&_jitc->function->regset, regno)) {
|
if (!jit_regset_tstbit(&_jitc->function->regset, regno)) {
|
||||||
jit_regset_setbit(&_jitc->function->regset, regno);
|
jit_regset_setbit(&_jitc->function->regset, regno);
|
||||||
_jitc->again = 1;
|
_jitc->again = 1;
|
||||||
|
@ -330,7 +330,7 @@ _jit_unget_reg(jit_state_t *_jit, jit_int32_t regno)
|
||||||
jit_load(regno);
|
jit_load(regno);
|
||||||
jit_regset_clrbit(&_jitc->regsav, regno);
|
jit_regset_clrbit(&_jitc->regsav, regno);
|
||||||
}
|
}
|
||||||
assert(jit_regset_tstbit(&_jitc->regarg, regno));
|
assert(jit_regset_tstbit(&_jitc->regarg, regno) != 0);
|
||||||
jit_regset_clrbit(&_jitc->regarg, regno);
|
jit_regset_clrbit(&_jitc->regarg, regno);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -527,7 +527,7 @@ _jit_load(jit_state_t *_jit, jit_int32_t reg)
|
||||||
|
|
||||||
reg = jit_regno(reg);
|
reg = jit_regno(reg);
|
||||||
assert(!_jitc->realize);
|
assert(!_jitc->realize);
|
||||||
assert(_jitc->spill[reg]);
|
assert(_jitc->spill[reg] != NULL);
|
||||||
node = jit_new_node_w(jit_code_load, reg);
|
node = jit_new_node_w(jit_code_load, reg);
|
||||||
/* create a path to flag the save/load is not required */
|
/* create a path to flag the save/load is not required */
|
||||||
node->link = _jitc->spill[reg];
|
node->link = _jitc->spill[reg];
|
||||||
|
@ -549,11 +549,11 @@ jit_pointer_t
|
||||||
_jit_address(jit_state_t *_jit, jit_node_t *node)
|
_jit_address(jit_state_t *_jit, jit_node_t *node)
|
||||||
{
|
{
|
||||||
assert(_jitc->done);
|
assert(_jitc->done);
|
||||||
assert(node &&
|
assert(node != NULL &&
|
||||||
/* If a node type that is documented to be a fixed marker */
|
/* If a node type that is documented to be a fixed marker */
|
||||||
(node->code == jit_code_note || node->code == jit_code_name ||
|
(node->code == jit_code_note || node->code == jit_code_name ||
|
||||||
/* If another special fixed marker, returned by jit_indirect() */
|
/* If another special fixed marker, returned by jit_indirect() */
|
||||||
(node->code == jit_code_label && (node->flag & jit_flag_use))));
|
(node->code == jit_code_label && (node->flag & jit_flag_use) != 0)));
|
||||||
return ((jit_pointer_t)node->u.w);
|
return ((jit_pointer_t)node->u.w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1130,7 +1130,7 @@ _jit_link(jit_state_t *_jit, jit_node_t *node)
|
||||||
void
|
void
|
||||||
_jit_prepare(jit_state_t *_jit)
|
_jit_prepare(jit_state_t *_jit)
|
||||||
{
|
{
|
||||||
assert(_jitc->function);
|
assert(_jitc->function != NULL);
|
||||||
_jitc->function->call.call = jit_call_default;
|
_jitc->function->call.call = jit_call_default;
|
||||||
_jitc->function->call.argi =
|
_jitc->function->call.argi =
|
||||||
_jitc->function->call.argf =
|
_jitc->function->call.argf =
|
||||||
|
@ -1152,11 +1152,11 @@ void
|
||||||
_jit_ellipsis(jit_state_t *_jit)
|
_jit_ellipsis(jit_state_t *_jit)
|
||||||
{
|
{
|
||||||
if (_jitc->prepare) {
|
if (_jitc->prepare) {
|
||||||
assert(!_jitc->function->call.call & jit_call_varargs);
|
assert(!(_jitc->function->call.call & jit_call_varargs));
|
||||||
_jitc->function->call.call |= jit_call_varargs;
|
_jitc->function->call.call |= jit_call_varargs;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert(!_jitc->function->self.call & jit_call_varargs);
|
assert(!(_jitc->function->self.call & jit_call_varargs));
|
||||||
_jitc->function->self.call |= jit_call_varargs;
|
_jitc->function->self.call |= jit_call_varargs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue