authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-06-29 22:58:47+07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-09-14 16:57:31-07:00
log2c9ab03b0b9400d5e063d81fe6ff92a8fe4242f4
treed8d10bef9f7068040b3e0d3dc421654930fa7259
parent5b0134e3edd87d3818cd68e2ae6cb70a454a5c3b

stage2: sparc64: Add airCmpLtErrorsLen placeholder


1 files changed, 9 insertions(+), 1 deletions(-)

src/arch/sparc64/CodeGen.zig+9-1
...@@ -546,7 +546,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {...@@ -546,7 +546,7 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void {
546 .cmp_gt => try self.airCmp(inst, .gt),546 .cmp_gt => try self.airCmp(inst, .gt),
547 .cmp_neq => try self.airCmp(inst, .neq),547 .cmp_neq => try self.airCmp(inst, .neq),
548 .cmp_vector => @panic("TODO try self.airCmpVector(inst)"),548 .cmp_vector => @panic("TODO try self.airCmpVector(inst)"),
549 .cmp_lt_errors_len => @panic("TODO try self.airCmpLtErrorsLen(inst)"),549 .cmp_lt_errors_len => try self.airCmpLtErrorsLen(inst),
550550
551 .bool_and => @panic("TODO try self.airBoolOp(inst)"),551 .bool_and => @panic("TODO try self.airBoolOp(inst)"),
552 .bool_or => @panic("TODO try self.airBoolOp(inst)"),552 .bool_or => @panic("TODO try self.airBoolOp(inst)"),
...@@ -1299,6 +1299,14 @@ fn airCmp(self: *Self, inst: Air.Inst.Index, op: math.CompareOperator) !void {...@@ -1299,6 +1299,14 @@ fn airCmp(self: *Self, inst: Air.Inst.Index, op: math.CompareOperator) !void {
1299 return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none });1299 return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none });
1300}1300}
13011301
1302fn airCmpLtErrorsLen(self: *Self, inst: Air.Inst.Index) !void {
1303 const un_op = self.air.instructions.items(.data)[inst].un_op;
1304 const operand = try self.resolveInst(un_op);
1305 _ = operand;
1306 const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement airCmpLtErrorsLen for {}", .{self.target.cpu.arch});
1307 return self.finishAir(inst, result, .{ un_op, .none, .none });
1308}
1309
1302fn airCondBr(self: *Self, inst: Air.Inst.Index) !void {1310fn airCondBr(self: *Self, inst: Air.Inst.Index) !void {
1303 const pl_op = self.air.instructions.items(.data)[inst].pl_op;1311 const pl_op = self.air.instructions.items(.data)[inst].pl_op;
1304 const condition = try self.resolveInst(pl_op.operand);1312 const condition = try self.resolveInst(pl_op.operand);