From b3dce34bc63533510416441fe5ddbde0e14ee128 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 1 Apr 2021 10:35:07 +0100 Subject: [PATCH] Add min(f16) and max(f16) support --- src/check_expr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/check_expr.cpp b/src/check_expr.cpp index c8f5e6468..5a1cf138f 100644 --- a/src/check_expr.cpp +++ b/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;