aboutsummaryrefslogtreecommitdiff
path: root/src/arch/wasm/CodeGen.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-05-08 17:16:58 +0200
committerLuuk de Gram <luuk@degram.dev>2022-05-09 18:51:46 +0200
commit62453496bac17f13e1e129de5cf08accddc02302 (patch)
treeaa540817a86ae174af39bf1ea4803271fafdc23b /src/arch/wasm/CodeGen.zig
parent2ae2ac33d9ddd1fb181e08a811d97b1bf238bced (diff)
downloadzig-62453496bac17f13e1e129de5cf08accddc02302.tar.gz
zig-62453496bac17f13e1e129de5cf08accddc02302.zip
wasm: Write nops for padding debug info
Diffstat (limited to 'src/arch/wasm/CodeGen.zig')
-rw-r--r--src/arch/wasm/CodeGen.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/wasm/CodeGen.zig b/src/arch/wasm/CodeGen.zig
index cb2578bee9..947174aaed 100644
--- a/src/arch/wasm/CodeGen.zig
+++ b/src/arch/wasm/CodeGen.zig
@@ -1362,7 +1362,6 @@ fn isByRef(ty: Type, target: std.Target) bool {
.NoReturn,
.Void,
.Bool,
- .Float,
.ErrorSet,
.Fn,
.Enum,
@@ -1375,7 +1374,8 @@ fn isByRef(ty: Type, target: std.Target) bool {
.Frame,
.Union,
=> return ty.hasRuntimeBitsIgnoreComptime(),
- .Int => return if (ty.intInfo(target).bits > 64) true else false,
+ .Int => return ty.intInfo(target).bits > 64,
+ .Float => return ty.floatBits(target) > 64,
.ErrorUnion => {
const has_tag = ty.errorUnionSet().hasRuntimeBitsIgnoreComptime();
const has_pl = ty.errorUnionPayload().hasRuntimeBitsIgnoreComptime();
@@ -4326,7 +4326,7 @@ fn airDbgVar(self: *Self, inst: Air.Inst.Index, is_ptr: bool) !WValue {
try self.addDbgInfoTypeReloc(op_ty);
dbg_info.appendSliceAssumeCapacity(name);
dbg_info.appendAssumeCapacity(0);
- try return WValue{ .none = {} };
+ return WValue{ .none = {} };
}
fn airDbgStmt(self: *Self, inst: Air.Inst.Index) !WValue {