authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-04-15 10:46:19+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-04-15 11:17:19+03:00
log6ad510d83271a2b8452a645bfe128b1019aca165
treeea306686587d952ca77fe6d389786d9109c1d13f
parent4911d39769e3b9ccf07062751106aa388bc97e48

update self hosted sources to language changes


3 files changed, 11 insertions(+), 5 deletions(-)

lib/std/os/linux/x86_64.zig+6-1
...@@ -100,7 +100,12 @@ pub fn syscall6(...@@ -100,7 +100,12 @@ pub fn syscall6(
100}100}
101101
102/// This matches the libc clone function.102/// This matches the libc clone function.
103pub extern fn clone(func: fn (arg: usize) callconv(.C) u8, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize;103pub extern fn clone(func: CloneFn, stack: usize, flags: usize, arg: usize, ptid: *i32, tls: usize, ctid: *i32) usize;
104
105const CloneFn = switch (@import("builtin").zig_backend) {
106 .stage1 => fn (arg: usize) callconv(.C) u8,
107 else => *const fn (arg: usize) callconv(.C) u8,
108};
104109
105pub const restore = restore_rt;110pub const restore = restore_rt;
106111
src/arch/sparcv9/CodeGen.zig+3-3
...@@ -624,9 +624,9 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {...@@ -624,9 +624,9 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
624 const is_volatile = (extra.data.flags & 0x80000000) != 0;624 const is_volatile = (extra.data.flags & 0x80000000) != 0;
625 const clobbers_len = @truncate(u31, extra.data.flags);625 const clobbers_len = @truncate(u31, extra.data.flags);
626 var extra_i: usize = extra.end;626 var extra_i: usize = extra.end;
627 const outputs = @bitCast([]const Air.Inst.Ref, self.air.extra[extra_i .. extra_i + extra.data.outputs_len]);627 const outputs = @ptrCast([]const Air.Inst.Ref, self.air.extra[extra_i .. extra_i + extra.data.outputs_len]);
628 extra_i += outputs.len;628 extra_i += outputs.len;
629 const inputs = @bitCast([]const Air.Inst.Ref, self.air.extra[extra_i .. extra_i + extra.data.inputs_len]);629 const inputs = @ptrCast([]const Air.Inst.Ref, self.air.extra[extra_i .. extra_i + extra.data.inputs_len]);
630 extra_i += inputs.len;630 extra_i += inputs.len;
631631
632 const dead = !is_volatile and self.liveness.isUnused(inst);632 const dead = !is_volatile and self.liveness.isUnused(inst);
...@@ -826,7 +826,7 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallOptions....@@ -826,7 +826,7 @@ fn airCall(self: *Self, inst: Air.Inst.Index, modifier: std.builtin.CallOptions.
826 const pl_op = self.air.instructions.items(.data)[inst].pl_op;826 const pl_op = self.air.instructions.items(.data)[inst].pl_op;
827 const callee = pl_op.operand;827 const callee = pl_op.operand;
828 const extra = self.air.extraData(Air.Call, pl_op.payload);828 const extra = self.air.extraData(Air.Call, pl_op.payload);
829 const args = @bitCast([]const Air.Inst.Ref, self.air.extra[extra.end .. extra.end + extra.data.args_len]);829 const args = @ptrCast([]const Air.Inst.Ref, self.air.extra[extra.end .. extra.end + extra.data.args_len]);
830 const ty = self.air.typeOf(callee);830 const ty = self.air.typeOf(callee);
831 const fn_ty = switch (ty.zigTypeTag()) {831 const fn_ty = switch (ty.zigTypeTag()) {
832 .Fn => ty,832 .Fn => ty,
src/link/Wasm/Object.zig+2-1
...@@ -312,7 +312,8 @@ fn Parser(comptime ReaderType: type) type {...@@ -312,7 +312,8 @@ fn Parser(comptime ReaderType: type) type {
312 var section_index: u32 = 0;312 var section_index: u32 = 0;
313 while (self.reader.reader().readByte()) |byte| : (section_index += 1) {313 while (self.reader.reader().readByte()) |byte| : (section_index += 1) {
314 const len = try readLeb(u32, self.reader.reader());314 const len = try readLeb(u32, self.reader.reader());
315 const reader = std.io.limitedReader(self.reader.reader(), len).reader();315 var limited_reader = std.io.limitedReader(self.reader.reader(), len);
316 const reader = limited_reader.reader();
316 switch (@intToEnum(std.wasm.Section, byte)) {317 switch (@intToEnum(std.wasm.Section, byte)) {
317 .custom => {318 .custom => {
318 const name_len = try readLeb(u32, reader);319 const name_len = try readLeb(u32, reader);