Browse Source

Add min(f16) and max(f16) support

gingerBill 4 years ago
parent
commit
b3dce34bc6
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/check_expr.cpp

+ 6 - 0
src/check_expr.cpp

@@ -4858,6 +4858,9 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
 				operand->mode  = Addressing_Constant;
 				operand->type  = original_type;
 				switch (type_size_of(type)) {
+				case 2:
+					operand->value = exact_value_float(-65504.0f);
+					break;
 				case 4:
 					operand->value = exact_value_float(-3.402823466e+38f);
 					break;
@@ -5036,6 +5039,9 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
 				operand->mode  = Addressing_Constant;
 				operand->type  = original_type;
 				switch (type_size_of(type)) {
+				case 2:
+					operand->value = exact_value_float(65504.0f);
+					break;
 				case 4:
 					operand->value = exact_value_float(3.402823466e+38f);
 					break;