diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-07-21 22:35:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-21 22:35:05 +0000 |
| commit | 25a01a16e0eb729857f8e9a0a87bd0b8e9da301b (patch) | |
| tree | 4f6607c2f58751a0e6c8cede44f8a6b784501714 /src | |
| parent | 68e0632aa531b33669bfdda374675aa26e91b40f (diff) | |
| parent | dd8929738876544d9b83c55df6e2ee3a491298ca (diff) | |
| download | zig-25a01a16e0eb729857f8e9a0a87bd0b8e9da301b.tar.gz zig-25a01a16e0eb729857f8e9a0a87bd0b8e9da301b.zip | |
Merge pull request #5905 from Vexu/stage2-float
Stage2: floats
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 11ff7746e7..cf8558761f 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -288,6 +288,7 @@ static IrInstGen *ir_analyze_struct_value_field_value(IrAnalyze *ira, IrInst* so static bool value_cmp_numeric_val_any(ZigValue *left, Cmp predicate, ZigValue *right); static bool value_cmp_numeric_val_all(ZigValue *left, Cmp predicate, ZigValue *right); static void memoize_field_init_val(CodeGen *codegen, ZigType *container_type, TypeStructField *field); +static void value_to_bigfloat(BigFloat *out, ZigValue *val); #define ir_assert(OK, SOURCE_INSTRUCTION) ir_assert_impl((OK), (SOURCE_INSTRUCTION), __FILE__, __LINE__) #define ir_assert_gen(OK, SOURCE_INSTRUCTION) ir_assert_gen_impl((OK), (SOURCE_INSTRUCTION), __FILE__, __LINE__) @@ -10930,8 +10931,8 @@ static Cmp float_cmp(ZigValue *op1, ZigValue *op2) { } BigFloat op1_big; BigFloat op2_big; - float_init_bigfloat(op1, &op1_big); - float_init_bigfloat(op2, &op2_big); + value_to_bigfloat(&op1_big, op1); + value_to_bigfloat(&op2_big, op2); return bigfloat_cmp(&op1_big, &op2_big); } |
