aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorJohn Schmidt <john.schmidt.h@gmail.com>2022-02-04 20:21:15 +0100
committerAndrew Kelley <andrew@ziglang.org>2022-02-07 16:52:19 -0700
commit722d4a11bbba4052558f6f69b7e710d1206f3355 (patch)
tree5c98c05bb228555a7b7e9bf3c71d48538c3b84e4 /src/arch/wasm/CodeGen.zig
parentdd49ed1c642d917af40bf4a0e03d013f40b3903b (diff)
downloadzig-722d4a11bbba4052558f6f69b7e710d1206f3355.tar.gz
zig-722d4a11bbba4052558f6f69b7e710d1206f3355.zip
stage2: implement @sqrt for f{16,32,64}
Support for f128, comptime_float, and c_longdouble require improvements to compiler_rt and will implemented in a later PR. Some of the code in this commit could be made more generic, for instance `llvm.airSqrt` could probably be `llvm.airUnaryMath`, but let's cross that bridge when we get to it.
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index 8e0ffac76b..b1e7a0d3a1 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -1681,6 +1681,8 @@ fn genInst(self: *Self, inst: Air.Inst.Index) !WValue {
.unwrap_errunion_payload_ptr,
.unwrap_errunion_err_ptr,
+ .sqrt,
+
.ptr_slice_len_ptr,
.ptr_slice_ptr_ptr,
.int_to_float,