Commit a0792e93 authored by Matthias Braun's avatar Matthias Braun
Browse files

improve assert in abihelper register value getter

[r27785]
parent c563dd65
......@@ -149,7 +149,7 @@ static void rsm_add_reg(register_state_mapping_t *rsm,
static ir_node *rsm_get_value(register_state_mapping_t *rsm, int index)
{
assert(index < ARR_LEN(rsm->value_map));
assert(0 <= index && index < ARR_LEN(rsm->value_map));
return rsm->value_map[index];
}
......@@ -166,7 +166,7 @@ static ir_node *rsm_get_reg_value(register_state_mapping_t *rsm,
static void rsm_set_value(register_state_mapping_t *rsm, int index,
ir_node *value)
{
assert(index < ARR_LEN(rsm->value_map));
assert(0 <= index && index < ARR_LEN(rsm->value_map));
rsm->value_map[index] = value;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment