aboutsummaryrefslogtreecommitdiff
path: root/src/tilde_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-07-19 11:39:37 +0100
committergingerBill <bill@gingerbill.org>2023-07-19 11:39:37 +0100
commit569397bd7eeb8db7aeff0033b3d8cb79af2c9893 (patch)
tree4e3070f8eb8a795973fa43960561b3407f17e88b /src/tilde_expr.cpp
parent3535d16c3a9f2a16b420f34777cbbc56ccadfd5d (diff)
Update TB
Diffstat (limited to 'src/tilde_expr.cpp')
-rw-r--r--src/tilde_expr.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tilde_expr.cpp b/src/tilde_expr.cpp
index 351ee7b45..e754d473f 100644
--- a/src/tilde_expr.cpp
+++ b/src/tilde_expr.cpp
@@ -1185,7 +1185,7 @@ handle_op:;
}
}
- TB_ArithmeticBehavior arith_behavior = cast(TB_ArithmeticBehavior)50;
+ TB_ArithmeticBehavior arith_behavior = cast(TB_ArithmeticBehavior)0;
Type *integral_type = type;
if (is_type_simd_vector(integral_type)) {
@@ -2065,13 +2065,13 @@ gb_internal cgValue cg_build_expr_internal(cgProcedure *p, Ast *expr) {
Type *type = default_type(type_of_expr(expr));
- incoming_values[0] = cg_emit_conv(p, cg_build_expr(p, te->x), type);
+ incoming_values [0] = cg_emit_conv(p, cg_build_expr(p, te->x), type);
incoming_regions[0] = tb_inst_get_control(p->func);
tb_inst_goto(p->func, done);
tb_inst_set_control(p->func, else_);
- incoming_values[1] = cg_emit_conv(p, cg_build_expr(p, te->y), type);
+ incoming_values [1] = cg_emit_conv(p, cg_build_expr(p, te->y), type);
incoming_regions[1] = tb_inst_get_control(p->func);
tb_inst_goto(p->func, done);
@@ -2080,6 +2080,7 @@ gb_internal cgValue cg_build_expr_internal(cgProcedure *p, Ast *expr) {
GB_ASSERT(incoming_values[0].kind == cgValue_Value ||
incoming_values[0].kind == cgValue_Addr);
GB_ASSERT(incoming_values[0].kind == incoming_values[1].kind);
+
cgValue res = {};
res.kind = incoming_values[0].kind;
res.type = type;