This commit is contained in:
Ginger Bill
2017-03-27 20:32:36 +01:00
parent 188b290dd5
commit a75ccb6fbc
10 changed files with 338 additions and 199 deletions
+2 -2
View File
@@ -364,7 +364,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
}
} break;
case ExactValue_Float: {
GB_ASSERT(is_type_float(type));
GB_ASSERT_MSG(is_type_float(type), "%s", type_to_string(type));
type = base_type(type);
u64 u = *cast(u64*)&value.value_float;
switch (type->Basic.kind) {
@@ -942,7 +942,7 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) {
switch (uo->op) {
case Token_Sub:
if (is_type_float(elem_type)) {
ir_print_exact_value(f, m, exact_value_float(0), type);
ir_print_exact_value(f, m, exact_value_float(0), elem_type);
} else {
ir_fprintf(f, "0");
}