From 91dba79c48f0a309e014062f2fe311a5c46b1084 Mon Sep 17 00:00:00 2001 From: Luuk de Gram Date: Fri, 26 Aug 2022 21:01:05 +0200 Subject: wasm: fix abi size of c_longdouble According to https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md the size of c's long double is 16 bytes for Wasm, rather than 8 bytes which was the value previously in the compiler. This ensures we not only pass the correct value, but also creates the correct function signature needed to pass the Wasm validator. This also adds an additional test case in c_abi tests. --- src/type.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/type.zig') diff --git a/src/type.zig b/src/type.zig index cc6e5706ee..215011df8d 100644 --- a/src/type.zig +++ b/src/type.zig @@ -6592,6 +6592,8 @@ pub const CType = enum { .powerpcle, .powerpc64, .powerpc64le, + .wasm32, + .wasm64, => return 128, else => return 64, @@ -6640,6 +6642,8 @@ pub const CType = enum { .powerpcle, .powerpc64, .powerpc64le, + .wasm32, + .wasm64, => return 128, else => return 64, -- cgit v1.2.3