Commit fbcc175e authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Provide a minus_one value for mode_b, too.

Now mode_b behaves the same as integer modes, so use the same code to initialize the special values.
parent e1f575bb
......@@ -63,6 +63,7 @@ static ir_mode *find_mode(const ir_mode *m)
static void set_mode_values(ir_mode* mode)
{
switch (get_mode_sort(mode)) {
case irms_internal_boolean:
case irms_reference:
case irms_int_number:
case irms_float_number:
......@@ -78,15 +79,6 @@ static void set_mode_values(ir_mode* mode)
}
break;
case irms_internal_boolean:
mode->min = tarval_b_false;
mode->max = tarval_b_true;
mode->null = tarval_b_false;
mode->one = tarval_b_true;
mode->minus_one = tarval_bad;
mode->all_one = tarval_b_true;
break;
case irms_auxiliary:
case irms_data:
mode->min = tarval_bad;
......
......@@ -637,9 +637,11 @@ ir_tarval *get_tarval_minus_one(ir_mode *mode)
{
switch (get_mode_sort(mode)) {
case irms_reference:
case irms_internal_boolean:
return tarval_bad;
case irms_internal_boolean:
return tarval_b_true;
case irms_float_number:
return mode_is_signed(mode) ? new_tarval_from_double(-1.0, mode) : tarval_bad;
......
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