mirror of
https://github.com/ziglang/zig.git
synced 2025-12-29 01:23:17 +00:00
stage2: sparc64: Implement airTagName
This commit is contained in:
parent
f01867f78e
commit
4fc6df9f62
@ -606,7 +606,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
|
||||
.popcount => @panic("TODO try self.airPopcount(inst)"),
|
||||
.byte_swap => @panic("TODO try self.airByteSwap(inst)"),
|
||||
.bit_reverse => @panic("TODO try self.airBitReverse(inst)"),
|
||||
.tag_name => @panic("TODO try self.airTagName(inst)"),
|
||||
.tag_name => try self.airTagName(inst),
|
||||
.error_name => @panic("TODO try self.airErrorName(inst)"),
|
||||
.splat => @panic("TODO try self.airSplat(inst)"),
|
||||
.select => @panic("TODO try self.airSelect(inst)"),
|
||||
@ -2118,6 +2118,16 @@ fn airSwitch(self: *Self, inst: Air.Inst.Index) !void {
|
||||
return self.fail("TODO implement switch for {}", .{self.target.cpu.arch});
|
||||
}
|
||||
|
||||
fn airTagName(self: *Self, inst: Air.Inst.Index) !void {
|
||||
const un_op = self.air.instructions.items(.data)[inst].un_op;
|
||||
const operand = try self.resolveInst(un_op);
|
||||
const result: MCValue = if (self.liveness.isUnused(inst)) .dead else {
|
||||
_ = operand;
|
||||
return self.fail("TODO implement airTagName for {}", .{self.target.cpu.arch});
|
||||
};
|
||||
return self.finishAir(inst, result, .{ un_op, .none, .none });
|
||||
}
|
||||
|
||||
fn airTry(self: *Self, inst: Air.Inst.Index) !void {
|
||||
const pl_op = self.air.instructions.items(.data)[inst].pl_op;
|
||||
const extra = self.air.extraData(Air.Try, pl_op.payload);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user