aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-01-02 14:01:48 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-02 14:01:48 -0500
commit213ff939f18f147b5d9dd164d52ebdd660dab7b4 (patch)
treebc647d607254e1668b40199cb9c483900359d4fe /src/codegen.cpp
parentcb56b26900dcb563b008cf132aa3ae180d6a205a (diff)
downloadzig-213ff939f18f147b5d9dd164d52ebdd660dab7b4.tar.gz
zig-213ff939f18f147b5d9dd164d52ebdd660dab7b4.zip
fix comptime vector float ops and add test coverage
also rename `@ln` to `@log` to match libc convention.
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 5500b4029c..17ae34a1c4 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -764,7 +764,7 @@ static LLVMValueRef get_float_fn(CodeGen *g, ZigType *type_entry, ZigLLVMFnId fn
name = "fma";
num_args = 3;
} else if (fn_id == ZigLLVMFnIdFloatOp) {
- name = float_op_to_name(op, true);
+ name = float_op_to_name(op);
num_args = 1;
} else {
zig_unreachable();
@@ -8205,7 +8205,7 @@ static void define_builtin_fns(CodeGen *g) {
create_builtin_fn(g, BuiltinFnIdCos, "cos", 1);
create_builtin_fn(g, BuiltinFnIdExp, "exp", 1);
create_builtin_fn(g, BuiltinFnIdExp2, "exp2", 1);
- create_builtin_fn(g, BuiltinFnIdLn, "ln", 1);
+ create_builtin_fn(g, BuiltinFnIdLog, "log", 1);
create_builtin_fn(g, BuiltinFnIdLog2, "log2", 1);
create_builtin_fn(g, BuiltinFnIdLog10, "log10", 1);
create_builtin_fn(g, BuiltinFnIdFabs, "fabs", 1);