aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index f6ccb6d8eb..468ccbea51 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -848,6 +848,11 @@ pub fn gen(self: *Self, ty: Type, val: Value) InnerError!Result {
try self.emitConstant(val, ty);
return Result.appended;
},
+ .Bool => {
+ const int_byte: u8 = @boolToInt(val.toBool());
+ try self.code.append(int_byte);
+ return Result.appended;
+ },
.Struct => {
// TODO write the fields for real
const abi_size = try std.math.cast(usize, ty.abiSize(self.target));