aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-01 10:35:07 +0100
committergingerBill <bill@gingerbill.org>2021-04-01 10:35:07 +0100
commitb3dce34bc63533510416441fe5ddbde0e14ee128 (patch)
treec1887d6a56825ccfaa47dbba9c37ad0a529d2e65 /src/check_expr.cpp
parent491b282615d32ecc323163b586ac77ea384830ac (diff)
Add min(f16) and max(f16) support
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp6
1 files changed, 6 insertions, 0 deletions
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;