feat: Get ZBA working on Zig's new stage2/stage3 compiler

This commit is contained in:
2022-08-21 12:28:02 -05:00
parent 3c3c0d32dd
commit 2ab8769b7a
3 changed files with 5 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ fn PtrCastPreserveCV(comptime T: type, comptime PtrToT: type, comptime NewT: typ
fn BitType(comptime FieldType: type, comptime ValueType: type, comptime shamt: usize) type {
const self_bit: FieldType = (1 << shamt);
return struct {
return extern struct {
bits: Bitfield(FieldType, shamt, 1),
pub fn set(self: anytype) void {
@@ -63,7 +63,7 @@ pub fn Bitfield(comptime FieldType: type, comptime shamt: usize, comptime num_bi
const ValueType = std.meta.Int(.unsigned, num_bits);
return struct {
return extern struct {
dummy: FieldType,
fn field(self: anytype) PtrCastPreserveCV(@This(), @TypeOf(self), FieldType) {