zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit ef532ada8ada987a5b66db630b374520d04553d8 (tree)
parent 4687bc2730c36e46b0edbc36ce18576fb8f3e1f4
Author: Koakuma <koachan@protonmail.com>
Date:   Fri, 14 Oct 2022 22:28:03 +0700

stage2: sparc64: Implement airSplat

Diffstat:
Msrc/arch/sparc64/CodeGen.zig | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/arch/sparc64/CodeGen.zig b/src/arch/sparc64/CodeGen.zig @@ -610,7 +610,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { .bit_reverse => @panic("TODO try self.airBitReverse(inst)"), .tag_name => try self.airTagName(inst), .error_name => try self.airErrorName(inst), - .splat => @panic("TODO try self.airSplat(inst)"), + .splat => try self.airSplat(inst), .select => @panic("TODO try self.airSelect(inst)"), .shuffle => @panic("TODO try self.airShuffle(inst)"), .reduce => @panic("TODO try self.airReduce(inst)"), @@ -2292,6 +2292,12 @@ fn airSlicePtr(self: *Self, inst: Air.Inst.Index) !void { return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); } +fn airSplat(self: *Self, inst: Air.Inst.Index) !void { + const ty_op = self.air.instructions.items(.data)[inst].ty_op; + const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement airSplat for {}", .{self.target.cpu.arch}); + return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); +} + fn airStore(self: *Self, inst: Air.Inst.Index) !void { const bin_op = self.air.instructions.items(.data)[inst].bin_op; const ptr = try self.resolveInst(bin_op.lhs);