mirror of
https://github.com/ziglang/zig.git
synced 2025-12-24 15:13:08 +00:00
stage2: sparc64: Add BPr support for airCondBr
This commit is contained in:
parent
e057ff2496
commit
ae2d6b7eea
@ -1031,7 +1031,23 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void {
|
||||
},
|
||||
},
|
||||
}),
|
||||
else => return self.fail("TODO branch on register content (BPr)", .{}),
|
||||
else => blk: {
|
||||
const reg = switch (cond) {
|
||||
.register => |r| r,
|
||||
else => try self.copyToTmpRegister(Type.bool, cond),
|
||||
};
|
||||
|
||||
break :blk try self.addInst(.{
|
||||
.tag = .bpr,
|
||||
.data = .{
|
||||
.branch_predict_reg = .{
|
||||
.cond = .eq_zero,
|
||||
.rs1 = reg,
|
||||
.inst = undefined, // populated later through performReloc
|
||||
},
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
// Regardless of the branch type that's emitted, we need to reserve
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user