mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Merge pull request #22581 from jacobly0/x86_64-rewrite
x86_64: rewrite `@abs` on floats
This commit is contained in:
commit
d0d5ca2b6c
21 changed files with 11030 additions and 826 deletions
|
|
@ -2128,7 +2128,7 @@ pub const Inst = struct {
|
||||||
ref_start_index = static_len,
|
ref_start_index = static_len,
|
||||||
_,
|
_,
|
||||||
|
|
||||||
pub const static_len = 70;
|
pub const static_len = 92;
|
||||||
|
|
||||||
pub fn toRef(i: Index) Inst.Ref {
|
pub fn toRef(i: Index) Inst.Ref {
|
||||||
return @enumFromInt(@intFromEnum(Index.ref_start_index) + @intFromEnum(i));
|
return @enumFromInt(@intFromEnum(Index.ref_start_index) + @intFromEnum(i));
|
||||||
|
|
@ -2211,6 +2211,28 @@ pub const Inst = struct {
|
||||||
single_const_pointer_to_comptime_int_type,
|
single_const_pointer_to_comptime_int_type,
|
||||||
slice_const_u8_type,
|
slice_const_u8_type,
|
||||||
slice_const_u8_sentinel_0_type,
|
slice_const_u8_sentinel_0_type,
|
||||||
|
vector_16_i8_type,
|
||||||
|
vector_32_i8_type,
|
||||||
|
vector_16_u8_type,
|
||||||
|
vector_32_u8_type,
|
||||||
|
vector_8_i16_type,
|
||||||
|
vector_16_i16_type,
|
||||||
|
vector_8_u16_type,
|
||||||
|
vector_16_u16_type,
|
||||||
|
vector_4_i32_type,
|
||||||
|
vector_8_i32_type,
|
||||||
|
vector_4_u32_type,
|
||||||
|
vector_8_u32_type,
|
||||||
|
vector_2_i64_type,
|
||||||
|
vector_4_i64_type,
|
||||||
|
vector_2_u64_type,
|
||||||
|
vector_4_u64_type,
|
||||||
|
vector_4_f16_type,
|
||||||
|
vector_8_f16_type,
|
||||||
|
vector_4_f32_type,
|
||||||
|
vector_8_f32_type,
|
||||||
|
vector_2_f64_type,
|
||||||
|
vector_4_f64_type,
|
||||||
optional_noreturn_type,
|
optional_noreturn_type,
|
||||||
anyerror_void_error_union_type,
|
anyerror_void_error_union_type,
|
||||||
adhoc_inferred_error_set_type,
|
adhoc_inferred_error_set_type,
|
||||||
|
|
|
||||||
22
src/Air.zig
22
src/Air.zig
|
|
@ -984,6 +984,28 @@ pub const Inst = struct {
|
||||||
single_const_pointer_to_comptime_int_type = @intFromEnum(InternPool.Index.single_const_pointer_to_comptime_int_type),
|
single_const_pointer_to_comptime_int_type = @intFromEnum(InternPool.Index.single_const_pointer_to_comptime_int_type),
|
||||||
slice_const_u8_type = @intFromEnum(InternPool.Index.slice_const_u8_type),
|
slice_const_u8_type = @intFromEnum(InternPool.Index.slice_const_u8_type),
|
||||||
slice_const_u8_sentinel_0_type = @intFromEnum(InternPool.Index.slice_const_u8_sentinel_0_type),
|
slice_const_u8_sentinel_0_type = @intFromEnum(InternPool.Index.slice_const_u8_sentinel_0_type),
|
||||||
|
vector_16_i8_type = @intFromEnum(InternPool.Index.vector_16_i8_type),
|
||||||
|
vector_32_i8_type = @intFromEnum(InternPool.Index.vector_32_i8_type),
|
||||||
|
vector_16_u8_type = @intFromEnum(InternPool.Index.vector_16_u8_type),
|
||||||
|
vector_32_u8_type = @intFromEnum(InternPool.Index.vector_32_u8_type),
|
||||||
|
vector_8_i16_type = @intFromEnum(InternPool.Index.vector_8_i16_type),
|
||||||
|
vector_16_i16_type = @intFromEnum(InternPool.Index.vector_16_i16_type),
|
||||||
|
vector_8_u16_type = @intFromEnum(InternPool.Index.vector_8_u16_type),
|
||||||
|
vector_16_u16_type = @intFromEnum(InternPool.Index.vector_16_u16_type),
|
||||||
|
vector_4_i32_type = @intFromEnum(InternPool.Index.vector_4_i32_type),
|
||||||
|
vector_8_i32_type = @intFromEnum(InternPool.Index.vector_8_i32_type),
|
||||||
|
vector_4_u32_type = @intFromEnum(InternPool.Index.vector_4_u32_type),
|
||||||
|
vector_8_u32_type = @intFromEnum(InternPool.Index.vector_8_u32_type),
|
||||||
|
vector_2_i64_type = @intFromEnum(InternPool.Index.vector_2_i64_type),
|
||||||
|
vector_4_i64_type = @intFromEnum(InternPool.Index.vector_4_i64_type),
|
||||||
|
vector_2_u64_type = @intFromEnum(InternPool.Index.vector_2_u64_type),
|
||||||
|
vector_4_u64_type = @intFromEnum(InternPool.Index.vector_4_u64_type),
|
||||||
|
vector_4_f16_type = @intFromEnum(InternPool.Index.vector_4_f16_type),
|
||||||
|
vector_8_f16_type = @intFromEnum(InternPool.Index.vector_8_f16_type),
|
||||||
|
vector_4_f32_type = @intFromEnum(InternPool.Index.vector_4_f32_type),
|
||||||
|
vector_8_f32_type = @intFromEnum(InternPool.Index.vector_8_f32_type),
|
||||||
|
vector_2_f64_type = @intFromEnum(InternPool.Index.vector_2_f64_type),
|
||||||
|
vector_4_f64_type = @intFromEnum(InternPool.Index.vector_4_f64_type),
|
||||||
optional_noreturn_type = @intFromEnum(InternPool.Index.optional_noreturn_type),
|
optional_noreturn_type = @intFromEnum(InternPool.Index.optional_noreturn_type),
|
||||||
anyerror_void_error_union_type = @intFromEnum(InternPool.Index.anyerror_void_error_union_type),
|
anyerror_void_error_union_type = @intFromEnum(InternPool.Index.anyerror_void_error_union_type),
|
||||||
adhoc_inferred_error_set_type = @intFromEnum(InternPool.Index.adhoc_inferred_error_set_type),
|
adhoc_inferred_error_set_type = @intFromEnum(InternPool.Index.adhoc_inferred_error_set_type),
|
||||||
|
|
|
||||||
|
|
@ -4559,12 +4559,37 @@ pub const Index = enum(u32) {
|
||||||
null_type,
|
null_type,
|
||||||
undefined_type,
|
undefined_type,
|
||||||
enum_literal_type,
|
enum_literal_type,
|
||||||
|
|
||||||
manyptr_u8_type,
|
manyptr_u8_type,
|
||||||
manyptr_const_u8_type,
|
manyptr_const_u8_type,
|
||||||
manyptr_const_u8_sentinel_0_type,
|
manyptr_const_u8_sentinel_0_type,
|
||||||
single_const_pointer_to_comptime_int_type,
|
single_const_pointer_to_comptime_int_type,
|
||||||
slice_const_u8_type,
|
slice_const_u8_type,
|
||||||
slice_const_u8_sentinel_0_type,
|
slice_const_u8_sentinel_0_type,
|
||||||
|
|
||||||
|
vector_16_i8_type,
|
||||||
|
vector_32_i8_type,
|
||||||
|
vector_16_u8_type,
|
||||||
|
vector_32_u8_type,
|
||||||
|
vector_8_i16_type,
|
||||||
|
vector_16_i16_type,
|
||||||
|
vector_8_u16_type,
|
||||||
|
vector_16_u16_type,
|
||||||
|
vector_4_i32_type,
|
||||||
|
vector_8_i32_type,
|
||||||
|
vector_4_u32_type,
|
||||||
|
vector_8_u32_type,
|
||||||
|
vector_2_i64_type,
|
||||||
|
vector_4_i64_type,
|
||||||
|
vector_2_u64_type,
|
||||||
|
vector_4_u64_type,
|
||||||
|
vector_4_f16_type,
|
||||||
|
vector_8_f16_type,
|
||||||
|
vector_4_f32_type,
|
||||||
|
vector_8_f32_type,
|
||||||
|
vector_2_f64_type,
|
||||||
|
vector_4_f64_type,
|
||||||
|
|
||||||
optional_noreturn_type,
|
optional_noreturn_type,
|
||||||
anyerror_void_error_union_type,
|
anyerror_void_error_union_type,
|
||||||
/// Used for the inferred error set of inline/comptime function calls.
|
/// Used for the inferred error set of inline/comptime function calls.
|
||||||
|
|
@ -5055,6 +5080,51 @@ pub const static_keys = [_]Key{
|
||||||
},
|
},
|
||||||
} },
|
} },
|
||||||
|
|
||||||
|
// @Vector(16, i8)
|
||||||
|
.{ .vector_type = .{ .len = 16, .child = .i8_type } },
|
||||||
|
// @Vector(32, i8)
|
||||||
|
.{ .vector_type = .{ .len = 32, .child = .i8_type } },
|
||||||
|
// @Vector(16, u8)
|
||||||
|
.{ .vector_type = .{ .len = 16, .child = .u8_type } },
|
||||||
|
// @Vector(32, u8)
|
||||||
|
.{ .vector_type = .{ .len = 32, .child = .u8_type } },
|
||||||
|
// @Vector(8, i16)
|
||||||
|
.{ .vector_type = .{ .len = 8, .child = .i16_type } },
|
||||||
|
// @Vector(16, i16)
|
||||||
|
.{ .vector_type = .{ .len = 16, .child = .i16_type } },
|
||||||
|
// @Vector(8, u16)
|
||||||
|
.{ .vector_type = .{ .len = 8, .child = .u16_type } },
|
||||||
|
// @Vector(16, u16)
|
||||||
|
.{ .vector_type = .{ .len = 16, .child = .u16_type } },
|
||||||
|
// @Vector(4, i32)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .i32_type } },
|
||||||
|
// @Vector(8, i32)
|
||||||
|
.{ .vector_type = .{ .len = 8, .child = .i32_type } },
|
||||||
|
// @Vector(4, u32)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .u32_type } },
|
||||||
|
// @Vector(8, u32)
|
||||||
|
.{ .vector_type = .{ .len = 8, .child = .u32_type } },
|
||||||
|
// @Vector(2, i64)
|
||||||
|
.{ .vector_type = .{ .len = 2, .child = .i64_type } },
|
||||||
|
// @Vector(4, i64)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .i64_type } },
|
||||||
|
// @Vector(2, u64)
|
||||||
|
.{ .vector_type = .{ .len = 2, .child = .u64_type } },
|
||||||
|
// @Vector(8, u64)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .u64_type } },
|
||||||
|
// @Vector(4, f16)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .f16_type } },
|
||||||
|
// @Vector(8, f16)
|
||||||
|
.{ .vector_type = .{ .len = 8, .child = .f16_type } },
|
||||||
|
// @Vector(4, f32)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .f32_type } },
|
||||||
|
// @Vector(8, f32)
|
||||||
|
.{ .vector_type = .{ .len = 8, .child = .f32_type } },
|
||||||
|
// @Vector(2, f64)
|
||||||
|
.{ .vector_type = .{ .len = 2, .child = .f64_type } },
|
||||||
|
// @Vector(4, f64)
|
||||||
|
.{ .vector_type = .{ .len = 4, .child = .f64_type } },
|
||||||
|
|
||||||
// ?noreturn
|
// ?noreturn
|
||||||
.{ .opt_type = .noreturn_type },
|
.{ .opt_type = .noreturn_type },
|
||||||
|
|
||||||
|
|
@ -11681,6 +11751,28 @@ pub fn typeOf(ip: *const InternPool, index: Index) Index {
|
||||||
.single_const_pointer_to_comptime_int_type,
|
.single_const_pointer_to_comptime_int_type,
|
||||||
.slice_const_u8_type,
|
.slice_const_u8_type,
|
||||||
.slice_const_u8_sentinel_0_type,
|
.slice_const_u8_sentinel_0_type,
|
||||||
|
.vector_16_i8_type,
|
||||||
|
.vector_32_i8_type,
|
||||||
|
.vector_16_u8_type,
|
||||||
|
.vector_32_u8_type,
|
||||||
|
.vector_8_i16_type,
|
||||||
|
.vector_16_i16_type,
|
||||||
|
.vector_8_u16_type,
|
||||||
|
.vector_16_u16_type,
|
||||||
|
.vector_4_i32_type,
|
||||||
|
.vector_8_i32_type,
|
||||||
|
.vector_4_u32_type,
|
||||||
|
.vector_8_u32_type,
|
||||||
|
.vector_2_i64_type,
|
||||||
|
.vector_4_i64_type,
|
||||||
|
.vector_2_u64_type,
|
||||||
|
.vector_4_u64_type,
|
||||||
|
.vector_4_f16_type,
|
||||||
|
.vector_8_f16_type,
|
||||||
|
.vector_4_f32_type,
|
||||||
|
.vector_8_f32_type,
|
||||||
|
.vector_2_f64_type,
|
||||||
|
.vector_4_f64_type,
|
||||||
.optional_noreturn_type,
|
.optional_noreturn_type,
|
||||||
.anyerror_void_error_union_type,
|
.anyerror_void_error_union_type,
|
||||||
.adhoc_inferred_error_set_type,
|
.adhoc_inferred_error_set_type,
|
||||||
|
|
@ -11998,6 +12090,30 @@ pub fn zigTypeTag(ip: *const InternPool, index: Index) std.builtin.TypeId {
|
||||||
.slice_const_u8_sentinel_0_type,
|
.slice_const_u8_sentinel_0_type,
|
||||||
=> .pointer,
|
=> .pointer,
|
||||||
|
|
||||||
|
.vector_16_i8_type,
|
||||||
|
.vector_32_i8_type,
|
||||||
|
.vector_16_u8_type,
|
||||||
|
.vector_32_u8_type,
|
||||||
|
.vector_8_i16_type,
|
||||||
|
.vector_16_i16_type,
|
||||||
|
.vector_8_u16_type,
|
||||||
|
.vector_16_u16_type,
|
||||||
|
.vector_4_i32_type,
|
||||||
|
.vector_8_i32_type,
|
||||||
|
.vector_4_u32_type,
|
||||||
|
.vector_8_u32_type,
|
||||||
|
.vector_2_i64_type,
|
||||||
|
.vector_4_i64_type,
|
||||||
|
.vector_2_u64_type,
|
||||||
|
.vector_4_u64_type,
|
||||||
|
.vector_4_f16_type,
|
||||||
|
.vector_8_f16_type,
|
||||||
|
.vector_4_f32_type,
|
||||||
|
.vector_8_f32_type,
|
||||||
|
.vector_2_f64_type,
|
||||||
|
.vector_4_f64_type,
|
||||||
|
=> .vector,
|
||||||
|
|
||||||
.optional_noreturn_type => .optional,
|
.optional_noreturn_type => .optional,
|
||||||
.anyerror_void_error_union_type => .error_union,
|
.anyerror_void_error_union_type => .error_union,
|
||||||
.empty_tuple_type => .@"struct",
|
.empty_tuple_type => .@"struct",
|
||||||
|
|
|
||||||
22
src/Sema.zig
22
src/Sema.zig
|
|
@ -36606,6 +36606,28 @@ pub fn typeHasOnePossibleValue(sema: *Sema, ty: Type) CompileError!?Value {
|
||||||
.single_const_pointer_to_comptime_int_type,
|
.single_const_pointer_to_comptime_int_type,
|
||||||
.slice_const_u8_type,
|
.slice_const_u8_type,
|
||||||
.slice_const_u8_sentinel_0_type,
|
.slice_const_u8_sentinel_0_type,
|
||||||
|
.vector_16_i8_type,
|
||||||
|
.vector_32_i8_type,
|
||||||
|
.vector_16_u8_type,
|
||||||
|
.vector_32_u8_type,
|
||||||
|
.vector_8_i16_type,
|
||||||
|
.vector_16_i16_type,
|
||||||
|
.vector_8_u16_type,
|
||||||
|
.vector_16_u16_type,
|
||||||
|
.vector_4_i32_type,
|
||||||
|
.vector_8_i32_type,
|
||||||
|
.vector_4_u32_type,
|
||||||
|
.vector_8_u32_type,
|
||||||
|
.vector_2_i64_type,
|
||||||
|
.vector_4_i64_type,
|
||||||
|
.vector_2_u64_type,
|
||||||
|
.vector_4_u64_type,
|
||||||
|
.vector_4_f16_type,
|
||||||
|
.vector_8_f16_type,
|
||||||
|
.vector_4_f32_type,
|
||||||
|
.vector_8_f32_type,
|
||||||
|
.vector_2_f64_type,
|
||||||
|
.vector_4_f64_type,
|
||||||
.anyerror_void_error_union_type,
|
.anyerror_void_error_union_type,
|
||||||
=> null,
|
=> null,
|
||||||
.void_type => Value.void,
|
.void_type => Value.void,
|
||||||
|
|
|
||||||
26
src/Type.zig
26
src/Type.zig
|
|
@ -4174,7 +4174,31 @@ pub const single_const_pointer_to_comptime_int: Type = .{
|
||||||
.ip_index = .single_const_pointer_to_comptime_int_type,
|
.ip_index = .single_const_pointer_to_comptime_int_type,
|
||||||
};
|
};
|
||||||
pub const slice_const_u8_sentinel_0: Type = .{ .ip_index = .slice_const_u8_sentinel_0_type };
|
pub const slice_const_u8_sentinel_0: Type = .{ .ip_index = .slice_const_u8_sentinel_0_type };
|
||||||
pub const empty_tuple_type: Type = .{ .ip_index = .empty_tuple_type };
|
|
||||||
|
pub const vector_16_i8: Type = .{ .ip_index = .vector_16_i8_type };
|
||||||
|
pub const vector_32_i8: Type = .{ .ip_index = .vector_32_i8_type };
|
||||||
|
pub const vector_16_u8: Type = .{ .ip_index = .vector_16_u8_type };
|
||||||
|
pub const vector_32_u8: Type = .{ .ip_index = .vector_32_u8_type };
|
||||||
|
pub const vector_8_i16: Type = .{ .ip_index = .vector_8_i16_type };
|
||||||
|
pub const vector_16_i16: Type = .{ .ip_index = .vector_16_i16_type };
|
||||||
|
pub const vector_8_u16: Type = .{ .ip_index = .vector_8_u16_type };
|
||||||
|
pub const vector_16_u16: Type = .{ .ip_index = .vector_16_u16_type };
|
||||||
|
pub const vector_4_i32: Type = .{ .ip_index = .vector_4_i32_type };
|
||||||
|
pub const vector_8_i32: Type = .{ .ip_index = .vector_8_i32_type };
|
||||||
|
pub const vector_4_u32: Type = .{ .ip_index = .vector_4_u32_type };
|
||||||
|
pub const vector_8_u32: Type = .{ .ip_index = .vector_8_u32_type };
|
||||||
|
pub const vector_2_i64: Type = .{ .ip_index = .vector_2_i64_type };
|
||||||
|
pub const vector_4_i64: Type = .{ .ip_index = .vector_4_i64_type };
|
||||||
|
pub const vector_2_u64: Type = .{ .ip_index = .vector_2_u64_type };
|
||||||
|
pub const vector_4_u64: Type = .{ .ip_index = .vector_4_u64_type };
|
||||||
|
pub const vector_4_f16: Type = .{ .ip_index = .vector_4_f16_type };
|
||||||
|
pub const vector_8_f16: Type = .{ .ip_index = .vector_8_f16_type };
|
||||||
|
pub const vector_4_f32: Type = .{ .ip_index = .vector_4_f32_type };
|
||||||
|
pub const vector_8_f32: Type = .{ .ip_index = .vector_8_f32_type };
|
||||||
|
pub const vector_2_f64: Type = .{ .ip_index = .vector_2_f64_type };
|
||||||
|
pub const vector_4_f64: Type = .{ .ip_index = .vector_4_f64_type };
|
||||||
|
|
||||||
|
pub const empty_tuple: Type = .{ .ip_index = .empty_tuple_type };
|
||||||
|
|
||||||
pub const generic_poison: Type = .{ .ip_index = .generic_poison_type };
|
pub const generic_poison: Type = .{ .ip_index = .generic_poison_type };
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -361,7 +361,7 @@ pub const Mnemonic = enum {
|
||||||
addps, addss,
|
addps, addss,
|
||||||
andps,
|
andps,
|
||||||
andnps,
|
andnps,
|
||||||
cmpps, cmpss,
|
cmpps, cmpss, comiss,
|
||||||
cvtpi2ps, cvtps2pi, cvtsi2ss, cvtss2si, cvttps2pi, cvttss2si,
|
cvtpi2ps, cvtps2pi, cvtsi2ss, cvtss2si, cvttps2pi, cvttss2si,
|
||||||
divps, divss,
|
divps, divss,
|
||||||
fxrstor, fxrstor64, fxsave, fxsave64,
|
fxrstor, fxrstor64, fxsave, fxsave64,
|
||||||
|
|
@ -386,7 +386,7 @@ pub const Mnemonic = enum {
|
||||||
andpd,
|
andpd,
|
||||||
andnpd,
|
andnpd,
|
||||||
cmppd, //cmpsd,
|
cmppd, //cmpsd,
|
||||||
comisd, comiss,
|
comisd,
|
||||||
cvtdq2pd, cvtdq2ps, cvtpd2dq, cvtpd2pi, cvtpd2ps, cvtpi2pd,
|
cvtdq2pd, cvtdq2ps, cvtpd2dq, cvtpd2pi, cvtpd2ps, cvtpi2pd,
|
||||||
cvtps2dq, cvtps2pd, cvtsd2si, cvtsd2ss, cvtsi2sd, cvtss2sd,
|
cvtps2dq, cvtps2pd, cvtsd2si, cvtsd2ss, cvtsi2sd, cvtss2sd,
|
||||||
cvttpd2dq, cvttpd2pi, cvttps2dq, cvttsd2si,
|
cvttpd2dq, cvttpd2pi, cvttps2dq, cvttsd2si,
|
||||||
|
|
@ -504,6 +504,7 @@ pub const Mnemonic = enum {
|
||||||
vstmxcsr,
|
vstmxcsr,
|
||||||
vsubpd, vsubps, vsubsd, vsubss,
|
vsubpd, vsubps, vsubsd, vsubss,
|
||||||
vtestpd, vtestps,
|
vtestpd, vtestps,
|
||||||
|
vucomisd, vucomiss,
|
||||||
vxorpd, vxorps,
|
vxorpd, vxorps,
|
||||||
// F16C
|
// F16C
|
||||||
vcvtph2ps, vcvtps2ph,
|
vcvtph2ps, vcvtps2ph,
|
||||||
|
|
|
||||||
|
|
@ -354,6 +354,8 @@ pub const Inst = struct {
|
||||||
fn_env,
|
fn_env,
|
||||||
/// Float No Wait ___ status word
|
/// Float No Wait ___ status word
|
||||||
fn_sw,
|
fn_sw,
|
||||||
|
/// Float Extended ___
|
||||||
|
fx_,
|
||||||
|
|
||||||
/// ___ in 32-bit and Compatibility Mode
|
/// ___ in 32-bit and Compatibility Mode
|
||||||
_32,
|
_32,
|
||||||
|
|
@ -817,8 +819,10 @@ pub const Inst = struct {
|
||||||
/// Round to integer
|
/// Round to integer
|
||||||
rndint,
|
rndint,
|
||||||
/// Restore x87 FPU state
|
/// Restore x87 FPU state
|
||||||
|
/// Restore x87 FPU, MMX, XMM, and MXCSR state
|
||||||
rstor,
|
rstor,
|
||||||
/// Store x87 FPU state
|
/// Store x87 FPU state
|
||||||
|
/// Save x87 FPU, MMX technology, and MXCSR state
|
||||||
save,
|
save,
|
||||||
/// Scale
|
/// Scale
|
||||||
scale,
|
scale,
|
||||||
|
|
@ -923,10 +927,6 @@ pub const Inst = struct {
|
||||||
/// Extract doubleword
|
/// Extract doubleword
|
||||||
/// Extract quadword
|
/// Extract quadword
|
||||||
extr,
|
extr,
|
||||||
/// Restore x87 FPU, MMX, XMM, and MXCSR state
|
|
||||||
fxrstor,
|
|
||||||
/// Save x87 FPU, MMX technology, and MXCSR state
|
|
||||||
fxsave,
|
|
||||||
/// Insert byte
|
/// Insert byte
|
||||||
/// Insert word
|
/// Insert word
|
||||||
/// Insert doubleword
|
/// Insert doubleword
|
||||||
|
|
|
||||||
|
|
@ -366,7 +366,7 @@ pub const Register = enum(u8) {
|
||||||
@intFromEnum(Register.eax) ... @intFromEnum(Register.r15d) => @intFromEnum(Register.eax),
|
@intFromEnum(Register.eax) ... @intFromEnum(Register.r15d) => @intFromEnum(Register.eax),
|
||||||
@intFromEnum(Register.ax) ... @intFromEnum(Register.r15w) => @intFromEnum(Register.ax),
|
@intFromEnum(Register.ax) ... @intFromEnum(Register.r15w) => @intFromEnum(Register.ax),
|
||||||
@intFromEnum(Register.al) ... @intFromEnum(Register.r15b) => @intFromEnum(Register.al),
|
@intFromEnum(Register.al) ... @intFromEnum(Register.r15b) => @intFromEnum(Register.al),
|
||||||
@intFromEnum(Register.ah) ... @intFromEnum(Register.bh) => @intFromEnum(Register.ah) - 4,
|
@intFromEnum(Register.ah) ... @intFromEnum(Register.bh) => @intFromEnum(Register.ah),
|
||||||
else => unreachable,
|
else => unreachable,
|
||||||
// zig fmt: on
|
// zig fmt: on
|
||||||
};
|
};
|
||||||
|
|
@ -385,7 +385,10 @@ pub const Register = enum(u8) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn to8(reg: Register) Register {
|
pub fn to8(reg: Register) Register {
|
||||||
return @enumFromInt(@intFromEnum(reg) - reg.gpBase() + @intFromEnum(Register.al));
|
return switch (@intFromEnum(reg)) {
|
||||||
|
else => @enumFromInt(@intFromEnum(reg) - reg.gpBase() + @intFromEnum(Register.al)),
|
||||||
|
@intFromEnum(Register.ah)...@intFromEnum(Register.bh) => reg,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sseBase(reg: Register) u7 {
|
fn sseBase(reg: Register) u7 {
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,7 @@ pub const table = [_]Entry{
|
||||||
.{ .jmp, .d, &.{ .rel32 }, &.{ 0xe9 }, 0, .none, .none },
|
.{ .jmp, .d, &.{ .rel32 }, &.{ 0xe9 }, 0, .none, .none },
|
||||||
.{ .jmp, .m, &.{ .rm64 }, &.{ 0xff }, 4, .none, .none },
|
.{ .jmp, .m, &.{ .rm64 }, &.{ 0xff }, 4, .none, .none },
|
||||||
|
|
||||||
|
.{ .lahf, .z, &.{}, &.{ 0x9f }, 0, .none, .@"32bit" },
|
||||||
.{ .lahf, .z, &.{}, &.{ 0x9f }, 0, .none, .sahf },
|
.{ .lahf, .z, &.{}, &.{ 0x9f }, 0, .none, .sahf },
|
||||||
|
|
||||||
.{ .lar, .rm, &.{ .r16, .rm16 }, &.{ 0x0f, 0x02 }, 0, .none, .none },
|
.{ .lar, .rm, &.{ .r16, .rm16 }, &.{ 0x0f, 0x02 }, 0, .none, .none },
|
||||||
|
|
@ -744,6 +745,7 @@ pub const table = [_]Entry{
|
||||||
|
|
||||||
.{ .rsm, .z, &.{}, &.{ 0x0f, 0xaa }, 0, .none, .none },
|
.{ .rsm, .z, &.{}, &.{ 0x0f, 0xaa }, 0, .none, .none },
|
||||||
|
|
||||||
|
.{ .sahf, .z, &.{}, &.{ 0x9e }, 0, .none, .@"32bit" },
|
||||||
.{ .sahf, .z, &.{}, &.{ 0x9e }, 0, .none, .sahf },
|
.{ .sahf, .z, &.{}, &.{ 0x9e }, 0, .none, .sahf },
|
||||||
|
|
||||||
.{ .sal, .m1, &.{ .rm8, .unity }, &.{ 0xd0 }, 4, .none, .none },
|
.{ .sal, .m1, &.{ .rm8, .unity }, &.{ 0xd0 }, 4, .none, .none },
|
||||||
|
|
@ -2275,6 +2277,10 @@ pub const table = [_]Entry{
|
||||||
.{ .vtestpd, .rm, &.{ .xmm, .xmm_m128 }, &.{ 0x66, 0x0f, 0x38, 0x0f }, 0, .vex_128_w0, .avx },
|
.{ .vtestpd, .rm, &.{ .xmm, .xmm_m128 }, &.{ 0x66, 0x0f, 0x38, 0x0f }, 0, .vex_128_w0, .avx },
|
||||||
.{ .vtestpd, .rm, &.{ .ymm, .ymm_m256 }, &.{ 0x66, 0x0f, 0x38, 0x0f }, 0, .vex_256_w0, .avx },
|
.{ .vtestpd, .rm, &.{ .ymm, .ymm_m256 }, &.{ 0x66, 0x0f, 0x38, 0x0f }, 0, .vex_256_w0, .avx },
|
||||||
|
|
||||||
|
.{ .vucomisd, .rm, &.{ .xmm, .xmm_m64 }, &.{ 0x66, 0x0f, 0x2e }, 0, .vex_lig_wig, .avx },
|
||||||
|
|
||||||
|
.{ .vucomiss, .rm, &.{ .xmm, .xmm_m32 }, &.{ 0x0f, 0x2e }, 0, .vex_lig_wig, .avx },
|
||||||
|
|
||||||
.{ .vxorpd, .rvm, &.{ .xmm, .xmm, .xmm_m128 }, &.{ 0x66, 0x0f, 0x57 }, 0, .vex_128_wig, .avx },
|
.{ .vxorpd, .rvm, &.{ .xmm, .xmm, .xmm_m128 }, &.{ 0x66, 0x0f, 0x57 }, 0, .vex_128_wig, .avx },
|
||||||
.{ .vxorpd, .rvm, &.{ .ymm, .ymm, .ymm_m256 }, &.{ 0x66, 0x0f, 0x57 }, 0, .vex_256_wig, .avx },
|
.{ .vxorpd, .rvm, &.{ .ymm, .ymm, .ymm_m256 }, &.{ 0x66, 0x0f, 0x57 }, 0, .vex_256_wig, .avx },
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -706,7 +706,7 @@ pub const DeclGen = struct {
|
||||||
const uav_ty = uav_val.typeOf(zcu);
|
const uav_ty = uav_val.typeOf(zcu);
|
||||||
|
|
||||||
// Render an undefined pointer if we have a pointer to a zero-bit or comptime type.
|
// Render an undefined pointer if we have a pointer to a zero-bit or comptime type.
|
||||||
const ptr_ty = Type.fromInterned(uav.orig_ty);
|
const ptr_ty: Type = .fromInterned(uav.orig_ty);
|
||||||
if (ptr_ty.isPtrAtRuntime(zcu) and !uav_ty.isFnOrHasRuntimeBits(zcu)) {
|
if (ptr_ty.isPtrAtRuntime(zcu) and !uav_ty.isFnOrHasRuntimeBits(zcu)) {
|
||||||
return dg.writeCValue(writer, .{ .undef = ptr_ty });
|
return dg.writeCValue(writer, .{ .undef = ptr_ty });
|
||||||
}
|
}
|
||||||
|
|
@ -782,7 +782,7 @@ pub const DeclGen = struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Render an undefined pointer if we have a pointer to a zero-bit or comptime type.
|
// Render an undefined pointer if we have a pointer to a zero-bit or comptime type.
|
||||||
const nav_ty = Type.fromInterned(ip.getNav(owner_nav).typeOf(ip));
|
const nav_ty: Type = .fromInterned(ip.getNav(owner_nav).typeOf(ip));
|
||||||
const ptr_ty = try pt.navPtrType(owner_nav);
|
const ptr_ty = try pt.navPtrType(owner_nav);
|
||||||
if (!nav_ty.isFnOrHasRuntimeBits(zcu)) {
|
if (!nav_ty.isFnOrHasRuntimeBits(zcu)) {
|
||||||
return dg.writeCValue(writer, .{ .undef = ptr_ty });
|
return dg.writeCValue(writer, .{ .undef = ptr_ty });
|
||||||
|
|
@ -819,7 +819,7 @@ pub const DeclGen = struct {
|
||||||
.comptime_alloc_ptr, .comptime_field_ptr => unreachable,
|
.comptime_alloc_ptr, .comptime_field_ptr => unreachable,
|
||||||
.int => |int| {
|
.int => |int| {
|
||||||
const ptr_ctype = try dg.ctypeFromType(int.ptr_ty, .complete);
|
const ptr_ctype = try dg.ctypeFromType(int.ptr_ty, .complete);
|
||||||
const addr_val = try pt.intValue(Type.usize, int.addr);
|
const addr_val = try pt.intValue(.usize, int.addr);
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try dg.renderCType(writer, ptr_ctype);
|
try dg.renderCType(writer, ptr_ctype);
|
||||||
try writer.print("){x}", .{try dg.fmtIntLiteral(addr_val, .Other)});
|
try writer.print("){x}", .{try dg.fmtIntLiteral(addr_val, .Other)});
|
||||||
|
|
@ -859,7 +859,7 @@ pub const DeclGen = struct {
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try dg.renderCType(writer, ptr_ctype);
|
try dg.renderCType(writer, ptr_ctype);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
const offset_val = try pt.intValue(Type.usize, byte_offset);
|
const offset_val = try pt.intValue(.usize, byte_offset);
|
||||||
try writer.writeAll("((char *)");
|
try writer.writeAll("((char *)");
|
||||||
try dg.renderPointer(writer, field.parent.*, location);
|
try dg.renderPointer(writer, field.parent.*, location);
|
||||||
try writer.print(" + {})", .{try dg.fmtIntLiteral(offset_val, .Other)});
|
try writer.print(" + {})", .{try dg.fmtIntLiteral(offset_val, .Other)});
|
||||||
|
|
@ -875,7 +875,7 @@ pub const DeclGen = struct {
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
try dg.renderPointer(writer, elem.parent.*, location);
|
try dg.renderPointer(writer, elem.parent.*, location);
|
||||||
} else {
|
} else {
|
||||||
const index_val = try pt.intValue(Type.usize, elem.elem_idx);
|
const index_val = try pt.intValue(.usize, elem.elem_idx);
|
||||||
// We want to do pointer arithmetic on a pointer to the element type.
|
// We want to do pointer arithmetic on a pointer to the element type.
|
||||||
// We might have a pointer-to-array. In this case, we must cast first.
|
// We might have a pointer-to-array. In this case, we must cast first.
|
||||||
const result_ctype = try dg.ctypeFromType(elem.result_ptr_ty, .complete);
|
const result_ctype = try dg.ctypeFromType(elem.result_ptr_ty, .complete);
|
||||||
|
|
@ -904,7 +904,7 @@ pub const DeclGen = struct {
|
||||||
if (oac.byte_offset == 0) {
|
if (oac.byte_offset == 0) {
|
||||||
try dg.renderPointer(writer, oac.parent.*, location);
|
try dg.renderPointer(writer, oac.parent.*, location);
|
||||||
} else {
|
} else {
|
||||||
const offset_val = try pt.intValue(Type.usize, oac.byte_offset);
|
const offset_val = try pt.intValue(.usize, oac.byte_offset);
|
||||||
try writer.writeAll("((char *)");
|
try writer.writeAll("((char *)");
|
||||||
try dg.renderPointer(writer, oac.parent.*, location);
|
try dg.renderPointer(writer, oac.parent.*, location);
|
||||||
try writer.print(" + {})", .{try dg.fmtIntLiteral(offset_val, .Other)});
|
try writer.print(" + {})", .{try dg.fmtIntLiteral(offset_val, .Other)});
|
||||||
|
|
@ -984,7 +984,7 @@ pub const DeclGen = struct {
|
||||||
try writer.writeAll("((");
|
try writer.writeAll("((");
|
||||||
try dg.renderCType(writer, ctype);
|
try dg.renderCType(writer, ctype);
|
||||||
try writer.print("){x})", .{try dg.fmtIntLiteral(
|
try writer.print("){x})", .{try dg.fmtIntLiteral(
|
||||||
try pt.intValue(Type.usize, val.toUnsignedInt(zcu)),
|
try pt.intValue(.usize, val.toUnsignedInt(zcu)),
|
||||||
.Other,
|
.Other,
|
||||||
)});
|
)});
|
||||||
},
|
},
|
||||||
|
|
@ -1153,7 +1153,7 @@ pub const DeclGen = struct {
|
||||||
else => |payload| switch (ip.indexToKey(payload)) {
|
else => |payload| switch (ip.indexToKey(payload)) {
|
||||||
.undef => |err_ty| try dg.renderUndefValue(
|
.undef => |err_ty| try dg.renderUndefValue(
|
||||||
writer,
|
writer,
|
||||||
Type.fromInterned(err_ty),
|
.fromInterned(err_ty),
|
||||||
location,
|
location,
|
||||||
),
|
),
|
||||||
.err => |err| try dg.renderErrorName(writer, err.name),
|
.err => |err| try dg.renderErrorName(writer, err.name),
|
||||||
|
|
@ -1204,7 +1204,7 @@ pub const DeclGen = struct {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
.ptr => try writer.writeAll("NULL"),
|
.ptr => try writer.writeAll("NULL"),
|
||||||
.len => try dg.renderUndefValue(writer, Type.usize, initializer_type),
|
.len => try dg.renderUndefValue(writer, .usize, initializer_type),
|
||||||
else => unreachable,
|
else => unreachable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1219,7 +1219,7 @@ pub const DeclGen = struct {
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
}
|
}
|
||||||
const ai = ty.arrayInfo(zcu);
|
const ai = ty.arrayInfo(zcu);
|
||||||
if (ai.elem_type.eql(Type.u8, zcu)) {
|
if (ai.elem_type.eql(.u8, zcu)) {
|
||||||
var literal = stringLiteral(writer, ty.arrayLenIncludingSentinel(zcu));
|
var literal = stringLiteral(writer, ty.arrayLenIncludingSentinel(zcu));
|
||||||
try literal.start();
|
try literal.start();
|
||||||
var index: usize = 0;
|
var index: usize = 0;
|
||||||
|
|
@ -1263,7 +1263,7 @@ pub const DeclGen = struct {
|
||||||
for (0..tuple.types.len) |field_index| {
|
for (0..tuple.types.len) |field_index| {
|
||||||
const comptime_val = tuple.values.get(ip)[field_index];
|
const comptime_val = tuple.values.get(ip)[field_index];
|
||||||
if (comptime_val != .none) continue;
|
if (comptime_val != .none) continue;
|
||||||
const field_ty = Type.fromInterned(tuple.types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(tuple.types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
if (!empty) try writer.writeByte(',');
|
if (!empty) try writer.writeByte(',');
|
||||||
|
|
@ -1298,7 +1298,7 @@ pub const DeclGen = struct {
|
||||||
var field_it = loaded_struct.iterateRuntimeOrder(ip);
|
var field_it = loaded_struct.iterateRuntimeOrder(ip);
|
||||||
var need_comma = false;
|
var need_comma = false;
|
||||||
while (field_it.next()) |field_index| {
|
while (field_it.next()) |field_index| {
|
||||||
const field_ty = Type.fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
if (need_comma) try writer.writeByte(',');
|
if (need_comma) try writer.writeByte(',');
|
||||||
|
|
@ -1325,7 +1325,7 @@ pub const DeclGen = struct {
|
||||||
var eff_num_fields: usize = 0;
|
var eff_num_fields: usize = 0;
|
||||||
|
|
||||||
for (0..loaded_struct.field_types.len) |field_index| {
|
for (0..loaded_struct.field_types.len) |field_index| {
|
||||||
const field_ty = Type.fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
eff_num_fields += 1;
|
eff_num_fields += 1;
|
||||||
}
|
}
|
||||||
|
|
@ -1346,7 +1346,7 @@ pub const DeclGen = struct {
|
||||||
var eff_index: usize = 0;
|
var eff_index: usize = 0;
|
||||||
var needs_closing_paren = false;
|
var needs_closing_paren = false;
|
||||||
for (0..loaded_struct.field_types.len) |field_index| {
|
for (0..loaded_struct.field_types.len) |field_index| {
|
||||||
const field_ty = Type.fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
const field_val = switch (ip.indexToKey(val.toIntern()).aggregate.storage) {
|
const field_val = switch (ip.indexToKey(val.toIntern()).aggregate.storage) {
|
||||||
|
|
@ -1382,7 +1382,7 @@ pub const DeclGen = struct {
|
||||||
// a << a_off | b << b_off | c << c_off
|
// a << a_off | b << b_off | c << c_off
|
||||||
var empty = true;
|
var empty = true;
|
||||||
for (0..loaded_struct.field_types.len) |field_index| {
|
for (0..loaded_struct.field_types.len) |field_index| {
|
||||||
const field_ty = Type.fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
if (!empty) try writer.writeAll(" | ");
|
if (!empty) try writer.writeAll(" | ");
|
||||||
|
|
@ -1466,7 +1466,7 @@ pub const DeclGen = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
const field_index = zcu.unionTagFieldIndex(loaded_union, Value.fromInterned(un.tag)).?;
|
const field_index = zcu.unionTagFieldIndex(loaded_union, Value.fromInterned(un.tag)).?;
|
||||||
const field_ty = Type.fromInterned(loaded_union.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_union.field_types.get(ip)[field_index]);
|
||||||
const field_name = loaded_union.loadTagType(ip).names.get(ip)[field_index];
|
const field_name = loaded_union.loadTagType(ip).names.get(ip)[field_index];
|
||||||
if (loaded_union.flagsUnordered(ip).layout == .@"packed") {
|
if (loaded_union.flagsUnordered(ip).layout == .@"packed") {
|
||||||
if (field_ty.hasRuntimeBits(zcu)) {
|
if (field_ty.hasRuntimeBits(zcu)) {
|
||||||
|
|
@ -1509,7 +1509,7 @@ pub const DeclGen = struct {
|
||||||
);
|
);
|
||||||
try writer.writeByte(' ');
|
try writer.writeByte(' ');
|
||||||
} else for (0..loaded_union.field_types.len) |inner_field_index| {
|
} else for (0..loaded_union.field_types.len) |inner_field_index| {
|
||||||
const inner_field_ty = Type.fromInterned(
|
const inner_field_ty: Type = .fromInterned(
|
||||||
loaded_union.field_types.get(ip)[inner_field_index],
|
loaded_union.field_types.get(ip)[inner_field_index],
|
||||||
);
|
);
|
||||||
if (!inner_field_ty.hasRuntimeBits(zcu)) continue;
|
if (!inner_field_ty.hasRuntimeBits(zcu)) continue;
|
||||||
|
|
@ -1592,7 +1592,7 @@ pub const DeclGen = struct {
|
||||||
try writer.writeAll("((");
|
try writer.writeAll("((");
|
||||||
try dg.renderCType(writer, ctype);
|
try dg.renderCType(writer, ctype);
|
||||||
return writer.print("){x})", .{
|
return writer.print("){x})", .{
|
||||||
try dg.fmtIntLiteral(try pt.undefValue(Type.usize), .Other),
|
try dg.fmtIntLiteral(try pt.undefValue(.usize), .Other),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
.slice => {
|
.slice => {
|
||||||
|
|
@ -1606,14 +1606,14 @@ pub const DeclGen = struct {
|
||||||
const ptr_ty = ty.slicePtrFieldType(zcu);
|
const ptr_ty = ty.slicePtrFieldType(zcu);
|
||||||
try dg.renderType(writer, ptr_ty);
|
try dg.renderType(writer, ptr_ty);
|
||||||
return writer.print("){x}, {0x}}}", .{
|
return writer.print("){x}, {0x}}}", .{
|
||||||
try dg.fmtIntLiteral(try dg.pt.undefValue(Type.usize), .Other),
|
try dg.fmtIntLiteral(try dg.pt.undefValue(.usize), .Other),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.opt_type => |child_type| switch (ctype.info(ctype_pool)) {
|
.opt_type => |child_type| switch (ctype.info(ctype_pool)) {
|
||||||
.basic, .pointer => try dg.renderUndefValue(
|
.basic, .pointer => try dg.renderUndefValue(
|
||||||
writer,
|
writer,
|
||||||
Type.fromInterned(if (ctype.isBool()) .bool_type else child_type),
|
.fromInterned(if (ctype.isBool()) .bool_type else child_type),
|
||||||
location,
|
location,
|
||||||
),
|
),
|
||||||
.aligned, .array, .vector, .fwd_decl, .function => unreachable,
|
.aligned, .array, .vector, .fwd_decl, .function => unreachable,
|
||||||
|
|
@ -1622,7 +1622,7 @@ pub const DeclGen = struct {
|
||||||
.is_null, .payload => {},
|
.is_null, .payload => {},
|
||||||
.ptr, .len => return dg.renderUndefValue(
|
.ptr, .len => return dg.renderUndefValue(
|
||||||
writer,
|
writer,
|
||||||
Type.fromInterned(child_type),
|
.fromInterned(child_type),
|
||||||
location,
|
location,
|
||||||
),
|
),
|
||||||
else => unreachable,
|
else => unreachable,
|
||||||
|
|
@ -1635,7 +1635,7 @@ pub const DeclGen = struct {
|
||||||
try writer.writeByte('{');
|
try writer.writeByte('{');
|
||||||
for (0..aggregate.fields.len) |field_index| {
|
for (0..aggregate.fields.len) |field_index| {
|
||||||
if (field_index > 0) try writer.writeByte(',');
|
if (field_index > 0) try writer.writeByte(',');
|
||||||
try dg.renderUndefValue(writer, Type.fromInterned(
|
try dg.renderUndefValue(writer, .fromInterned(
|
||||||
switch (aggregate.fields.at(field_index, ctype_pool).name.index) {
|
switch (aggregate.fields.at(field_index, ctype_pool).name.index) {
|
||||||
.is_null => .bool_type,
|
.is_null => .bool_type,
|
||||||
.payload => child_type,
|
.payload => child_type,
|
||||||
|
|
@ -1660,7 +1660,7 @@ pub const DeclGen = struct {
|
||||||
var field_it = loaded_struct.iterateRuntimeOrder(ip);
|
var field_it = loaded_struct.iterateRuntimeOrder(ip);
|
||||||
var need_comma = false;
|
var need_comma = false;
|
||||||
while (field_it.next()) |field_index| {
|
while (field_it.next()) |field_index| {
|
||||||
const field_ty = Type.fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
if (need_comma) try writer.writeByte(',');
|
if (need_comma) try writer.writeByte(',');
|
||||||
|
|
@ -1685,7 +1685,7 @@ pub const DeclGen = struct {
|
||||||
var need_comma = false;
|
var need_comma = false;
|
||||||
for (0..tuple_info.types.len) |field_index| {
|
for (0..tuple_info.types.len) |field_index| {
|
||||||
if (tuple_info.values.get(ip)[field_index] != .none) continue;
|
if (tuple_info.values.get(ip)[field_index] != .none) continue;
|
||||||
const field_ty = Type.fromInterned(tuple_info.types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(tuple_info.types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
if (need_comma) try writer.writeByte(',');
|
if (need_comma) try writer.writeByte(',');
|
||||||
|
|
@ -1715,13 +1715,13 @@ pub const DeclGen = struct {
|
||||||
.payload) {
|
.payload) {
|
||||||
.tag => try dg.renderUndefValue(
|
.tag => try dg.renderUndefValue(
|
||||||
writer,
|
writer,
|
||||||
Type.fromInterned(loaded_union.enum_tag_ty),
|
.fromInterned(loaded_union.enum_tag_ty),
|
||||||
initializer_type,
|
initializer_type,
|
||||||
),
|
),
|
||||||
.payload => {
|
.payload => {
|
||||||
try writer.writeByte('{');
|
try writer.writeByte('{');
|
||||||
for (0..loaded_union.field_types.len) |inner_field_index| {
|
for (0..loaded_union.field_types.len) |inner_field_index| {
|
||||||
const inner_field_ty = Type.fromInterned(
|
const inner_field_ty: Type = .fromInterned(
|
||||||
loaded_union.field_types.get(ip)[inner_field_index],
|
loaded_union.field_types.get(ip)[inner_field_index],
|
||||||
);
|
);
|
||||||
if (!inner_field_ty.hasRuntimeBits(pt.zcu)) continue;
|
if (!inner_field_ty.hasRuntimeBits(pt.zcu)) continue;
|
||||||
|
|
@ -1747,7 +1747,7 @@ pub const DeclGen = struct {
|
||||||
.error_union_type => |error_union_type| switch (ctype.info(ctype_pool)) {
|
.error_union_type => |error_union_type| switch (ctype.info(ctype_pool)) {
|
||||||
.basic => try dg.renderUndefValue(
|
.basic => try dg.renderUndefValue(
|
||||||
writer,
|
writer,
|
||||||
Type.fromInterned(error_union_type.error_set_type),
|
.fromInterned(error_union_type.error_set_type),
|
||||||
location,
|
location,
|
||||||
),
|
),
|
||||||
.pointer, .aligned, .array, .vector, .fwd_decl, .function => unreachable,
|
.pointer, .aligned, .array, .vector, .fwd_decl, .function => unreachable,
|
||||||
|
|
@ -1762,7 +1762,7 @@ pub const DeclGen = struct {
|
||||||
if (field_index > 0) try writer.writeByte(',');
|
if (field_index > 0) try writer.writeByte(',');
|
||||||
try dg.renderUndefValue(
|
try dg.renderUndefValue(
|
||||||
writer,
|
writer,
|
||||||
Type.fromInterned(
|
.fromInterned(
|
||||||
switch (aggregate.fields.at(field_index, ctype_pool).name.index) {
|
switch (aggregate.fields.at(field_index, ctype_pool).name.index) {
|
||||||
.@"error" => error_union_type.error_set_type,
|
.@"error" => error_union_type.error_set_type,
|
||||||
.payload => error_union_type.payload_type,
|
.payload => error_union_type.payload_type,
|
||||||
|
|
@ -1777,7 +1777,7 @@ pub const DeclGen = struct {
|
||||||
},
|
},
|
||||||
.array_type, .vector_type => {
|
.array_type, .vector_type => {
|
||||||
const ai = ty.arrayInfo(zcu);
|
const ai = ty.arrayInfo(zcu);
|
||||||
if (ai.elem_type.eql(Type.u8, zcu)) {
|
if (ai.elem_type.eql(.u8, zcu)) {
|
||||||
const c_len = ty.arrayLenIncludingSentinel(zcu);
|
const c_len = ty.arrayLenIncludingSentinel(zcu);
|
||||||
var literal = stringLiteral(writer, c_len);
|
var literal = stringLiteral(writer, c_len);
|
||||||
try literal.start();
|
try literal.start();
|
||||||
|
|
@ -1981,8 +1981,8 @@ pub const DeclGen = struct {
|
||||||
|
|
||||||
const src_is_ptr = src_ty.isPtrAtRuntime(pt.zcu);
|
const src_is_ptr = src_ty.isPtrAtRuntime(pt.zcu);
|
||||||
const src_eff_ty: Type = if (src_is_ptr) switch (dest_int_info.signedness) {
|
const src_eff_ty: Type = if (src_is_ptr) switch (dest_int_info.signedness) {
|
||||||
.unsigned => Type.usize,
|
.unsigned => .usize,
|
||||||
.signed => Type.isize,
|
.signed => .isize,
|
||||||
} else src_ty;
|
} else src_ty;
|
||||||
|
|
||||||
const src_bits = src_eff_ty.bitSize(zcu);
|
const src_bits = src_eff_ty.bitSize(zcu);
|
||||||
|
|
@ -2022,8 +2022,8 @@ pub const DeclGen = struct {
|
||||||
|
|
||||||
const src_is_ptr = src_ty.isPtrAtRuntime(zcu);
|
const src_is_ptr = src_ty.isPtrAtRuntime(zcu);
|
||||||
const src_eff_ty: Type = if (src_is_ptr) switch (dest_int_info.signedness) {
|
const src_eff_ty: Type = if (src_is_ptr) switch (dest_int_info.signedness) {
|
||||||
.unsigned => Type.usize,
|
.unsigned => .usize,
|
||||||
.signed => Type.isize,
|
.signed => .isize,
|
||||||
} else src_ty;
|
} else src_ty;
|
||||||
|
|
||||||
const src_bits = src_eff_ty.bitSize(zcu);
|
const src_bits = src_eff_ty.bitSize(zcu);
|
||||||
|
|
@ -2249,7 +2249,7 @@ pub const DeclGen = struct {
|
||||||
if (flags.is_threadlocal and !dg.mod.single_threaded) try fwd.writeAll("zig_threadlocal ");
|
if (flags.is_threadlocal and !dg.mod.single_threaded) try fwd.writeAll("zig_threadlocal ");
|
||||||
try dg.renderTypeAndName(
|
try dg.renderTypeAndName(
|
||||||
fwd,
|
fwd,
|
||||||
Type.fromInterned(nav.typeOf(ip)),
|
.fromInterned(nav.typeOf(ip)),
|
||||||
.{ .nav = nav_index },
|
.{ .nav = nav_index },
|
||||||
CQualifiers.init(.{ .@"const" = flags.is_const }),
|
CQualifiers.init(.{ .@"const" = flags.is_const }),
|
||||||
nav.getAlignment(),
|
nav.getAlignment(),
|
||||||
|
|
@ -2321,7 +2321,7 @@ pub const DeclGen = struct {
|
||||||
|
|
||||||
if (is_big) try writer.print(", {}", .{int_info.signedness == .signed});
|
if (is_big) try writer.print(", {}", .{int_info.signedness == .signed});
|
||||||
try writer.print(", {}", .{try dg.fmtIntLiteral(
|
try writer.print(", {}", .{try dg.fmtIntLiteral(
|
||||||
try pt.intValue(if (is_big) Type.u16 else Type.u8, int_info.bits),
|
try pt.intValue(if (is_big) .u16 else .u8, int_info.bits),
|
||||||
.FunctionArgument,
|
.FunctionArgument,
|
||||||
)});
|
)});
|
||||||
}
|
}
|
||||||
|
|
@ -2657,7 +2657,7 @@ pub fn genTypeDecl(
|
||||||
},
|
},
|
||||||
.index => |index| if (!found_existing) {
|
.index => |index| if (!found_existing) {
|
||||||
const ip = &zcu.intern_pool;
|
const ip = &zcu.intern_pool;
|
||||||
const ty = Type.fromInterned(index);
|
const ty: Type = .fromInterned(index);
|
||||||
_ = try renderTypePrefix(.flush, global_ctype_pool, zcu, writer, global_ctype, .suffix, .{});
|
_ = try renderTypePrefix(.flush, global_ctype_pool, zcu, writer, global_ctype, .suffix, .{});
|
||||||
try writer.writeByte(';');
|
try writer.writeByte(';');
|
||||||
const file_scope = ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip);
|
const file_scope = ty.typeDeclInstAllowGeneratedTag(zcu).?.resolveFile(ip);
|
||||||
|
|
@ -2772,7 +2772,7 @@ pub fn genErrDecls(o: *Object) !void {
|
||||||
if (val > 1) try writer.writeAll(", ");
|
if (val > 1) try writer.writeAll(", ");
|
||||||
try writer.print("{{" ++ name_prefix ++ "{}, {}}}", .{
|
try writer.print("{{" ++ name_prefix ++ "{}, {}}}", .{
|
||||||
fmtIdent(name),
|
fmtIdent(name),
|
||||||
try o.dg.fmtIntLiteral(try pt.intValue(Type.usize, name.len), .StaticInitializer),
|
try o.dg.fmtIntLiteral(try pt.intValue(.usize, name.len), .StaticInitializer),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
try writer.writeAll("};\n");
|
try writer.writeAll("};\n");
|
||||||
|
|
@ -2788,8 +2788,8 @@ pub fn genLazyFn(o: *Object, lazy_ctype_pool: *const CType.Pool, lazy_fn: LazyFn
|
||||||
const val = lazy_fn.value_ptr;
|
const val = lazy_fn.value_ptr;
|
||||||
switch (key) {
|
switch (key) {
|
||||||
.tag_name => |enum_ty_ip| {
|
.tag_name => |enum_ty_ip| {
|
||||||
const enum_ty = Type.fromInterned(enum_ty_ip);
|
const enum_ty: Type = .fromInterned(enum_ty_ip);
|
||||||
const name_slice_ty = Type.slice_const_u8_sentinel_0;
|
const name_slice_ty: Type = .slice_const_u8_sentinel_0;
|
||||||
|
|
||||||
try w.writeAll("static ");
|
try w.writeAll("static ");
|
||||||
try o.dg.renderType(w, name_slice_ty);
|
try o.dg.renderType(w, name_slice_ty);
|
||||||
|
|
@ -2822,7 +2822,7 @@ pub fn genLazyFn(o: *Object, lazy_ctype_pool: *const CType.Pool, lazy_fn: LazyFn
|
||||||
try o.dg.renderType(w, name_slice_ty);
|
try o.dg.renderType(w, name_slice_ty);
|
||||||
try w.print("){{{}, {}}};\n", .{
|
try w.print("){{{}, {}}};\n", .{
|
||||||
fmtIdent("name"),
|
fmtIdent("name"),
|
||||||
try o.dg.fmtIntLiteral(try pt.intValue(Type.usize, tag_name_len), .Other),
|
try o.dg.fmtIntLiteral(try pt.intValue(.usize, tag_name_len), .Other),
|
||||||
});
|
});
|
||||||
|
|
||||||
try w.writeAll(" }\n");
|
try w.writeAll(" }\n");
|
||||||
|
|
@ -2966,7 +2966,7 @@ pub fn genDecl(o: *Object) !void {
|
||||||
const zcu = pt.zcu;
|
const zcu = pt.zcu;
|
||||||
const ip = &zcu.intern_pool;
|
const ip = &zcu.intern_pool;
|
||||||
const nav = ip.getNav(o.dg.pass.nav);
|
const nav = ip.getNav(o.dg.pass.nav);
|
||||||
const nav_ty = Type.fromInterned(nav.typeOf(ip));
|
const nav_ty: Type = .fromInterned(nav.typeOf(ip));
|
||||||
|
|
||||||
if (!nav_ty.isFnOrHasRuntimeBitsIgnoreComptime(zcu)) return;
|
if (!nav_ty.isFnOrHasRuntimeBitsIgnoreComptime(zcu)) return;
|
||||||
switch (ip.indexToKey(nav.status.fully_resolved.val)) {
|
switch (ip.indexToKey(nav.status.fully_resolved.val)) {
|
||||||
|
|
@ -3717,7 +3717,7 @@ fn airArg(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
if (f.liveness.isUnused(inst)) {
|
if (f.liveness.isUnused(inst)) {
|
||||||
const writer = f.object.writer();
|
const writer = f.object.writer();
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try f.renderType(writer, Type.void);
|
try f.renderType(writer, .void);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
try f.writeCValue(writer, result, .Other);
|
try f.writeCValue(writer, result, .Other);
|
||||||
try writer.writeAll(";\n");
|
try writer.writeAll(";\n");
|
||||||
|
|
@ -3735,7 +3735,7 @@ fn airLoad(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
const ptr_ty = f.typeOf(ty_op.operand);
|
const ptr_ty = f.typeOf(ty_op.operand);
|
||||||
const ptr_scalar_ty = ptr_ty.scalarType(zcu);
|
const ptr_scalar_ty = ptr_ty.scalarType(zcu);
|
||||||
const ptr_info = ptr_scalar_ty.ptrInfo(zcu);
|
const ptr_info = ptr_scalar_ty.ptrInfo(zcu);
|
||||||
const src_ty = Type.fromInterned(ptr_info.child);
|
const src_ty: Type = .fromInterned(ptr_info.child);
|
||||||
|
|
||||||
if (!src_ty.hasRuntimeBitsIgnoreComptime(zcu)) {
|
if (!src_ty.hasRuntimeBitsIgnoreComptime(zcu)) {
|
||||||
try reap(f, inst, &.{ty_op.operand});
|
try reap(f, inst, &.{ty_op.operand});
|
||||||
|
|
@ -3953,7 +3953,7 @@ fn airTrunc(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
.signed => {
|
.signed => {
|
||||||
const c_bits = toCIntBits(scalar_int_info.bits) orelse
|
const c_bits = toCIntBits(scalar_int_info.bits) orelse
|
||||||
return f.fail("TODO: C backend: implement integer types larger than 128 bits", .{});
|
return f.fail("TODO: C backend: implement integer types larger than 128 bits", .{});
|
||||||
const shift_val = try pt.intValue(Type.u8, c_bits - dest_bits);
|
const shift_val = try pt.intValue(.u8, c_bits - dest_bits);
|
||||||
|
|
||||||
try writer.writeAll("zig_shr_");
|
try writer.writeAll("zig_shr_");
|
||||||
try f.object.dg.renderTypeForBuiltinFnName(writer, scalar_ty);
|
try f.object.dg.renderTypeForBuiltinFnName(writer, scalar_ty);
|
||||||
|
|
@ -4019,7 +4019,7 @@ fn airStore(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue {
|
||||||
try writer.writeAll("memset(");
|
try writer.writeAll("memset(");
|
||||||
try f.writeCValue(writer, ptr_val, .FunctionArgument);
|
try f.writeCValue(writer, ptr_val, .FunctionArgument);
|
||||||
try writer.writeAll(", 0xaa, sizeof(");
|
try writer.writeAll(", 0xaa, sizeof(");
|
||||||
try f.renderType(writer, Type.fromInterned(ptr_info.child));
|
try f.renderType(writer, .fromInterned(ptr_info.child));
|
||||||
try writer.writeAll("));\n");
|
try writer.writeAll("));\n");
|
||||||
}
|
}
|
||||||
return .none;
|
return .none;
|
||||||
|
|
@ -4029,7 +4029,7 @@ fn airStore(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue {
|
||||||
ptr_info.flags.alignment.order(src_ty.abiAlignment(zcu)).compare(.gte)
|
ptr_info.flags.alignment.order(src_ty.abiAlignment(zcu)).compare(.gte)
|
||||||
else
|
else
|
||||||
true;
|
true;
|
||||||
const is_array = lowersToArray(Type.fromInterned(ptr_info.child), pt);
|
const is_array = lowersToArray(.fromInterned(ptr_info.child), pt);
|
||||||
const need_memcpy = !is_aligned or is_array;
|
const need_memcpy = !is_aligned or is_array;
|
||||||
|
|
||||||
const src_val = try f.resolveInst(bin_op.rhs);
|
const src_val = try f.resolveInst(bin_op.rhs);
|
||||||
|
|
@ -4040,7 +4040,7 @@ fn airStore(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue {
|
||||||
if (need_memcpy) {
|
if (need_memcpy) {
|
||||||
// For this memcpy to safely work we need the rhs to have the same
|
// For this memcpy to safely work we need the rhs to have the same
|
||||||
// underlying type as the lhs (i.e. they must both be arrays of the same underlying type).
|
// underlying type as the lhs (i.e. they must both be arrays of the same underlying type).
|
||||||
assert(src_ty.eql(Type.fromInterned(ptr_info.child), zcu));
|
assert(src_ty.eql(.fromInterned(ptr_info.child), zcu));
|
||||||
|
|
||||||
// If the source is a constant, writeCValue will emit a brace initialization
|
// If the source is a constant, writeCValue will emit a brace initialization
|
||||||
// so work around this by initializing into new local.
|
// so work around this by initializing into new local.
|
||||||
|
|
@ -4120,7 +4120,7 @@ fn airStore(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue {
|
||||||
|
|
||||||
if (src_ty.isPtrAtRuntime(zcu)) {
|
if (src_ty.isPtrAtRuntime(zcu)) {
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try f.renderType(writer, Type.usize);
|
try f.renderType(writer, .usize);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
}
|
}
|
||||||
try f.writeCValue(writer, src_val, .Other);
|
try f.writeCValue(writer, src_val, .Other);
|
||||||
|
|
@ -4343,8 +4343,8 @@ fn airEquality(
|
||||||
try reap(f, inst, &.{ bin_op.lhs, bin_op.rhs });
|
try reap(f, inst, &.{ bin_op.lhs, bin_op.rhs });
|
||||||
|
|
||||||
const writer = f.object.writer();
|
const writer = f.object.writer();
|
||||||
const local = try f.allocLocal(inst, Type.bool);
|
const local = try f.allocLocal(inst, .bool);
|
||||||
const a = try Assignment.start(f, writer, CType.bool);
|
const a = try Assignment.start(f, writer, .bool);
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
|
|
||||||
|
|
@ -4401,7 +4401,7 @@ fn airCmpLtErrorsLen(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
try reap(f, inst, &.{un_op});
|
try reap(f, inst, &.{un_op});
|
||||||
|
|
||||||
const writer = f.object.writer();
|
const writer = f.object.writer();
|
||||||
const local = try f.allocLocal(inst, Type.bool);
|
const local = try f.allocLocal(inst, .bool);
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.writeAll(" = ");
|
try writer.writeAll(" = ");
|
||||||
try f.writeCValue(writer, operand, .Other);
|
try f.writeCValue(writer, operand, .Other);
|
||||||
|
|
@ -4517,7 +4517,7 @@ fn airSlice(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
try a.end(f, writer);
|
try a.end(f, writer);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const a = try Assignment.start(f, writer, CType.usize);
|
const a = try Assignment.start(f, writer, .usize);
|
||||||
try f.writeCValueMember(writer, local, .{ .identifier = "len" });
|
try f.writeCValueMember(writer, local, .{ .identifier = "len" });
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
try f.writeCValue(writer, len, .Initializer);
|
try f.writeCValue(writer, len, .Initializer);
|
||||||
|
|
@ -4585,9 +4585,9 @@ fn airCall(
|
||||||
else => unreachable,
|
else => unreachable,
|
||||||
};
|
};
|
||||||
const fn_info = zcu.typeToFunc(if (callee_is_ptr) callee_ty.childType(zcu) else callee_ty).?;
|
const fn_info = zcu.typeToFunc(if (callee_is_ptr) callee_ty.childType(zcu) else callee_ty).?;
|
||||||
const ret_ty = Type.fromInterned(fn_info.return_type);
|
const ret_ty: Type = .fromInterned(fn_info.return_type);
|
||||||
const ret_ctype: CType = if (ret_ty.isNoReturn(zcu))
|
const ret_ctype: CType = if (ret_ty.isNoReturn(zcu))
|
||||||
CType.void
|
.void
|
||||||
else
|
else
|
||||||
try f.ctypeFromType(ret_ty, .parameter);
|
try f.ctypeFromType(ret_ty, .parameter);
|
||||||
|
|
||||||
|
|
@ -4599,7 +4599,7 @@ fn airCall(
|
||||||
break :result .none;
|
break :result .none;
|
||||||
} else if (f.liveness.isUnused(inst)) {
|
} else if (f.liveness.isUnused(inst)) {
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try f.renderCType(writer, CType.void);
|
try f.renderCType(writer, .void);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
break :result .none;
|
break :result .none;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -5081,20 +5081,20 @@ fn airBreakpoint(writer: anytype) !CValue {
|
||||||
|
|
||||||
fn airRetAddr(f: *Function, inst: Air.Inst.Index) !CValue {
|
fn airRetAddr(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
const writer = f.object.writer();
|
const writer = f.object.writer();
|
||||||
const local = try f.allocLocal(inst, Type.usize);
|
const local = try f.allocLocal(inst, .usize);
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.writeAll(" = (");
|
try writer.writeAll(" = (");
|
||||||
try f.renderType(writer, Type.usize);
|
try f.renderType(writer, .usize);
|
||||||
try writer.writeAll(")zig_return_address();\n");
|
try writer.writeAll(")zig_return_address();\n");
|
||||||
return local;
|
return local;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn airFrameAddress(f: *Function, inst: Air.Inst.Index) !CValue {
|
fn airFrameAddress(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
const writer = f.object.writer();
|
const writer = f.object.writer();
|
||||||
const local = try f.allocLocal(inst, Type.usize);
|
const local = try f.allocLocal(inst, .usize);
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.writeAll(" = (");
|
try writer.writeAll(" = (");
|
||||||
try f.renderType(writer, Type.usize);
|
try f.renderType(writer, .usize);
|
||||||
try writer.writeAll(")zig_frame_address();\n");
|
try writer.writeAll(")zig_frame_address();\n");
|
||||||
return local;
|
return local;
|
||||||
}
|
}
|
||||||
|
|
@ -5179,10 +5179,10 @@ fn airSwitchBr(f: *Function, inst: Air.Inst.Index, is_dispatch_loop: bool) !void
|
||||||
|
|
||||||
try writer.writeAll("switch (");
|
try writer.writeAll("switch (");
|
||||||
|
|
||||||
const lowered_condition_ty = if (condition_ty.toIntern() == .bool_type)
|
const lowered_condition_ty: Type = if (condition_ty.toIntern() == .bool_type)
|
||||||
Type.u1
|
.u1
|
||||||
else if (condition_ty.isPtrAtRuntime(zcu))
|
else if (condition_ty.isPtrAtRuntime(zcu))
|
||||||
Type.usize
|
.usize
|
||||||
else
|
else
|
||||||
condition_ty;
|
condition_ty;
|
||||||
if (condition_ty.toIntern() != lowered_condition_ty.toIntern()) {
|
if (condition_ty.toIntern() != lowered_condition_ty.toIntern()) {
|
||||||
|
|
@ -5219,7 +5219,7 @@ fn airSwitchBr(f: *Function, inst: Air.Inst.Index, is_dispatch_loop: bool) !void
|
||||||
}
|
}
|
||||||
if (condition_ty.isPtrAtRuntime(zcu)) {
|
if (condition_ty.isPtrAtRuntime(zcu)) {
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try f.renderType(writer, Type.usize);
|
try f.renderType(writer, .usize);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
}
|
}
|
||||||
try f.object.dg.renderValue(writer, (try f.air.value(item, pt)).?, .Other);
|
try f.object.dg.renderValue(writer, (try f.air.value(item, pt)).?, .Other);
|
||||||
|
|
@ -5604,8 +5604,8 @@ fn airIsNull(
|
||||||
const operand = try f.resolveInst(un_op);
|
const operand = try f.resolveInst(un_op);
|
||||||
try reap(f, inst, &.{un_op});
|
try reap(f, inst, &.{un_op});
|
||||||
|
|
||||||
const local = try f.allocLocal(inst, Type.bool);
|
const local = try f.allocLocal(inst, .bool);
|
||||||
const a = try Assignment.start(f, writer, CType.bool);
|
const a = try Assignment.start(f, writer, .bool);
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
|
|
||||||
|
|
@ -5750,7 +5750,7 @@ fn fieldLocation(
|
||||||
} {
|
} {
|
||||||
const zcu = pt.zcu;
|
const zcu = pt.zcu;
|
||||||
const ip = &zcu.intern_pool;
|
const ip = &zcu.intern_pool;
|
||||||
const container_ty = Type.fromInterned(ip.indexToKey(container_ptr_ty.toIntern()).ptr_type.child);
|
const container_ty: Type = .fromInterned(ip.indexToKey(container_ptr_ty.toIntern()).ptr_type.child);
|
||||||
switch (ip.indexToKey(container_ty.toIntern())) {
|
switch (ip.indexToKey(container_ty.toIntern())) {
|
||||||
.struct_type => {
|
.struct_type => {
|
||||||
const loaded_struct = ip.loadStructType(container_ty.toIntern());
|
const loaded_struct = ip.loadStructType(container_ty.toIntern());
|
||||||
|
|
@ -5781,7 +5781,7 @@ fn fieldLocation(
|
||||||
const loaded_union = ip.loadUnionType(container_ty.toIntern());
|
const loaded_union = ip.loadUnionType(container_ty.toIntern());
|
||||||
switch (loaded_union.flagsUnordered(ip).layout) {
|
switch (loaded_union.flagsUnordered(ip).layout) {
|
||||||
.auto, .@"extern" => {
|
.auto, .@"extern" => {
|
||||||
const field_ty = Type.fromInterned(loaded_union.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_union.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu))
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu))
|
||||||
return if (loaded_union.hasTag(ip) and !container_ty.unionHasAllZeroBitFieldTypes(zcu))
|
return if (loaded_union.hasTag(ip) and !container_ty.unionHasAllZeroBitFieldTypes(zcu))
|
||||||
.{ .field = .{ .identifier = "payload" } }
|
.{ .field = .{ .identifier = "payload" } }
|
||||||
|
|
@ -5850,7 +5850,7 @@ fn airFieldParentPtr(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
switch (fieldLocation(container_ptr_ty, field_ptr_ty, extra.field_index, pt)) {
|
switch (fieldLocation(container_ptr_ty, field_ptr_ty, extra.field_index, pt)) {
|
||||||
.begin => try f.writeCValue(writer, field_ptr_val, .Initializer),
|
.begin => try f.writeCValue(writer, field_ptr_val, .Initializer),
|
||||||
.field => |field| {
|
.field => |field| {
|
||||||
const u8_ptr_ty = try pt.adjustPtrTypeChild(field_ptr_ty, Type.u8);
|
const u8_ptr_ty = try pt.adjustPtrTypeChild(field_ptr_ty, .u8);
|
||||||
|
|
||||||
try writer.writeAll("((");
|
try writer.writeAll("((");
|
||||||
try f.renderType(writer, u8_ptr_ty);
|
try f.renderType(writer, u8_ptr_ty);
|
||||||
|
|
@ -5863,14 +5863,14 @@ fn airFieldParentPtr(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
try writer.writeAll("))");
|
try writer.writeAll("))");
|
||||||
},
|
},
|
||||||
.byte_offset => |byte_offset| {
|
.byte_offset => |byte_offset| {
|
||||||
const u8_ptr_ty = try pt.adjustPtrTypeChild(field_ptr_ty, Type.u8);
|
const u8_ptr_ty = try pt.adjustPtrTypeChild(field_ptr_ty, .u8);
|
||||||
|
|
||||||
try writer.writeAll("((");
|
try writer.writeAll("((");
|
||||||
try f.renderType(writer, u8_ptr_ty);
|
try f.renderType(writer, u8_ptr_ty);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
try f.writeCValue(writer, field_ptr_val, .Other);
|
try f.writeCValue(writer, field_ptr_val, .Other);
|
||||||
try writer.print(" - {})", .{
|
try writer.print(" - {})", .{
|
||||||
try f.fmtIntLiteral(try pt.intValue(Type.usize, byte_offset)),
|
try f.fmtIntLiteral(try pt.intValue(.usize, byte_offset)),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -5908,14 +5908,14 @@ fn fieldPtr(
|
||||||
try f.writeCValueDerefMember(writer, container_ptr_val, field);
|
try f.writeCValueDerefMember(writer, container_ptr_val, field);
|
||||||
},
|
},
|
||||||
.byte_offset => |byte_offset| {
|
.byte_offset => |byte_offset| {
|
||||||
const u8_ptr_ty = try pt.adjustPtrTypeChild(field_ptr_ty, Type.u8);
|
const u8_ptr_ty = try pt.adjustPtrTypeChild(field_ptr_ty, .u8);
|
||||||
|
|
||||||
try writer.writeAll("((");
|
try writer.writeAll("((");
|
||||||
try f.renderType(writer, u8_ptr_ty);
|
try f.renderType(writer, u8_ptr_ty);
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
try f.writeCValue(writer, container_ptr_val, .Other);
|
try f.writeCValue(writer, container_ptr_val, .Other);
|
||||||
try writer.print(" + {})", .{
|
try writer.print(" + {})", .{
|
||||||
try f.fmtIntLiteral(try pt.intValue(Type.usize, byte_offset)),
|
try f.fmtIntLiteral(try pt.intValue(.usize, byte_offset)),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -6158,7 +6158,7 @@ fn airWrapOptional(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
const writer = f.object.writer();
|
const writer = f.object.writer();
|
||||||
const local = try f.allocLocal(inst, inst_ty);
|
const local = try f.allocLocal(inst, inst_ty);
|
||||||
{
|
{
|
||||||
const a = try Assignment.start(f, writer, CType.bool);
|
const a = try Assignment.start(f, writer, .bool);
|
||||||
try f.writeCValueMember(writer, local, .{ .identifier = "is_null" });
|
try f.writeCValueMember(writer, local, .{ .identifier = "is_null" });
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
try writer.writeAll("false");
|
try writer.writeAll("false");
|
||||||
|
|
@ -6322,12 +6322,12 @@ fn airIsErr(f: *Function, inst: Air.Inst.Index, is_ptr: bool, operator: []const
|
||||||
const operand = try f.resolveInst(un_op);
|
const operand = try f.resolveInst(un_op);
|
||||||
try reap(f, inst, &.{un_op});
|
try reap(f, inst, &.{un_op});
|
||||||
const operand_ty = f.typeOf(un_op);
|
const operand_ty = f.typeOf(un_op);
|
||||||
const local = try f.allocLocal(inst, Type.bool);
|
const local = try f.allocLocal(inst, .bool);
|
||||||
const err_union_ty = if (is_ptr) operand_ty.childType(zcu) else operand_ty;
|
const err_union_ty = if (is_ptr) operand_ty.childType(zcu) else operand_ty;
|
||||||
const payload_ty = err_union_ty.errorUnionPayload(zcu);
|
const payload_ty = err_union_ty.errorUnionPayload(zcu);
|
||||||
const error_ty = err_union_ty.errorUnionSet(zcu);
|
const error_ty = err_union_ty.errorUnionSet(zcu);
|
||||||
|
|
||||||
const a = try Assignment.start(f, writer, CType.bool);
|
const a = try Assignment.start(f, writer, .bool);
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
const err_int_ty = try pt.errorIntType();
|
const err_int_ty = try pt.errorIntType();
|
||||||
|
|
@ -6385,17 +6385,17 @@ fn airArrayToSlice(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
if (operand_child_ctype.info(ctype_pool) == .array) {
|
if (operand_child_ctype.info(ctype_pool) == .array) {
|
||||||
try writer.writeByte('&');
|
try writer.writeByte('&');
|
||||||
try f.writeCValueDeref(writer, operand);
|
try f.writeCValueDeref(writer, operand);
|
||||||
try writer.print("[{}]", .{try f.fmtIntLiteral(try pt.intValue(Type.usize, 0))});
|
try writer.print("[{}]", .{try f.fmtIntLiteral(try pt.intValue(.usize, 0))});
|
||||||
} else try f.writeCValue(writer, operand, .Initializer);
|
} else try f.writeCValue(writer, operand, .Initializer);
|
||||||
}
|
}
|
||||||
try a.end(f, writer);
|
try a.end(f, writer);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const a = try Assignment.start(f, writer, CType.usize);
|
const a = try Assignment.start(f, writer, .usize);
|
||||||
try f.writeCValueMember(writer, local, .{ .identifier = "len" });
|
try f.writeCValueMember(writer, local, .{ .identifier = "len" });
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
try writer.print("{}", .{
|
try writer.print("{}", .{
|
||||||
try f.fmtIntLiteral(try pt.intValue(Type.usize, array_ty.arrayLen(zcu))),
|
try f.fmtIntLiteral(try pt.intValue(.usize, array_ty.arrayLen(zcu))),
|
||||||
});
|
});
|
||||||
try a.end(f, writer);
|
try a.end(f, writer);
|
||||||
}
|
}
|
||||||
|
|
@ -6627,7 +6627,7 @@ fn airCmpBuiltinCall(
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
if (!ref_ret) try writer.print("{s}{}", .{
|
if (!ref_ret) try writer.print("{s}{}", .{
|
||||||
compareOperatorC(operator),
|
compareOperatorC(operator),
|
||||||
try f.fmtIntLiteral(try pt.intValue(Type.i32, 0)),
|
try f.fmtIntLiteral(try pt.intValue(.i32, 0)),
|
||||||
});
|
});
|
||||||
try writer.writeAll(";\n");
|
try writer.writeAll(";\n");
|
||||||
try v.end(f, inst, writer);
|
try v.end(f, inst, writer);
|
||||||
|
|
@ -6707,7 +6707,7 @@ fn airCmpxchg(f: *Function, inst: Air.Inst.Index, flavor: [*:0]const u8) !CValue
|
||||||
try a.end(f, writer);
|
try a.end(f, writer);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
const a = try Assignment.start(f, writer, CType.bool);
|
const a = try Assignment.start(f, writer, .bool);
|
||||||
try f.writeCValueMember(writer, local, .{ .identifier = "is_null" });
|
try f.writeCValueMember(writer, local, .{ .identifier = "is_null" });
|
||||||
try a.assign(f, writer);
|
try a.assign(f, writer);
|
||||||
try writer.print("zig_cmpxchg_{s}((zig_atomic(", .{flavor});
|
try writer.print("zig_cmpxchg_{s}((zig_atomic(", .{flavor});
|
||||||
|
|
@ -6935,12 +6935,12 @@ fn airMemset(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const index = try f.allocLocal(inst, Type.usize);
|
const index = try f.allocLocal(inst, .usize);
|
||||||
|
|
||||||
try writer.writeAll("for (");
|
try writer.writeAll("for (");
|
||||||
try f.writeCValue(writer, index, .Other);
|
try f.writeCValue(writer, index, .Other);
|
||||||
try writer.writeAll(" = ");
|
try writer.writeAll(" = ");
|
||||||
try f.object.dg.renderValue(writer, try pt.intValue(Type.usize, 0), .Initializer);
|
try f.object.dg.renderValue(writer, try pt.intValue(.usize, 0), .Initializer);
|
||||||
try writer.writeAll("; ");
|
try writer.writeAll("; ");
|
||||||
try f.writeCValue(writer, index, .Other);
|
try f.writeCValue(writer, index, .Other);
|
||||||
try writer.writeAll(" != ");
|
try writer.writeAll(" != ");
|
||||||
|
|
@ -6976,7 +6976,7 @@ fn airMemset(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue {
|
||||||
return .none;
|
return .none;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bitcasted = try bitcast(f, Type.u8, value, elem_ty);
|
const bitcasted = try bitcast(f, .u8, value, elem_ty);
|
||||||
|
|
||||||
try writer.writeAll("memset(");
|
try writer.writeAll("memset(");
|
||||||
switch (dest_ty.ptrSize(zcu)) {
|
switch (dest_ty.ptrSize(zcu)) {
|
||||||
|
|
@ -7038,7 +7038,7 @@ fn writeArrayLen(f: *Function, writer: ArrayListWriter, dest_ptr: CValue, dest_t
|
||||||
const zcu = pt.zcu;
|
const zcu = pt.zcu;
|
||||||
switch (dest_ty.ptrSize(zcu)) {
|
switch (dest_ty.ptrSize(zcu)) {
|
||||||
.one => try writer.print("{}", .{
|
.one => try writer.print("{}", .{
|
||||||
try f.fmtIntLiteral(try pt.intValue(Type.usize, dest_ty.childType(zcu).arrayLen(zcu))),
|
try f.fmtIntLiteral(try pt.intValue(.usize, dest_ty.childType(zcu).arrayLen(zcu))),
|
||||||
}),
|
}),
|
||||||
.many, .c => unreachable,
|
.many, .c => unreachable,
|
||||||
.slice => try f.writeCValueMember(writer, dest_ptr, .{ .identifier = "len" }),
|
.slice => try f.writeCValueMember(writer, dest_ptr, .{ .identifier = "len" }),
|
||||||
|
|
@ -7200,11 +7200,11 @@ fn airShuffle(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
for (0..extra.mask_len) |index| {
|
for (0..extra.mask_len) |index| {
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.writeByte('[');
|
try writer.writeByte('[');
|
||||||
try f.object.dg.renderValue(writer, try pt.intValue(Type.usize, index), .Other);
|
try f.object.dg.renderValue(writer, try pt.intValue(.usize, index), .Other);
|
||||||
try writer.writeAll("] = ");
|
try writer.writeAll("] = ");
|
||||||
|
|
||||||
const mask_elem = (try mask.elemValue(pt, index)).toSignedInt(zcu);
|
const mask_elem = (try mask.elemValue(pt, index)).toSignedInt(zcu);
|
||||||
const src_val = try pt.intValue(Type.usize, @as(u64, @intCast(mask_elem ^ mask_elem >> 63)));
|
const src_val = try pt.intValue(.usize, @as(u64, @intCast(mask_elem ^ mask_elem >> 63)));
|
||||||
|
|
||||||
try f.writeCValue(writer, if (mask_elem >= 0) lhs else rhs, .Other);
|
try f.writeCValue(writer, if (mask_elem >= 0) lhs else rhs, .Other);
|
||||||
try writer.writeByte('[');
|
try writer.writeByte('[');
|
||||||
|
|
@ -7377,7 +7377,7 @@ fn airAggregateInit(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
switch (ip.indexToKey(inst_ty.toIntern())) {
|
switch (ip.indexToKey(inst_ty.toIntern())) {
|
||||||
inline .array_type, .vector_type => |info, tag| {
|
inline .array_type, .vector_type => |info, tag| {
|
||||||
const a: Assignment = .{
|
const a: Assignment = .{
|
||||||
.ctype = try f.ctypeFromType(Type.fromInterned(info.child), .complete),
|
.ctype = try f.ctypeFromType(.fromInterned(info.child), .complete),
|
||||||
};
|
};
|
||||||
for (resolved_elements, 0..) |element, i| {
|
for (resolved_elements, 0..) |element, i| {
|
||||||
try a.restart(f, writer);
|
try a.restart(f, writer);
|
||||||
|
|
@ -7402,7 +7402,7 @@ fn airAggregateInit(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
.auto, .@"extern" => {
|
.auto, .@"extern" => {
|
||||||
var field_it = loaded_struct.iterateRuntimeOrder(ip);
|
var field_it = loaded_struct.iterateRuntimeOrder(ip);
|
||||||
while (field_it.next()) |field_index| {
|
while (field_it.next()) |field_index| {
|
||||||
const field_ty = Type.fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(loaded_struct.field_types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
const a = try Assignment.start(f, writer, try f.ctypeFromType(field_ty, .complete));
|
const a = try Assignment.start(f, writer, try f.ctypeFromType(field_ty, .complete));
|
||||||
|
|
@ -7466,8 +7466,8 @@ fn airAggregateInit(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
if (field_ty.isPtrAtRuntime(zcu)) {
|
if (field_ty.isPtrAtRuntime(zcu)) {
|
||||||
try writer.writeByte('(');
|
try writer.writeByte('(');
|
||||||
try f.renderType(writer, switch (int_info.signedness) {
|
try f.renderType(writer, switch (int_info.signedness) {
|
||||||
.unsigned => Type.usize,
|
.unsigned => .usize,
|
||||||
.signed => Type.isize,
|
.signed => .isize,
|
||||||
});
|
});
|
||||||
try writer.writeByte(')');
|
try writer.writeByte(')');
|
||||||
}
|
}
|
||||||
|
|
@ -7501,7 +7501,7 @@ fn airAggregateInit(f: *Function, inst: Air.Inst.Index) !CValue {
|
||||||
},
|
},
|
||||||
.tuple_type => |tuple_info| for (0..tuple_info.types.len) |field_index| {
|
.tuple_type => |tuple_info| for (0..tuple_info.types.len) |field_index| {
|
||||||
if (tuple_info.values.get(ip)[field_index] != .none) continue;
|
if (tuple_info.values.get(ip)[field_index] != .none) continue;
|
||||||
const field_ty = Type.fromInterned(tuple_info.types.get(ip)[field_index]);
|
const field_ty: Type = .fromInterned(tuple_info.types.get(ip)[field_index]);
|
||||||
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
if (!field_ty.hasRuntimeBitsIgnoreComptime(zcu)) continue;
|
||||||
|
|
||||||
const a = try Assignment.start(f, writer, try f.ctypeFromType(field_ty, .complete));
|
const a = try Assignment.start(f, writer, try f.ctypeFromType(field_ty, .complete));
|
||||||
|
|
@ -8141,13 +8141,13 @@ fn formatIntLiteral(
|
||||||
} = switch (data.ctype.info(ctype_pool)) {
|
} = switch (data.ctype.info(ctype_pool)) {
|
||||||
.basic => |basic_info| switch (basic_info) {
|
.basic => |basic_info| switch (basic_info) {
|
||||||
else => .{
|
else => .{
|
||||||
.ctype = CType.void,
|
.ctype = .void,
|
||||||
.count = 1,
|
.count = 1,
|
||||||
.endian = .little,
|
.endian = .little,
|
||||||
.homogeneous = true,
|
.homogeneous = true,
|
||||||
},
|
},
|
||||||
.zig_u128, .zig_i128 => .{
|
.zig_u128, .zig_i128 => .{
|
||||||
.ctype = CType.u64,
|
.ctype = .u64,
|
||||||
.count = 2,
|
.count = 2,
|
||||||
.endian = .big,
|
.endian = .big,
|
||||||
.homogeneous = false,
|
.homogeneous = false,
|
||||||
|
|
@ -8253,7 +8253,7 @@ fn formatIntLiteral(
|
||||||
.int_info = c_limb_int_info,
|
.int_info = c_limb_int_info,
|
||||||
.kind = data.kind,
|
.kind = data.kind,
|
||||||
.ctype = c_limb_ctype,
|
.ctype = c_limb_ctype,
|
||||||
.val = try pt.intValue_big(Type.comptime_int, c_limb_mut.toConst()),
|
.val = try pt.intValue_big(.comptime_int, c_limb_mut.toConst()),
|
||||||
}, fmt, options, writer);
|
}, fmt, options, writer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -8330,15 +8330,15 @@ const Vectorize = struct {
|
||||||
const pt = f.object.dg.pt;
|
const pt = f.object.dg.pt;
|
||||||
const zcu = pt.zcu;
|
const zcu = pt.zcu;
|
||||||
return if (ty.zigTypeTag(zcu) == .vector) index: {
|
return if (ty.zigTypeTag(zcu) == .vector) index: {
|
||||||
const local = try f.allocLocal(inst, Type.usize);
|
const local = try f.allocLocal(inst, .usize);
|
||||||
|
|
||||||
try writer.writeAll("for (");
|
try writer.writeAll("for (");
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.print(" = {d}; ", .{try f.fmtIntLiteral(try pt.intValue(Type.usize, 0))});
|
try writer.print(" = {d}; ", .{try f.fmtIntLiteral(try pt.intValue(.usize, 0))});
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.print(" < {d}; ", .{try f.fmtIntLiteral(try pt.intValue(Type.usize, ty.vectorLen(zcu)))});
|
try writer.print(" < {d}; ", .{try f.fmtIntLiteral(try pt.intValue(.usize, ty.vectorLen(zcu)))});
|
||||||
try f.writeCValue(writer, local, .Other);
|
try f.writeCValue(writer, local, .Other);
|
||||||
try writer.print(" += {d}) {{\n", .{try f.fmtIntLiteral(try pt.intValue(Type.usize, 1))});
|
try writer.print(" += {d}) {{\n", .{try f.fmtIntLiteral(try pt.intValue(.usize, 1))});
|
||||||
f.object.indent_writer.pushIndent();
|
f.object.indent_writer.pushIndent();
|
||||||
|
|
||||||
break :index .{ .index = local };
|
break :index .{ .index = local };
|
||||||
|
|
|
||||||
|
|
@ -1289,26 +1289,26 @@ pub const Pool = struct {
|
||||||
kind: Kind,
|
kind: Kind,
|
||||||
) !CType {
|
) !CType {
|
||||||
switch (int_info.bits) {
|
switch (int_info.bits) {
|
||||||
0 => return CType.void,
|
0 => return .void,
|
||||||
1...8 => switch (int_info.signedness) {
|
1...8 => switch (int_info.signedness) {
|
||||||
.signed => return CType.i8,
|
.signed => return .i8,
|
||||||
.unsigned => return CType.u8,
|
.unsigned => return .u8,
|
||||||
},
|
},
|
||||||
9...16 => switch (int_info.signedness) {
|
9...16 => switch (int_info.signedness) {
|
||||||
.signed => return CType.i16,
|
.signed => return .i16,
|
||||||
.unsigned => return CType.u16,
|
.unsigned => return .u16,
|
||||||
},
|
},
|
||||||
17...32 => switch (int_info.signedness) {
|
17...32 => switch (int_info.signedness) {
|
||||||
.signed => return CType.i32,
|
.signed => return .i32,
|
||||||
.unsigned => return CType.u32,
|
.unsigned => return .u32,
|
||||||
},
|
},
|
||||||
33...64 => switch (int_info.signedness) {
|
33...64 => switch (int_info.signedness) {
|
||||||
.signed => return CType.i64,
|
.signed => return .i64,
|
||||||
.unsigned => return CType.u64,
|
.unsigned => return .u64,
|
||||||
},
|
},
|
||||||
65...128 => switch (int_info.signedness) {
|
65...128 => switch (int_info.signedness) {
|
||||||
.signed => return CType.i128,
|
.signed => return .i128,
|
||||||
.unsigned => return CType.u128,
|
.unsigned => return .u128,
|
||||||
},
|
},
|
||||||
else => {
|
else => {
|
||||||
const target = &mod.resolved_target.result;
|
const target = &mod.resolved_target.result;
|
||||||
|
|
@ -1357,19 +1357,19 @@ pub const Pool = struct {
|
||||||
.null_type,
|
.null_type,
|
||||||
.undefined_type,
|
.undefined_type,
|
||||||
.enum_literal_type,
|
.enum_literal_type,
|
||||||
=> return CType.void,
|
=> return .void,
|
||||||
.u1_type, .u8_type => return CType.u8,
|
.u1_type, .u8_type => return .u8,
|
||||||
.i8_type => return CType.i8,
|
.i8_type => return .i8,
|
||||||
.u16_type => return CType.u16,
|
.u16_type => return .u16,
|
||||||
.i16_type => return CType.i16,
|
.i16_type => return .i16,
|
||||||
.u29_type, .u32_type => return CType.u32,
|
.u29_type, .u32_type => return .u32,
|
||||||
.i32_type => return CType.i32,
|
.i32_type => return .i32,
|
||||||
.u64_type => return CType.u64,
|
.u64_type => return .u64,
|
||||||
.i64_type => return CType.i64,
|
.i64_type => return .i64,
|
||||||
.u80_type, .u128_type => return CType.u128,
|
.u80_type, .u128_type => return .u128,
|
||||||
.i128_type => return CType.i128,
|
.i128_type => return .i128,
|
||||||
.usize_type => return CType.usize,
|
.usize_type => return .usize,
|
||||||
.isize_type => return CType.isize,
|
.isize_type => return .isize,
|
||||||
.c_char_type => return .{ .index = .char },
|
.c_char_type => return .{ .index = .char },
|
||||||
.c_short_type => return .{ .index = .short },
|
.c_short_type => return .{ .index = .short },
|
||||||
.c_ushort_type => return .{ .index = .@"unsigned short" },
|
.c_ushort_type => return .{ .index = .@"unsigned short" },
|
||||||
|
|
@ -1380,12 +1380,12 @@ pub const Pool = struct {
|
||||||
.c_longlong_type => return .{ .index = .@"long long" },
|
.c_longlong_type => return .{ .index = .@"long long" },
|
||||||
.c_ulonglong_type => return .{ .index = .@"unsigned long long" },
|
.c_ulonglong_type => return .{ .index = .@"unsigned long long" },
|
||||||
.c_longdouble_type => return .{ .index = .@"long double" },
|
.c_longdouble_type => return .{ .index = .@"long double" },
|
||||||
.f16_type => return CType.f16,
|
.f16_type => return .f16,
|
||||||
.f32_type => return CType.f32,
|
.f32_type => return .f32,
|
||||||
.f64_type => return CType.f64,
|
.f64_type => return .f64,
|
||||||
.f80_type => return CType.f80,
|
.f80_type => return .f80,
|
||||||
.f128_type => return CType.f128,
|
.f128_type => return .f128,
|
||||||
.bool_type, .optional_noreturn_type => return CType.bool,
|
.bool_type, .optional_noreturn_type => return .bool,
|
||||||
.noreturn_type,
|
.noreturn_type,
|
||||||
.anyframe_type,
|
.anyframe_type,
|
||||||
.generic_poison_type,
|
.generic_poison_type,
|
||||||
|
|
@ -1397,19 +1397,20 @@ pub const Pool = struct {
|
||||||
.signedness = .unsigned,
|
.signedness = .unsigned,
|
||||||
.bits = pt.zcu.errorSetBits(),
|
.bits = pt.zcu.errorSetBits(),
|
||||||
}, mod, kind),
|
}, mod, kind),
|
||||||
|
|
||||||
.manyptr_u8_type,
|
.manyptr_u8_type,
|
||||||
=> return pool.getPointer(allocator, .{
|
=> return pool.getPointer(allocator, .{
|
||||||
.elem_ctype = CType.u8,
|
.elem_ctype = .u8,
|
||||||
}),
|
}),
|
||||||
.manyptr_const_u8_type,
|
.manyptr_const_u8_type,
|
||||||
.manyptr_const_u8_sentinel_0_type,
|
.manyptr_const_u8_sentinel_0_type,
|
||||||
=> return pool.getPointer(allocator, .{
|
=> return pool.getPointer(allocator, .{
|
||||||
.elem_ctype = CType.u8,
|
.elem_ctype = .u8,
|
||||||
.@"const" = true,
|
.@"const" = true,
|
||||||
}),
|
}),
|
||||||
.single_const_pointer_to_comptime_int_type,
|
.single_const_pointer_to_comptime_int_type,
|
||||||
=> return pool.getPointer(allocator, .{
|
=> return pool.getPointer(allocator, .{
|
||||||
.elem_ctype = CType.void,
|
.elem_ctype = .void,
|
||||||
.@"const" = true,
|
.@"const" = true,
|
||||||
}),
|
}),
|
||||||
.slice_const_u8_type,
|
.slice_const_u8_type,
|
||||||
|
|
@ -1420,14 +1421,14 @@ pub const Pool = struct {
|
||||||
.{
|
.{
|
||||||
.name = .{ .index = .ptr },
|
.name = .{ .index = .ptr },
|
||||||
.ctype = try pool.getPointer(allocator, .{
|
.ctype = try pool.getPointer(allocator, .{
|
||||||
.elem_ctype = CType.u8,
|
.elem_ctype = .u8,
|
||||||
.@"const" = true,
|
.@"const" = true,
|
||||||
}),
|
}),
|
||||||
.alignas = AlignAs.fromAbiAlignment(Type.ptrAbiAlignment(target.*)),
|
.alignas = AlignAs.fromAbiAlignment(Type.ptrAbiAlignment(target.*)),
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
.name = .{ .index = .len },
|
.name = .{ .index = .len },
|
||||||
.ctype = CType.usize,
|
.ctype = .usize,
|
||||||
.alignas = AlignAs.fromAbiAlignment(
|
.alignas = AlignAs.fromAbiAlignment(
|
||||||
Type.intAbiAlignment(target.ptrBitWidth(), target.*),
|
Type.intAbiAlignment(target.ptrBitWidth(), target.*),
|
||||||
),
|
),
|
||||||
|
|
@ -1436,6 +1437,337 @@ pub const Pool = struct {
|
||||||
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
.vector_16_i8_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i8,
|
||||||
|
.len = 16,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i8.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_32_i8_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i8,
|
||||||
|
.len = 32,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i8.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_16_u8_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u8,
|
||||||
|
.len = 16,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u8.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_32_u8_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u8,
|
||||||
|
.len = 32,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u8.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_8_i16_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i16,
|
||||||
|
.len = 8,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i16.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_16_i16_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i16,
|
||||||
|
.len = 16,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i16.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_8_u16_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u16,
|
||||||
|
.len = 8,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u16.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_16_u16_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u16,
|
||||||
|
.len = 16,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u16.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_i32_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i32,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i32.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_8_i32_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i32,
|
||||||
|
.len = 8,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i32.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_u32_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u32,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u32.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_8_u32_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u32,
|
||||||
|
.len = 8,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u32.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_2_i64_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i64,
|
||||||
|
.len = 2,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i64.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_i64_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .i64,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.i64.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_2_u64_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u64,
|
||||||
|
.len = 2,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u64.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_u64_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .u64,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.u64.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_f16_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .f16,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.f16.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_8_f16_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .f16,
|
||||||
|
.len = 8,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.f16.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_f32_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .f32,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.f32.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_8_f32_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .f32,
|
||||||
|
.len = 8,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.f32.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_2_f64_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .f64,
|
||||||
|
.len = 2,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.f64.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
.vector_4_f64_type => {
|
||||||
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
|
.elem_ctype = .f64,
|
||||||
|
.len = 4,
|
||||||
|
});
|
||||||
|
if (!kind.isParameter()) return vector_ctype;
|
||||||
|
var fields = [_]Info.Field{
|
||||||
|
.{
|
||||||
|
.name = .{ .index = .array },
|
||||||
|
.ctype = vector_ctype,
|
||||||
|
.alignas = AlignAs.fromAbiAlignment(Type.f64.abiAlignment(zcu)),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
|
},
|
||||||
|
|
||||||
.undef,
|
.undef,
|
||||||
.zero,
|
.zero,
|
||||||
.zero_usize,
|
.zero_usize,
|
||||||
|
|
@ -1521,7 +1853,7 @@ pub const Pool = struct {
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
.name = .{ .index = .len },
|
.name = .{ .index = .len },
|
||||||
.ctype = CType.usize,
|
.ctype = .usize,
|
||||||
.alignas = AlignAs.fromAbiAlignment(
|
.alignas = AlignAs.fromAbiAlignment(
|
||||||
Type.intAbiAlignment(target.ptrBitWidth(), target.*),
|
Type.intAbiAlignment(target.ptrBitWidth(), target.*),
|
||||||
),
|
),
|
||||||
|
|
@ -1532,7 +1864,7 @@ pub const Pool = struct {
|
||||||
},
|
},
|
||||||
.array_type => |array_info| {
|
.array_type => |array_info| {
|
||||||
const len = array_info.lenIncludingSentinel();
|
const len = array_info.lenIncludingSentinel();
|
||||||
if (len == 0) return CType.void;
|
if (len == 0) return .void;
|
||||||
const elem_type = Type.fromInterned(array_info.child);
|
const elem_type = Type.fromInterned(array_info.child);
|
||||||
const elem_ctype = try pool.fromType(
|
const elem_ctype = try pool.fromType(
|
||||||
allocator,
|
allocator,
|
||||||
|
|
@ -1542,7 +1874,7 @@ pub const Pool = struct {
|
||||||
mod,
|
mod,
|
||||||
kind.noParameter(),
|
kind.noParameter(),
|
||||||
);
|
);
|
||||||
if (elem_ctype.index == .void) return CType.void;
|
if (elem_ctype.index == .void) return .void;
|
||||||
const array_ctype = try pool.getArray(allocator, .{
|
const array_ctype = try pool.getArray(allocator, .{
|
||||||
.elem_ctype = elem_ctype,
|
.elem_ctype = elem_ctype,
|
||||||
.len = len,
|
.len = len,
|
||||||
|
|
@ -1558,7 +1890,7 @@ pub const Pool = struct {
|
||||||
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
},
|
},
|
||||||
.vector_type => |vector_info| {
|
.vector_type => |vector_info| {
|
||||||
if (vector_info.len == 0) return CType.void;
|
if (vector_info.len == 0) return .void;
|
||||||
const elem_type = Type.fromInterned(vector_info.child);
|
const elem_type = Type.fromInterned(vector_info.child);
|
||||||
const elem_ctype = try pool.fromType(
|
const elem_ctype = try pool.fromType(
|
||||||
allocator,
|
allocator,
|
||||||
|
|
@ -1568,7 +1900,7 @@ pub const Pool = struct {
|
||||||
mod,
|
mod,
|
||||||
kind.noParameter(),
|
kind.noParameter(),
|
||||||
);
|
);
|
||||||
if (elem_ctype.index == .void) return CType.void;
|
if (elem_ctype.index == .void) return .void;
|
||||||
const vector_ctype = try pool.getVector(allocator, .{
|
const vector_ctype = try pool.getVector(allocator, .{
|
||||||
.elem_ctype = elem_ctype,
|
.elem_ctype = elem_ctype,
|
||||||
.len = vector_info.len,
|
.len = vector_info.len,
|
||||||
|
|
@ -1584,7 +1916,7 @@ pub const Pool = struct {
|
||||||
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
return pool.fromFields(allocator, .@"struct", &fields, kind);
|
||||||
},
|
},
|
||||||
.opt_type => |payload_type| {
|
.opt_type => |payload_type| {
|
||||||
if (ip.isNoReturn(payload_type)) return CType.void;
|
if (ip.isNoReturn(payload_type)) return .void;
|
||||||
const payload_ctype = try pool.fromType(
|
const payload_ctype = try pool.fromType(
|
||||||
allocator,
|
allocator,
|
||||||
scratch,
|
scratch,
|
||||||
|
|
@ -1593,7 +1925,7 @@ pub const Pool = struct {
|
||||||
mod,
|
mod,
|
||||||
kind.noParameter(),
|
kind.noParameter(),
|
||||||
);
|
);
|
||||||
if (payload_ctype.index == .void) return CType.bool;
|
if (payload_ctype.index == .void) return .bool;
|
||||||
switch (payload_type) {
|
switch (payload_type) {
|
||||||
.anyerror_type => return payload_ctype,
|
.anyerror_type => return payload_ctype,
|
||||||
else => switch (ip.indexToKey(payload_type)) {
|
else => switch (ip.indexToKey(payload_type)) {
|
||||||
|
|
@ -1606,7 +1938,7 @@ pub const Pool = struct {
|
||||||
var fields = [_]Info.Field{
|
var fields = [_]Info.Field{
|
||||||
.{
|
.{
|
||||||
.name = .{ .index = .is_null },
|
.name = .{ .index = .is_null },
|
||||||
.ctype = CType.bool,
|
.ctype = .bool,
|
||||||
.alignas = AlignAs.fromAbiAlignment(.@"1"),
|
.alignas = AlignAs.fromAbiAlignment(.@"1"),
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
|
|
@ -1666,7 +1998,7 @@ pub const Pool = struct {
|
||||||
if (kind.isForward()) return if (ty.hasRuntimeBitsIgnoreComptime(zcu))
|
if (kind.isForward()) return if (ty.hasRuntimeBitsIgnoreComptime(zcu))
|
||||||
fwd_decl
|
fwd_decl
|
||||||
else
|
else
|
||||||
CType.void;
|
.void;
|
||||||
const scratch_top = scratch.items.len;
|
const scratch_top = scratch.items.len;
|
||||||
defer scratch.shrinkRetainingCapacity(scratch_top);
|
defer scratch.shrinkRetainingCapacity(scratch_top);
|
||||||
try scratch.ensureUnusedCapacity(
|
try scratch.ensureUnusedCapacity(
|
||||||
|
|
@ -1710,7 +2042,7 @@ pub const Pool = struct {
|
||||||
scratch.items.len - scratch_top,
|
scratch.items.len - scratch_top,
|
||||||
@typeInfo(Field).@"struct".fields.len,
|
@typeInfo(Field).@"struct".fields.len,
|
||||||
));
|
));
|
||||||
if (fields_len == 0) return CType.void;
|
if (fields_len == 0) return .void;
|
||||||
try pool.ensureUnusedCapacity(allocator, 1);
|
try pool.ensureUnusedCapacity(allocator, 1);
|
||||||
const extra_index = try pool.addHashedExtra(allocator, &hasher, Aggregate, .{
|
const extra_index = try pool.addHashedExtra(allocator, &hasher, Aggregate, .{
|
||||||
.fwd_decl = fwd_decl.index,
|
.fwd_decl = fwd_decl.index,
|
||||||
|
|
@ -1762,7 +2094,7 @@ pub const Pool = struct {
|
||||||
scratch.items.len - scratch_top,
|
scratch.items.len - scratch_top,
|
||||||
@typeInfo(Field).@"struct".fields.len,
|
@typeInfo(Field).@"struct".fields.len,
|
||||||
));
|
));
|
||||||
if (fields_len == 0) return CType.void;
|
if (fields_len == 0) return .void;
|
||||||
if (kind.isForward()) {
|
if (kind.isForward()) {
|
||||||
try pool.ensureUnusedCapacity(allocator, 1);
|
try pool.ensureUnusedCapacity(allocator, 1);
|
||||||
const extra_index = try pool.addHashedExtra(
|
const extra_index = try pool.addHashedExtra(
|
||||||
|
|
@ -1801,7 +2133,7 @@ pub const Pool = struct {
|
||||||
if (kind.isForward()) return if (ty.hasRuntimeBitsIgnoreComptime(zcu))
|
if (kind.isForward()) return if (ty.hasRuntimeBitsIgnoreComptime(zcu))
|
||||||
fwd_decl
|
fwd_decl
|
||||||
else
|
else
|
||||||
CType.void;
|
.void;
|
||||||
const loaded_tag = loaded_union.loadTagType(ip);
|
const loaded_tag = loaded_union.loadTagType(ip);
|
||||||
const scratch_top = scratch.items.len;
|
const scratch_top = scratch.items.len;
|
||||||
defer scratch.shrinkRetainingCapacity(scratch_top);
|
defer scratch.shrinkRetainingCapacity(scratch_top);
|
||||||
|
|
@ -1848,7 +2180,7 @@ pub const Pool = struct {
|
||||||
@typeInfo(Field).@"struct".fields.len,
|
@typeInfo(Field).@"struct".fields.len,
|
||||||
));
|
));
|
||||||
if (!has_tag) {
|
if (!has_tag) {
|
||||||
if (fields_len == 0) return CType.void;
|
if (fields_len == 0) return .void;
|
||||||
try pool.ensureUnusedCapacity(allocator, 1);
|
try pool.ensureUnusedCapacity(allocator, 1);
|
||||||
const extra_index = try pool.addHashedExtra(
|
const extra_index = try pool.addHashedExtra(
|
||||||
allocator,
|
allocator,
|
||||||
|
|
@ -1915,7 +2247,7 @@ pub const Pool = struct {
|
||||||
struct_fields_len += 1;
|
struct_fields_len += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (struct_fields_len == 0) return CType.void;
|
if (struct_fields_len == 0) return .void;
|
||||||
sortFields(struct_fields[0..struct_fields_len]);
|
sortFields(struct_fields[0..struct_fields_len]);
|
||||||
return pool.getAggregate(allocator, .{
|
return pool.getAggregate(allocator, .{
|
||||||
.tag = .@"struct",
|
.tag = .@"struct",
|
||||||
|
|
@ -1929,7 +2261,7 @@ pub const Pool = struct {
|
||||||
}, mod, kind),
|
}, mod, kind),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
.opaque_type => return CType.void,
|
.opaque_type => return .void,
|
||||||
.enum_type => return pool.fromType(
|
.enum_type => return pool.fromType(
|
||||||
allocator,
|
allocator,
|
||||||
scratch,
|
scratch,
|
||||||
|
|
@ -1938,7 +2270,7 @@ pub const Pool = struct {
|
||||||
mod,
|
mod,
|
||||||
kind,
|
kind,
|
||||||
),
|
),
|
||||||
.func_type => |func_info| if (func_info.is_generic) return CType.void else {
|
.func_type => |func_info| if (func_info.is_generic) return .void else {
|
||||||
const scratch_top = scratch.items.len;
|
const scratch_top = scratch.items.len;
|
||||||
defer scratch.shrinkRetainingCapacity(scratch_top);
|
defer scratch.shrinkRetainingCapacity(scratch_top);
|
||||||
try scratch.ensureUnusedCapacity(allocator, func_info.param_types.len);
|
try scratch.ensureUnusedCapacity(allocator, func_info.param_types.len);
|
||||||
|
|
@ -1952,7 +2284,7 @@ pub const Pool = struct {
|
||||||
pt,
|
pt,
|
||||||
mod,
|
mod,
|
||||||
kind.asParameter(),
|
kind.asParameter(),
|
||||||
) else CType.void;
|
) else .void;
|
||||||
for (0..func_info.param_types.len) |param_index| {
|
for (0..func_info.param_types.len) |param_index| {
|
||||||
const param_type = Type.fromInterned(
|
const param_type = Type.fromInterned(
|
||||||
func_info.param_types.get(ip)[param_index],
|
func_info.param_types.get(ip)[param_index],
|
||||||
|
|
@ -2033,7 +2365,7 @@ pub const Pool = struct {
|
||||||
pub fn eql(map_adapter: @This(), _: CType, _: void, pool_index: usize) bool {
|
pub fn eql(map_adapter: @This(), _: CType, _: void, pool_index: usize) bool {
|
||||||
return map_adapter.source_info.eqlAdapted(
|
return map_adapter.source_info.eqlAdapted(
|
||||||
map_adapter.source_pool,
|
map_adapter.source_pool,
|
||||||
CType.fromPoolIndex(pool_index),
|
.fromPoolIndex(pool_index),
|
||||||
map_adapter.pool,
|
map_adapter.pool,
|
||||||
map_adapter.pool_adapter,
|
map_adapter.pool_adapter,
|
||||||
);
|
);
|
||||||
|
|
@ -2047,7 +2379,7 @@ pub const Pool = struct {
|
||||||
.pool_adapter = pool_adapter,
|
.pool_adapter = pool_adapter,
|
||||||
});
|
});
|
||||||
errdefer _ = pool.map.pop();
|
errdefer _ = pool.map.pop();
|
||||||
const ctype = CType.fromPoolIndex(gop.index);
|
const ctype: CType = .fromPoolIndex(gop.index);
|
||||||
if (!gop.found_existing) switch (source_info) {
|
if (!gop.found_existing) switch (source_info) {
|
||||||
.basic => unreachable,
|
.basic => unreachable,
|
||||||
.pointer => |pointer_info| pool.items.appendAssumeCapacity(.{
|
.pointer => |pointer_info| pool.items.appendAssumeCapacity(.{
|
||||||
|
|
@ -2232,7 +2564,7 @@ pub const Pool = struct {
|
||||||
CTypeAdapter{ .pool = pool },
|
CTypeAdapter{ .pool = pool },
|
||||||
);
|
);
|
||||||
if (!gop.found_existing) pool.items.appendAssumeCapacity(.{ .tag = tag, .data = data });
|
if (!gop.found_existing) pool.items.appendAssumeCapacity(.{ .tag = tag, .data = data });
|
||||||
return CType.fromPoolIndex(gop.index);
|
return .fromPoolIndex(gop.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn tagExtra(
|
fn tagExtra(
|
||||||
|
|
@ -2290,7 +2622,7 @@ pub const Pool = struct {
|
||||||
pool.extra.shrinkRetainingCapacity(extra_index)
|
pool.extra.shrinkRetainingCapacity(extra_index)
|
||||||
else
|
else
|
||||||
pool.items.appendAssumeCapacity(.{ .tag = tag, .data = extra_index });
|
pool.items.appendAssumeCapacity(.{ .tag = tag, .data = extra_index });
|
||||||
return CType.fromPoolIndex(gop.index);
|
return .fromPoolIndex(gop.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sortFields(fields: []Info.Field) void {
|
fn sortFields(fields: []Info.Field) void {
|
||||||
|
|
|
||||||
|
|
@ -335,12 +335,12 @@ fn testAbsUnsignedIntVectors(comptime len: comptime_int) !void {
|
||||||
|
|
||||||
test "@abs float vectors" {
|
test "@abs float vectors" {
|
||||||
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
|
|
||||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||||
|
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||||
|
|
||||||
// https://github.com/ziglang/zig/issues/12827
|
// https://github.com/ziglang/zig/issues/12827
|
||||||
if (builtin.zig_backend == .stage2_llvm and
|
if (builtin.zig_backend == .stage2_llvm and
|
||||||
|
|
|
||||||
|
|
@ -1654,6 +1654,7 @@ test "runtime isNan(inf * 0)" {
|
||||||
}
|
}
|
||||||
|
|
||||||
test "optimized float mode" {
|
test "optimized float mode" {
|
||||||
|
if (builtin.zig_backend != .stage2_llvm) return error.SkipZigTest;
|
||||||
if (builtin.mode == .Debug) return error.SkipZigTest;
|
if (builtin.mode == .Debug) return error.SkipZigTest;
|
||||||
|
|
||||||
const big = 0x1p40;
|
const big = 0x1p40;
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,7 @@ test "@max on vectors" {
|
||||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_x86_64 and
|
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||||
!comptime std.Target.x86.featureSetHas(builtin.cpu.features, .sse4_1)) return error.SkipZigTest;
|
|
||||||
|
|
||||||
const S = struct {
|
const S = struct {
|
||||||
fn doTheTest() !void {
|
fn doTheTest() !void {
|
||||||
|
|
@ -89,8 +88,7 @@ test "@min for vectors" {
|
||||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_x86_64 and
|
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||||
!comptime std.Target.x86.featureSetHas(builtin.cpu.features, .sse4_1)) return error.SkipZigTest;
|
|
||||||
|
|
||||||
const S = struct {
|
const S = struct {
|
||||||
fn doTheTest() !void {
|
fn doTheTest() !void {
|
||||||
|
|
@ -304,7 +302,7 @@ test "@min/@max notices bounds from vector types when element of comptime-known
|
||||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||||
if (builtin.zig_backend == .stage2_x86_64 and
|
if (builtin.zig_backend == .stage2_x86_64 and
|
||||||
!comptime std.Target.x86.featureSetHas(builtin.cpu.features, .avx)) return error.SkipZigTest;
|
!comptime std.Target.x86.featureSetHas(builtin.cpu.features, .sse4_1)) return error.SkipZigTest;
|
||||||
|
|
||||||
var x: @Vector(2, u32) = .{ 1_000_000, 12345 };
|
var x: @Vector(2, u32) = .{ 1_000_000, 12345 };
|
||||||
_ = &x;
|
_ = &x;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ pub fn build(b: *std.Build) void {
|
||||||
.cpu_features_sub = std.Target.x86.featureSet(&.{
|
.cpu_features_sub = std.Target.x86.featureSet(&.{
|
||||||
.cmov,
|
.cmov,
|
||||||
//.sse,
|
//.sse,
|
||||||
|
.sse2,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
//.{
|
//.{
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
const builtin = @import("builtin");
|
const builtin = @import("builtin");
|
||||||
const inf = math.inf;
|
const inf = math.inf;
|
||||||
const math = std.math;
|
const math = std.math;
|
||||||
const max = math.floatMax;
|
const fmax = math.floatMax;
|
||||||
const min = math.floatMin;
|
const fmin = math.floatMin;
|
||||||
const nan = math.nan;
|
const nan = math.nan;
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const trueMin = math.floatTrueMin;
|
const tmin = math.floatTrueMin;
|
||||||
|
|
||||||
const Gpr = switch (builtin.cpu.arch) {
|
const Gpr = switch (builtin.cpu.arch) {
|
||||||
else => unreachable,
|
else => unreachable,
|
||||||
|
|
@ -17,15 +17,34 @@ const Sse = if (std.Target.x86.featureSetHas(builtin.cpu.features, .avx))
|
||||||
else
|
else
|
||||||
@Vector(16, u8);
|
@Vector(16, u8);
|
||||||
|
|
||||||
inline fn sign(rhs: anytype) bool {
|
inline fn sign(rhs: anytype) switch (@typeInfo(@TypeOf(rhs))) {
|
||||||
return @call(.always_inline, math.signbit, .{rhs});
|
else => bool,
|
||||||
|
.vector => |vector| @Vector(vector.len, bool),
|
||||||
|
} {
|
||||||
|
switch (@typeInfo(@TypeOf(rhs))) {
|
||||||
|
else => {
|
||||||
|
const I = @Type(.{ .int = .{
|
||||||
|
.signedness = .unsigned,
|
||||||
|
.bits = @bitSizeOf(@TypeOf(rhs)),
|
||||||
|
} });
|
||||||
|
return @as(I, @bitCast(rhs)) & @as(I, 1) << (@bitSizeOf(I) - 1) != 0;
|
||||||
|
},
|
||||||
|
.vector => |vector| {
|
||||||
|
const I = @Type(.{ .int = .{
|
||||||
|
.signedness = .unsigned,
|
||||||
|
.bits = @bitSizeOf(vector.child),
|
||||||
|
} });
|
||||||
|
const V = @Vector(vector.len, I);
|
||||||
|
return @as(V, @bitCast(rhs)) & @as(V, @splat(@as(I, 1) << (@bitSizeOf(I) - 1))) != @as(V, @splat(0));
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inline fn boolAnd(lhs: anytype, rhs: @TypeOf(lhs)) @TypeOf(lhs) {
|
inline fn boolAnd(lhs: anytype, rhs: @TypeOf(lhs)) @TypeOf(lhs) {
|
||||||
switch (@typeInfo(@TypeOf(lhs))) {
|
switch (@typeInfo(@TypeOf(lhs))) {
|
||||||
.bool => return lhs and rhs,
|
.bool => return lhs and rhs,
|
||||||
.vector => |vector| switch (vector.child) {
|
.vector => |vector| switch (vector.child) {
|
||||||
bool => {
|
bool => {
|
||||||
const Bits = @Vector(vector.len, u1);
|
const Bits = @Type(.{ .int = .{ .signedness = .unsigned, .bits = vector.len } });
|
||||||
const lhs_bits: Bits = @bitCast(lhs);
|
const lhs_bits: Bits = @bitCast(lhs);
|
||||||
const rhs_bits: Bits = @bitCast(rhs);
|
const rhs_bits: Bits = @bitCast(rhs);
|
||||||
return @bitCast(lhs_bits & rhs_bits);
|
return @bitCast(lhs_bits & rhs_bits);
|
||||||
|
|
@ -41,7 +60,7 @@ inline fn boolOr(lhs: anytype, rhs: @TypeOf(lhs)) @TypeOf(lhs) {
|
||||||
.bool => return lhs or rhs,
|
.bool => return lhs or rhs,
|
||||||
.vector => |vector| switch (vector.child) {
|
.vector => |vector| switch (vector.child) {
|
||||||
bool => {
|
bool => {
|
||||||
const Bits = @Vector(vector.len, u1);
|
const Bits = @Type(.{ .int = .{ .signedness = .unsigned, .bits = vector.len } });
|
||||||
const lhs_bits: Bits = @bitCast(lhs);
|
const lhs_bits: Bits = @bitCast(lhs);
|
||||||
const rhs_bits: Bits = @bitCast(rhs);
|
const rhs_bits: Bits = @bitCast(rhs);
|
||||||
return @bitCast(lhs_bits | rhs_bits);
|
return @bitCast(lhs_bits | rhs_bits);
|
||||||
|
|
@ -69,12 +88,40 @@ noinline fn checkExpected(expected: anytype, actual: @TypeOf(expected)) !void {
|
||||||
}) return error.Unexpected;
|
}) return error.Unexpected;
|
||||||
}
|
}
|
||||||
test checkExpected {
|
test checkExpected {
|
||||||
|
if (checkExpected(nan(f16), nan(f16)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(nan(f16), -nan(f16)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f16, 0.0), @as(f16, 0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f16, -0.0), @as(f16, -0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f16, -0.0), @as(f16, 0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f16, 0.0), @as(f16, -0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
|
||||||
if (checkExpected(nan(f32), nan(f32)) == error.Unexpected) return error.Unexpected;
|
if (checkExpected(nan(f32), nan(f32)) == error.Unexpected) return error.Unexpected;
|
||||||
if (checkExpected(nan(f32), -nan(f32)) != error.Unexpected) return error.Unexpected;
|
if (checkExpected(nan(f32), -nan(f32)) != error.Unexpected) return error.Unexpected;
|
||||||
if (checkExpected(@as(f32, 0.0), @as(f32, 0.0)) == error.Unexpected) return error.Unexpected;
|
if (checkExpected(@as(f32, 0.0), @as(f32, 0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
if (checkExpected(@as(f32, -0.0), @as(f32, -0.0)) == error.Unexpected) return error.Unexpected;
|
if (checkExpected(@as(f32, -0.0), @as(f32, -0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
if (checkExpected(@as(f32, -0.0), @as(f32, 0.0)) != error.Unexpected) return error.Unexpected;
|
if (checkExpected(@as(f32, -0.0), @as(f32, 0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
if (checkExpected(@as(f32, 0.0), @as(f32, -0.0)) != error.Unexpected) return error.Unexpected;
|
if (checkExpected(@as(f32, 0.0), @as(f32, -0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
|
||||||
|
if (checkExpected(nan(f64), nan(f64)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(nan(f64), -nan(f64)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f64, 0.0), @as(f64, 0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f64, -0.0), @as(f64, -0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f64, -0.0), @as(f64, 0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f64, 0.0), @as(f64, -0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
|
||||||
|
if (checkExpected(nan(f80), nan(f80)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(nan(f80), -nan(f80)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f80, 0.0), @as(f80, 0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f80, -0.0), @as(f80, -0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f80, -0.0), @as(f80, 0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f80, 0.0), @as(f80, -0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
|
||||||
|
if (checkExpected(nan(f128), nan(f128)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(nan(f128), -nan(f128)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f128, 0.0), @as(f128, 0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f128, -0.0), @as(f128, -0.0)) == error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f128, -0.0), @as(f128, 0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
|
if (checkExpected(@as(f128, 0.0), @as(f128, -0.0)) != error.Unexpected) return error.Unexpected;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Unary(comptime op: anytype) type {
|
fn Unary(comptime op: anytype) type {
|
||||||
|
|
@ -498,96 +545,96 @@ fn Unary(comptime op: anytype) type {
|
||||||
fn testFloatTypes() !void {
|
fn testFloatTypes() !void {
|
||||||
try testArgs(f16, -nan(f16));
|
try testArgs(f16, -nan(f16));
|
||||||
try testArgs(f16, -inf(f16));
|
try testArgs(f16, -inf(f16));
|
||||||
try testArgs(f16, -max(f16));
|
try testArgs(f16, -fmax(f16));
|
||||||
try testArgs(f16, -10.0);
|
try testArgs(f16, -10.0);
|
||||||
try testArgs(f16, -1.0);
|
try testArgs(f16, -1.0);
|
||||||
try testArgs(f16, -0.1);
|
try testArgs(f16, -0.1);
|
||||||
try testArgs(f16, -min(f16));
|
try testArgs(f16, -fmin(f16));
|
||||||
try testArgs(f16, -trueMin(f16));
|
try testArgs(f16, -tmin(f16));
|
||||||
try testArgs(f16, -0.0);
|
try testArgs(f16, -0.0);
|
||||||
try testArgs(f16, 0.0);
|
try testArgs(f16, 0.0);
|
||||||
try testArgs(f16, trueMin(f16));
|
try testArgs(f16, tmin(f16));
|
||||||
try testArgs(f16, min(f16));
|
try testArgs(f16, fmin(f16));
|
||||||
try testArgs(f16, 0.1);
|
try testArgs(f16, 0.1);
|
||||||
try testArgs(f16, 1.0);
|
try testArgs(f16, 1.0);
|
||||||
try testArgs(f16, 10.0);
|
try testArgs(f16, 10.0);
|
||||||
try testArgs(f16, max(f16));
|
try testArgs(f16, fmax(f16));
|
||||||
try testArgs(f16, inf(f16));
|
try testArgs(f16, inf(f16));
|
||||||
try testArgs(f16, nan(f16));
|
try testArgs(f16, nan(f16));
|
||||||
|
|
||||||
try testArgs(f32, -nan(f32));
|
try testArgs(f32, -nan(f32));
|
||||||
try testArgs(f32, -inf(f32));
|
try testArgs(f32, -inf(f32));
|
||||||
try testArgs(f32, -max(f32));
|
try testArgs(f32, -fmax(f32));
|
||||||
try testArgs(f32, -10.0);
|
try testArgs(f32, -10.0);
|
||||||
try testArgs(f32, -1.0);
|
try testArgs(f32, -1.0);
|
||||||
try testArgs(f32, -0.1);
|
try testArgs(f32, -0.1);
|
||||||
try testArgs(f32, -min(f32));
|
try testArgs(f32, -fmin(f32));
|
||||||
try testArgs(f32, -trueMin(f32));
|
try testArgs(f32, -tmin(f32));
|
||||||
try testArgs(f32, -0.0);
|
try testArgs(f32, -0.0);
|
||||||
try testArgs(f32, 0.0);
|
try testArgs(f32, 0.0);
|
||||||
try testArgs(f32, trueMin(f32));
|
try testArgs(f32, tmin(f32));
|
||||||
try testArgs(f32, min(f32));
|
try testArgs(f32, fmin(f32));
|
||||||
try testArgs(f32, 0.1);
|
try testArgs(f32, 0.1);
|
||||||
try testArgs(f32, 1.0);
|
try testArgs(f32, 1.0);
|
||||||
try testArgs(f32, 10.0);
|
try testArgs(f32, 10.0);
|
||||||
try testArgs(f32, max(f32));
|
try testArgs(f32, fmax(f32));
|
||||||
try testArgs(f32, inf(f32));
|
try testArgs(f32, inf(f32));
|
||||||
try testArgs(f32, nan(f32));
|
try testArgs(f32, nan(f32));
|
||||||
|
|
||||||
try testArgs(f64, -nan(f64));
|
try testArgs(f64, -nan(f64));
|
||||||
try testArgs(f64, -inf(f64));
|
try testArgs(f64, -inf(f64));
|
||||||
try testArgs(f64, -max(f64));
|
try testArgs(f64, -fmax(f64));
|
||||||
try testArgs(f64, -10.0);
|
try testArgs(f64, -10.0);
|
||||||
try testArgs(f64, -1.0);
|
try testArgs(f64, -1.0);
|
||||||
try testArgs(f64, -0.1);
|
try testArgs(f64, -0.1);
|
||||||
try testArgs(f64, -min(f64));
|
try testArgs(f64, -fmin(f64));
|
||||||
try testArgs(f64, -trueMin(f64));
|
try testArgs(f64, -tmin(f64));
|
||||||
try testArgs(f64, -0.0);
|
try testArgs(f64, -0.0);
|
||||||
try testArgs(f64, 0.0);
|
try testArgs(f64, 0.0);
|
||||||
try testArgs(f64, trueMin(f64));
|
try testArgs(f64, tmin(f64));
|
||||||
try testArgs(f64, min(f64));
|
try testArgs(f64, fmin(f64));
|
||||||
try testArgs(f64, 0.1);
|
try testArgs(f64, 0.1);
|
||||||
try testArgs(f64, 1.0);
|
try testArgs(f64, 1.0);
|
||||||
try testArgs(f64, 10.0);
|
try testArgs(f64, 10.0);
|
||||||
try testArgs(f64, max(f64));
|
try testArgs(f64, fmax(f64));
|
||||||
try testArgs(f64, inf(f64));
|
try testArgs(f64, inf(f64));
|
||||||
try testArgs(f64, nan(f64));
|
try testArgs(f64, nan(f64));
|
||||||
|
|
||||||
try testArgs(f80, -nan(f80));
|
try testArgs(f80, -nan(f80));
|
||||||
try testArgs(f80, -inf(f80));
|
try testArgs(f80, -inf(f80));
|
||||||
try testArgs(f80, -max(f80));
|
try testArgs(f80, -fmax(f80));
|
||||||
try testArgs(f80, -10.0);
|
try testArgs(f80, -10.0);
|
||||||
try testArgs(f80, -1.0);
|
try testArgs(f80, -1.0);
|
||||||
try testArgs(f80, -0.1);
|
try testArgs(f80, -0.1);
|
||||||
try testArgs(f80, -min(f80));
|
try testArgs(f80, -fmin(f80));
|
||||||
try testArgs(f80, -trueMin(f80));
|
try testArgs(f80, -tmin(f80));
|
||||||
try testArgs(f80, -0.0);
|
try testArgs(f80, -0.0);
|
||||||
try testArgs(f80, 0.0);
|
try testArgs(f80, 0.0);
|
||||||
try testArgs(f80, trueMin(f80));
|
try testArgs(f80, tmin(f80));
|
||||||
try testArgs(f80, min(f80));
|
try testArgs(f80, fmin(f80));
|
||||||
try testArgs(f80, 0.1);
|
try testArgs(f80, 0.1);
|
||||||
try testArgs(f80, 1.0);
|
try testArgs(f80, 1.0);
|
||||||
try testArgs(f80, 10.0);
|
try testArgs(f80, 10.0);
|
||||||
try testArgs(f80, max(f80));
|
try testArgs(f80, fmax(f80));
|
||||||
try testArgs(f80, inf(f80));
|
try testArgs(f80, inf(f80));
|
||||||
try testArgs(f80, nan(f80));
|
try testArgs(f80, nan(f80));
|
||||||
|
|
||||||
try testArgs(f128, -nan(f128));
|
try testArgs(f128, -nan(f128));
|
||||||
try testArgs(f128, -inf(f128));
|
try testArgs(f128, -inf(f128));
|
||||||
try testArgs(f128, -max(f128));
|
try testArgs(f128, -fmax(f128));
|
||||||
try testArgs(f128, -10.0);
|
try testArgs(f128, -10.0);
|
||||||
try testArgs(f128, -1.0);
|
try testArgs(f128, -1.0);
|
||||||
try testArgs(f128, -0.1);
|
try testArgs(f128, -0.1);
|
||||||
try testArgs(f128, -min(f128));
|
try testArgs(f128, -fmin(f128));
|
||||||
try testArgs(f128, -trueMin(f128));
|
try testArgs(f128, -tmin(f128));
|
||||||
try testArgs(f128, -0.0);
|
try testArgs(f128, -0.0);
|
||||||
try testArgs(f128, 0.0);
|
try testArgs(f128, 0.0);
|
||||||
try testArgs(f128, trueMin(f128));
|
try testArgs(f128, tmin(f128));
|
||||||
try testArgs(f128, min(f128));
|
try testArgs(f128, fmin(f128));
|
||||||
try testArgs(f128, 0.1);
|
try testArgs(f128, 0.1);
|
||||||
try testArgs(f128, 1.0);
|
try testArgs(f128, 1.0);
|
||||||
try testArgs(f128, 10.0);
|
try testArgs(f128, 10.0);
|
||||||
try testArgs(f128, max(f128));
|
try testArgs(f128, fmax(f128));
|
||||||
try testArgs(f128, inf(f128));
|
try testArgs(f128, inf(f128));
|
||||||
try testArgs(f128, nan(f128));
|
try testArgs(f128, nan(f128));
|
||||||
}
|
}
|
||||||
|
|
@ -1136,6 +1183,145 @@ fn Unary(comptime op: anytype) type {
|
||||||
try testArgs(@Vector(3, i1025), .{ -1 << 1024, -1, 0 });
|
try testArgs(@Vector(3, i1025), .{ -1 << 1024, -1, 0 });
|
||||||
try testArgs(@Vector(3, u1025), .{ 0, 1, 1 << 1024 });
|
try testArgs(@Vector(3, u1025), .{ 0, 1, 1 << 1024 });
|
||||||
}
|
}
|
||||||
|
fn testFloatVectorTypes() !void {
|
||||||
|
try testArgs(@Vector(1, f16), .{
|
||||||
|
-0x1.17cp-12,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, f16), .{
|
||||||
|
0x1.47cp9, 0x1.3acp9,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, f16), .{
|
||||||
|
0x1.ab4p0, -0x1.7fcp-7, -0x1.1cp0, -0x1.f14p12,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, f16), .{
|
||||||
|
-0x1.8d8p8, 0x1.83p10, -0x1.5ap-1, -0x1.d78p13, -0x1.608p12, 0x1.e8p-9, -0x1.688p-10, -0x1.738p9,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, f16), .{
|
||||||
|
0x1.da8p-1, -0x1.ed4p-10, -0x1.dc8p1, 0x1.b78p-14, nan(f16), 0x1.9d8p8, nan(f16), 0x1.d5p13,
|
||||||
|
-0x1.2dp13, 0x1.6c4p12, 0x1.a9cp-11, -0x1.0ecp8, 0x0.4ccp-14, -0x1.0a8p-6, -0x1.5bcp-14, 0x1.6d8p-9,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(32, f16), .{
|
||||||
|
0x1.d5cp-6, -0x1.a98p5, 0x1.49cp5, -0x1.e4p-1, -0x1.21p-13, -0x1.c94p-1, -0x1.adcp-5, -0x1.524p-1,
|
||||||
|
-0x1.0d8p-3, -0x1.5c4p-2, 0x1.f84p-2, 0x1.664p1, -0x1.f64p13, -0x1.bf4p4, -0x1.4b8p0, -0x0.f64p-14,
|
||||||
|
-0x1.3f8p1, 0x1.098p2, -0x1.a44p8, 0x1.048p13, 0x1.fd4p-11, 0x1.18p-9, -0x1.504p2, 0x1.d04p7,
|
||||||
|
-nan(f16), 0x1.a94p2, 0x0.5e8p-14, -0x1.7acp-7, 0x1.4c8p-3, 0x1.518p-4, nan(f16), 0x1.8f8p10,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(64, f16), .{
|
||||||
|
-0x1.c2p2, 0x0.2fcp-14, 0x1.de8p0, -0x1.714p2, 0x1.f9p-7, -0x1.11cp-13, -0x1.558p10, -0x1.2acp-7,
|
||||||
|
0x1.348p14, 0x1.2dcp7, -0x1.8acp-12, -0x1.2cp2, 0x1.868p1, -0x1.1f8p-14, 0x1.638p7, -0x1.734p-5,
|
||||||
|
0x0.b98p-14, -0x1.7f4p-12, -0x1.38cp15, 0x1.50cp15, 0x1.91cp8, 0x1.cb4p-1, 0x1.fc4p-13, 0x1.9a4p0,
|
||||||
|
0x1.18p-4, 0x1.60cp10, 0x1.6fp-12, 0x1.b48p6, 0x1.37cp-11, 0x1.424p7, 0x1.44cp13, 0x1.aep5,
|
||||||
|
0x1.968p14, 0x1.e8p13, -0x1.bp2, -0x1.644p5, 0x1.de4p-8, -0x1.5b4p-14, -0x1.4ap1, -0x1.868p9,
|
||||||
|
-0x1.d14p0, 0x1.d7cp15, 0x1.3c8p14, 0x1.2ccp-14, -0x1.ee4p8, 0x1.49p-3, 0x1.35cp12, 0x1.d34p6,
|
||||||
|
0x1.7acp3, -0x1.fa4p2, 0x1.7b4p13, -0x1.cf4p-12, -0x1.ebcp-10, -0x1.5p-3, 0x1.4bp-6, 0x1.83p12,
|
||||||
|
-0x1.f9cp-8, -0x1.43p-8, -0x1.99p-1, -0x1.dacp3, -0x1.728p-4, -0x1.03cp4, 0x1.604p-2, -0x1.0ep13,
|
||||||
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, f32), .{
|
||||||
|
-0x1.17cp-12,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, f32), .{
|
||||||
|
-0x1.a3123ap90, -0x1.4a2ec6p-54,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, f32), .{
|
||||||
|
-0x1.8a41p77, -0x1.7c54e2p-61, -0x1.498556p-41, 0x1.d77c22p-20,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, f32), .{
|
||||||
|
0x1.943da4p-86, 0x1.528792p95, -0x1.9c9bfap-26, -0x1.8df936p-90,
|
||||||
|
-0x1.6a70cep56, 0x1.626638p-48, 0x1.7bb2bap-57, -0x1.ac5104p94,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, f32), .{
|
||||||
|
0x1.157044p115, -0x1.416c04p-111, 0x1.a8f164p-104, 0x1.9b6678p84,
|
||||||
|
-0x1.9d065cp9, -0x1.e8c4b4p126, -0x1.ddb968p84, -0x1.fec8c8p74,
|
||||||
|
0x1.64ffb2p59, 0x1.548922p20, 0x1.7270fcp22, -0x1.abac68p33,
|
||||||
|
0x1.faabfp33, -0x1.8aee82p55, 0x1.1bf8fp75, 0x1.33c46ap-66,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(32, f32), .{
|
||||||
|
-0x1.039b68p37, -0x1.34de4ap-74, -0x1.05d78ap-76, -0x1.be0f5ap-47,
|
||||||
|
0x1.032204p-38, 0x1.ef8e2ap-78, -0x1.b013ecp-80, 0x1.71fe4cp99,
|
||||||
|
0x1.abdadap-14, 0x1.56a9a8p-48, -0x1.8bbd7ep9, 0x1.edd308p-72,
|
||||||
|
-0x1.92fafcp-121, -0x1.50812p19, 0x1.f4ddc4p28, -0x1.6f0b12p-50,
|
||||||
|
-0x1.12ab02p127, 0x1.24df48p21, -0x1.993c3p-14, -0x1.4cc476p-112,
|
||||||
|
0x1.13d9a8p-40, 0x1.a6e652p-9, -0x1.9c730cp-21, -0x1.a75aaap-70,
|
||||||
|
-0x1.39e632p-111, 0x1.8e8da8p-45, 0x1.b5652cp31, 0x1.258366p44,
|
||||||
|
0x1.d473aap92, -0x1.951b64p9, 0x1.542edp15, -0x0.f6222ap-126,
|
||||||
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, f64), .{
|
||||||
|
-0x1.0114613df6f97p816,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, f64), .{
|
||||||
|
-0x1.8404dad72003cp720, -0x1.6b14b40bcf3b7p-176,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, f64), .{
|
||||||
|
-0x1.04e1acbfddd9cp681, -0x1.ed553cc056da7p-749,
|
||||||
|
0x1.3d3f703a0c893p-905, 0x1.0b35633fa78fp691,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, f64), .{
|
||||||
|
-0x1.901a2a60f0562p-301, -0x1.2516175ad61ecp-447,
|
||||||
|
0x1.e7b12124846bfp564, 0x1.9291384bd7259p209,
|
||||||
|
-0x1.a7bf62f803c98p900, 0x1.4e2e26257bb3p987,
|
||||||
|
-0x1.413ca9a32d894p811, 0x1.61b1dd9432e95p479,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, f64), .{
|
||||||
|
-0x1.8fc7286d95f54p-235, -0x1.796a7ea8372b6p-837,
|
||||||
|
-0x1.8c0f930539acbp-98, -0x1.ec80dfbf0b931p-430,
|
||||||
|
-0x1.e3d80c640652fp-1019, 0x1.8241238fb542fp161,
|
||||||
|
-0x1.e1f1a79d50263p137, -0x1.9ac5cb2771c28p-791,
|
||||||
|
0x1.4d8f00fe881e7p-401, -0x1.87fbd7bfd99d7p346,
|
||||||
|
-0x1.a8a7cc575335ep1017, 0x1.37bb88dc3fd8bp-355,
|
||||||
|
0x1.9d53d346c0e65p929, -0x1.bbae3d0229c34p289,
|
||||||
|
-0x1.cb8ef994d5ce5p25, 0x1.ba20af512616ap50,
|
||||||
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, f80), .{
|
||||||
|
-0x1.a2e9410a7dfedabp-2324,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, f80), .{
|
||||||
|
-0x1.a2e9410a7dfedabp-2324,
|
||||||
|
0x1.2b17da3b9746885p-8665,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, f80), .{
|
||||||
|
-0x1.c488fedb7ab646cep-13007,
|
||||||
|
0x1.e914deaccaa50016p2073,
|
||||||
|
-0x1.d1c7ae8ec3c9df86p10642,
|
||||||
|
-0x1.2da1658f337fa01p9893,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, f80), .{
|
||||||
|
-0x1.bed8a74c43750656p890,
|
||||||
|
-0x1.7bf57f38004ac976p8481,
|
||||||
|
-0x1.9cdc10ac0657d328p7884,
|
||||||
|
0x1.c86f61883da149fp12293,
|
||||||
|
-0x1.528d6957df6bfdd8p14125,
|
||||||
|
-0x1.5ebb4006d0243bfep14530,
|
||||||
|
-0x1.94b9b18636d12402p-1845,
|
||||||
|
-0x1.25439a6d68add188p5962,
|
||||||
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, f128), .{
|
||||||
|
-0x1.d1e6fc3b1e66632e7b79051a47dap14300,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, f128), .{
|
||||||
|
0x1.84b3ac8ffe5893b2c6af8d68de9dp-83,
|
||||||
|
-0x1.438ca2c8a0d8e3ee9062d351c46ep-10235,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, f128), .{
|
||||||
|
0x1.04eb03882d4fd1b090e714d3e5ep806,
|
||||||
|
-0x1.4082b29f7c26e701764c915642ffp-6182,
|
||||||
|
-0x1.b6f1e8565e5040415110f18b519ap13383,
|
||||||
|
0x1.1c29f8c162cead9061c5797ea15ap11957,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, f128), .{
|
||||||
|
-0x1.53d7f00cd204d80e5ff5bb665773p11218,
|
||||||
|
-0x1.4daa1c81cffe28e8fa5cd703c287p2362,
|
||||||
|
-0x1.cc6a71c3ad4560871efdbd025cd7p-8116,
|
||||||
|
-0x1.87f8553cf8772fb6b78e7df3e3bap14523,
|
||||||
|
-0x1.14b6880f6678f86dfb543dde1c6ep2105,
|
||||||
|
0x1.9d2d4398414da9d857e76e8fd7ccp-13668,
|
||||||
|
0x1.a37f07af240ded458d103c022064p-1158,
|
||||||
|
0x1.425d53e6bd6070b847e5da1ed593p1394,
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1205,26 +1391,51 @@ fn Binary(comptime op: anytype) type {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
fn testIntTypes() !void {
|
fn testIntTypes() !void {
|
||||||
|
try testArgs(i8, 0x48, 0x6c);
|
||||||
try testArgs(u8, 0xbb, 0x43);
|
try testArgs(u8, 0xbb, 0x43);
|
||||||
|
try testArgs(i16, -0x0fdf, 0x302e);
|
||||||
try testArgs(u16, 0xb8bf, 0x626d);
|
try testArgs(u16, 0xb8bf, 0x626d);
|
||||||
|
try testArgs(i32, -0x6280178f, 0x6802c034);
|
||||||
try testArgs(u32, 0x80d7a2c6, 0xbff6a402);
|
try testArgs(u32, 0x80d7a2c6, 0xbff6a402);
|
||||||
|
try testArgs(i64, 0x0365a53b8ee0c987, -0x1bb6d3013500a7d2);
|
||||||
try testArgs(u64, 0x71138bc6b4a38898, 0x1bc4043de9438c7b);
|
try testArgs(u64, 0x71138bc6b4a38898, 0x1bc4043de9438c7b);
|
||||||
|
try testArgs(i128, 0x76d428c46cdeaa2ac43de8abffb22f6d, 0x427f7545abe434a12544fdbe2a012889);
|
||||||
try testArgs(u128, 0xe05fc132ef2cd8affee00a907f0a851f, 0x29f912a72cfc6a7c6973426a9636da9a);
|
try testArgs(u128, 0xe05fc132ef2cd8affee00a907f0a851f, 0x29f912a72cfc6a7c6973426a9636da9a);
|
||||||
|
try testArgs(
|
||||||
|
i256,
|
||||||
|
-0x53d4148cee74ea43477a65b3daa7b8fdadcbf4508e793f4af113b8d8da5a7eb6,
|
||||||
|
-0x30dcbaf7b9b7a3df033694e6795444d842fb0b8f79bc18b3ea8a6b7ccad3ea91,
|
||||||
|
);
|
||||||
try testArgs(
|
try testArgs(
|
||||||
u256,
|
u256,
|
||||||
0xb7935f5c2f3b1ae7a422c0a7c446884294b7d5370bada307d2fe5a4c4284a999,
|
0xb7935f5c2f3b1ae7a422c0a7c446884294b7d5370bada307d2fe5a4c4284a999,
|
||||||
0x310e6e196ba4f143b8d285ca6addf7f3bb3344224aff221b27607a31e148be08,
|
0x310e6e196ba4f143b8d285ca6addf7f3bb3344224aff221b27607a31e148be08,
|
||||||
);
|
);
|
||||||
|
try testArgs(
|
||||||
|
i258,
|
||||||
|
-0x0eee283365108dbeea0bec82f5147418d8ffe86f9eed00e414b4eccd65c21239a,
|
||||||
|
-0x122c730073fc29a24cd6e3e6263566879bc5325d8566b8db31fcb4a76f7ab95eb,
|
||||||
|
);
|
||||||
try testArgs(
|
try testArgs(
|
||||||
u258,
|
u258,
|
||||||
0x186d5ddaab8cb8cb04e5b41e36f812e039d008baf49f12894c39e29a07796d800,
|
0x186d5ddaab8cb8cb04e5b41e36f812e039d008baf49f12894c39e29a07796d800,
|
||||||
0x2072daba6ffad168826163eb136f6d28ca4360c8e7e5e41e29755e19e4753a4f5,
|
0x2072daba6ffad168826163eb136f6d28ca4360c8e7e5e41e29755e19e4753a4f5,
|
||||||
);
|
);
|
||||||
|
try testArgs(
|
||||||
|
i495,
|
||||||
|
0x2fe6bc5448c55ce18252e2c9d44777505dfe63ff249a8027a6626c7d8dd9893fd5731e51474727be556f757facb586a4e04bbc0148c6c7ad692302f46fbd,
|
||||||
|
-0x016a358821ef8240172f3a08e8830c06e6bcf2225f5f4d41ed42b44d249385f55cc594e1278ecac31c73faed890e5054af1a561483bb1bb6fb1f753514cf,
|
||||||
|
);
|
||||||
try testArgs(
|
try testArgs(
|
||||||
u495,
|
u495,
|
||||||
0x6eaf4e252b3bf74b75bac59e0b43ca5326bad2a25b3fdb74a67ef132ac5e47d72eebc3316fb2351ee66c50dc5afb92a75cea9b0e35160652c7db39eeb158,
|
0x6eaf4e252b3bf74b75bac59e0b43ca5326bad2a25b3fdb74a67ef132ac5e47d72eebc3316fb2351ee66c50dc5afb92a75cea9b0e35160652c7db39eeb158,
|
||||||
0x49fbed744a92b549d8c05bb3512c617d24dd824f3f69bdf3923bc326a75674b85f5b828d2566fab9c86f571d12c2a63c9164feb0d191d27905533d09622a,
|
0x49fbed744a92b549d8c05bb3512c617d24dd824f3f69bdf3923bc326a75674b85f5b828d2566fab9c86f571d12c2a63c9164feb0d191d27905533d09622a,
|
||||||
);
|
);
|
||||||
|
try testArgs(
|
||||||
|
i512,
|
||||||
|
-0x3a6876ca92775286c6e1504a64a9b8d56985bebf4a1b66539d404e0e96f24b226f70c4bcff295fdc2043b82513b2052dc45fd78f7e9e80e5b3e101757289f054,
|
||||||
|
0x5080c516a819bd32a0a5f0976441bbfbcf89e77684f1f10eb326aeb28e1f8d593278cff60fc99b8ffc87d8696882c64728dd3c322b7142803f4341f85a03bc10,
|
||||||
|
);
|
||||||
try testArgs(
|
try testArgs(
|
||||||
u512,
|
u512,
|
||||||
0xe5b1fedca3c77db765e517aabd05ffc524a3a8aff1784bbf67c45b894447ede32b65b9940e78173c591e56e078932d465f235aece7ad47b7f229df7ba8f12295,
|
0xe5b1fedca3c77db765e517aabd05ffc524a3a8aff1784bbf67c45b894447ede32b65b9940e78173c591e56e078932d465f235aece7ad47b7f229df7ba8f12295,
|
||||||
|
|
@ -1232,6 +1443,69 @@ fn Binary(comptime op: anytype) type {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
fn testIntVectorTypes() !void {
|
fn testIntVectorTypes() !void {
|
||||||
|
try testArgs(@Vector(1, i8), .{
|
||||||
|
-0x54,
|
||||||
|
}, .{
|
||||||
|
0x0f,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i8), .{
|
||||||
|
-0x4d, 0x55,
|
||||||
|
}, .{
|
||||||
|
0x7d, -0x5d,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, i8), .{
|
||||||
|
0x73, 0x6f, 0x6e, -0x49,
|
||||||
|
}, .{
|
||||||
|
-0x66, 0x23, 0x21, -0x56,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, i8), .{
|
||||||
|
0x44, -0x37, 0x33, -0x2b, -0x1f, 0x3e, 0x50, -0x4d,
|
||||||
|
}, .{
|
||||||
|
0x6a, 0x1a, -0x0e, 0x4c, -0x46, 0x03, -0x17, 0x3e,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, i8), .{
|
||||||
|
-0x52, 0x1a, -0x4b, 0x4e, -0x75, 0x33, -0x43, 0x30, 0x71, -0x30, -0x73, -0x53, 0x64, 0x1f, -0x27, 0x36,
|
||||||
|
}, .{
|
||||||
|
0x65, 0x77, -0x62, 0x0f, 0x15, 0x52, 0x5c, 0x12, -0x10, 0x36, 0x6d, 0x42, -0x24, -0x79, -0x32, -0x75,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(32, i8), .{
|
||||||
|
-0x12, -0x1e, 0x18, 0x6e, 0x31, 0x53, -0x6a, -0x34, 0x13, 0x4d, 0x30, -0x7d, -0x31, 0x1e, -0x24, 0x32,
|
||||||
|
-0x1e, -0x01, 0x55, 0x33, -0x75, -0x44, -0x57, 0x2b, -0x66, 0x19, 0x7f, -0x28, -0x3f, -0x7e, -0x5d, -0x06,
|
||||||
|
}, .{
|
||||||
|
0x05, -0x23, 0x43, -0x54, -0x41, 0x7f, -0x6a, -0x31, 0x04, 0x15, -0x7a, -0x37, 0x6d, 0x16, 0x00, 0x4a,
|
||||||
|
0x15, 0x55, -0x4a, 0x16, -0x73, -0x0c, 0x1c, -0x26, -0x14, 0x00, 0x55, 0x7b, 0x16, -0x2e, -0x5f, -0x67,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(64, i8), .{
|
||||||
|
-0x05, 0x76, 0x4e, -0x5c, 0x7b, -0x1a, -0x38, -0x2e, 0x3d, 0x36, 0x01, 0x30, -0x02, -0x71, -0x24, 0x24,
|
||||||
|
-0x2e, -0x6e, -0x60, 0x74, -0x80, -0x1c, -0x34, -0x08, -0x33, 0x77, 0x1c, -0x0f, 0x45, -0x51, -0x1d, 0x35,
|
||||||
|
-0x45, 0x44, 0x27, -0x3c, 0x6b, 0x58, -0x6a, -0x26, 0x06, -0x30, -0x21, -0x0a, 0x60, -0x11, -0x05, 0x75,
|
||||||
|
0x38, 0x72, -0x6d, -0x1f, -0x7f, 0x74, -0x6b, -0x14, -0x80, 0x35, -0x0f, -0x1e, 0x6a, 0x17, -0x74, -0x6c,
|
||||||
|
}, .{
|
||||||
|
-0x5d, 0x2d, 0x55, 0x40, -0x7c, 0x67, 0x61, 0x5f, 0x14, 0x5b, -0x0c, -0x4d, -0x5f, 0x25, 0x36, 0x3c,
|
||||||
|
-0x75, -0x48, -0x2b, 0x76, -0x57, -0x4a, 0x1d, 0x65, -0x32, 0x18, -0x2a, -0x0a, -0x6e, -0x3c, -0x62, 0x4e,
|
||||||
|
-0x24, -0x3c, 0x7d, -0x79, -0x1a, -0x14, -0x03, -0x56, 0x7a, 0x5f, 0x64, -0x68, 0x5f, -0x10, -0x63, -0x07,
|
||||||
|
0x79, -0x44, 0x47, 0x7d, 0x6e, 0x77, 0x03, -0x4e, 0x67, 0x38, 0x46, -0x44, -0x41, 0x66, -0x16, -0x0a,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(128, i8), .{
|
||||||
|
0x30, 0x70, -0x2a, -0x29, -0x35, -0x69, -0x18, 0x2b, 0x4a, -0x17, -0x5f, -0x36, 0x34, -0x26, 0x03, -0x2d,
|
||||||
|
-0x75, -0x27, -0x07, -0x49, -0x58, 0x00, -0x45, 0x5d, -0x11, -0x68, 0x34, 0x73, -0x4d, 0x7f, -0x25, -0x6a,
|
||||||
|
0x46, -0x1d, -0x68, 0x04, 0x64, -0x0d, 0x30, 0x27, -0x24, 0x67, 0x3c, -0x7c, -0x2e, -0x24, 0x24, 0x3e,
|
||||||
|
-0x2c, -0x05, 0x4e, -0x17, 0x6d, 0x57, 0x76, 0x35, -0x3d, 0x51, 0x71, -0x4e, 0x50, 0x26, 0x4a, -0x42,
|
||||||
|
0x73, -0x36, -0x5d, 0x2a, 0x55, 0x33, -0x2b, -0x76, 0x08, 0x43, 0x77, -0x73, -0x0a, 0x5c, -0x03, -0x50,
|
||||||
|
-0x0a, -0x1c, -0x20, 0x3c, -0x7e, 0x60, 0x11, -0x77, 0x25, -0x71, 0x31, 0x2d, -0x4b, -0x26, -0x2a, 0x7f,
|
||||||
|
-0x1f, 0x23, -0x34, -0x1f, 0x35, 0x0d, 0x3e, 0x76, -0x08, 0x2c, 0x12, 0x3e, -0x09, -0x3e, 0x4b, -0x52,
|
||||||
|
-0x1a, -0x44, -0x53, -0x41, -0x6d, -0x5e, -0x06, -0x04, 0x3f, -0x2e, 0x01, 0x54, 0x19, -0x5a, -0x62, -0x3a,
|
||||||
|
}, .{
|
||||||
|
0x42, -0x11, -0x08, -0x64, -0x55, 0x31, 0x27, -0x66, 0x38, 0x5a, 0x25, -0x68, 0x0b, -0x41, -0x0d, 0x60,
|
||||||
|
-0x17, -0x6d, 0x62, -0x65, -0x5e, -0x1c, -0x35, 0x28, 0x1c, -0x74, -0x7f, -0x1c, 0x3a, 0x4e, 0x05, -0x08,
|
||||||
|
0x30, -0x77, 0x03, 0x68, -0x2c, 0x5c, 0x74, 0x6a, -0x21, 0x0a, 0x36, -0x55, 0x21, 0x29, -0x05, 0x70,
|
||||||
|
0x23, 0x3b, 0x0a, 0x7a, 0x19, 0x14, 0x65, -0x1d, 0x2b, 0x65, 0x33, 0x2a, 0x52, -0x63, 0x57, 0x10,
|
||||||
|
-0x1b, 0x26, -0x46, -0x7e, -0x25, 0x79, -0x01, -0x0d, -0x49, -0x4d, 0x74, 0x03, 0x77, 0x16, 0x03, -0x3d,
|
||||||
|
0x1c, 0x25, 0x5a, -0x2f, -0x16, -0x5f, -0x36, -0x55, -0x44, -0x0c, -0x0f, 0x7b, -0x15, -0x1d, 0x32, 0x31,
|
||||||
|
0x6e, -0x44, -0x4a, -0x64, 0x67, 0x04, 0x47, 0x00, 0x3c, -0x0a, -0x79, 0x3d, 0x48, 0x5a, 0x61, -0x2c,
|
||||||
|
0x6d, -0x68, -0x71, -0x6b, -0x11, 0x44, -0x75, -0x55, -0x67, -0x52, 0x64, -0x3d, -0x05, -0x76, -0x6d, -0x44,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u8), .{
|
try testArgs(@Vector(1, u8), .{
|
||||||
0x1f,
|
0x1f,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1295,6 +1569,67 @@ fn Binary(comptime op: anytype) type {
|
||||||
0x56, 0x4f, 0xf1, 0xaa, 0x0a, 0x0f, 0xdb, 0x1b, 0xc8, 0x45, 0x9b, 0x12, 0xb4, 0x1a, 0xe4, 0xa3,
|
0x56, 0x4f, 0xf1, 0xaa, 0x0a, 0x0f, 0xdb, 0x1b, 0xc8, 0x45, 0x9b, 0x12, 0xb4, 0x1a, 0xe4, 0xa3,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i16), .{
|
||||||
|
-0x7b9c,
|
||||||
|
}, .{
|
||||||
|
0x600a,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i16), .{
|
||||||
|
0x43cc, -0x1421,
|
||||||
|
}, .{
|
||||||
|
-0x2b0e, 0x4d99,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, i16), .{
|
||||||
|
0x558f, 0x6d92, 0x488f, 0x0a04,
|
||||||
|
}, .{
|
||||||
|
-0x01a9,
|
||||||
|
0x2ee4,
|
||||||
|
0x24a9,
|
||||||
|
-0x5fee,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, i16), .{
|
||||||
|
-0x7e5d, -0x02e4, -0x3a72, -0x2e30, 0x7c87, 0x3ea0, 0x4f02, 0x06e4,
|
||||||
|
}, .{
|
||||||
|
-0x417f, 0x5a13, -0x117b, 0x4c28, -0x3769, -0x56a8, 0x1656, -0x4431,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, i16), .{
|
||||||
|
0x04be, 0x774a, 0x7395, -0x6ca2, -0x21a0, 0x35be, 0x186c, 0x5991,
|
||||||
|
-0x1a82, 0x4527, -0x2278, -0x3554, 0x42c1, 0x7f53, -0x670d, 0x1fad,
|
||||||
|
}, .{
|
||||||
|
0x7a7d, 0x47dd, 0x1975, 0x4028, 0x26ef, -0x24f5, -0x77c9, -0x19a5,
|
||||||
|
-0x4b04, -0x6939, -0x1b8d, 0x3718, -0x78e6, 0x0941, -0x1208, -0x392d,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(32, i16), .{
|
||||||
|
0x4cde, 0x3ab0, 0x354e, 0x0bc0, -0x5333, 0x4857, -0x7ccf, -0x69da,
|
||||||
|
0x6ab8, 0x2bf3, 0x1c5a, 0x7b11, -0x5653, 0x7bc5, 0x497e, -0x0b55,
|
||||||
|
0x7aa8, -0x5a8c, -0x6d05, 0x6210, 0x1b64, 0x3f6f, 0x1a02, 0x65e4,
|
||||||
|
-0x6795, 0x5867, -0x6faf, -0x07cb, -0x762c, -0x7500, 0x1f1c, -0x4348,
|
||||||
|
}, .{
|
||||||
|
0x72f6, -0x5405, -0x3aac, 0x2857, 0x34cd, -0x1dce, -0x56d8, 0x7150,
|
||||||
|
-0x6549, 0x61bd, -0x3a9f, -0x1e02, -0x5a5a, -0x7910, -0x166d, 0x7c8e,
|
||||||
|
-0x5292, -0x6c6e, -0x37e3, 0x1514, 0x1787, 0x58cb, -0x4d99, -0x6c15,
|
||||||
|
0x592e, -0x045f, 0x7682, -0x1eef, 0x1fb2, -0x7117, -0x2a17, -0x2d8e,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(64, i16), .{
|
||||||
|
0x29c3, -0x1b1f, -0x17ce, -0x50d0, -0x5de3, 0x5ffd, 0x184a, -0x7769,
|
||||||
|
0x445e, 0x0d8a, 0x7844, -0x757d, 0x2b32, 0x5374, -0x6ab2, -0x71c4,
|
||||||
|
0x38f9, 0x347f, 0x2d4c, 0x69a4, -0x2f92, -0x4479, 0x427b, -0x0c5f,
|
||||||
|
0x15ae, 0x2c86, 0x1864, -0x0095, 0x6803, -0x3484, 0x1001, -0x0560,
|
||||||
|
-0x0824, 0x7bf6, 0x7a3c, -0x458a, -0x65cc, -0x54b1, -0x75c6, 0x782e,
|
||||||
|
0x35a7, -0x3188, -0x58ba, 0x40d0, -0x4a9c, 0x6b79, 0x1ef5, 0x67a2,
|
||||||
|
-0x3fb8, 0x1885, -0x093d, -0x4802, 0x0379, 0x2f52, 0x7f1f, 0x256c,
|
||||||
|
0x1052, 0x1b3b, -0x6146, 0x7e0d, 0x79ca, -0x79ee, 0x3d58, 0x7482,
|
||||||
|
}, .{
|
||||||
|
-0x0017, -0x3fdd, -0x6f93, 0x6178, 0x5c2b, 0x4eb3, 0x685b, 0x12c8,
|
||||||
|
0x0290, -0x34f4, -0x6572, 0x3ab6, -0x3ed1, -0x5e5f, 0x3a90, -0x4540,
|
||||||
|
-0x2098, 0x6bde, 0x1246, 0x2212, -0x4d6a, -0x2a5a, 0x5cc4, -0x240f,
|
||||||
|
0x51b2, 0x5ec0, -0x5b5f, -0x1b6e, -0x57a5, -0x06bd, -0x5132, 0x7889,
|
||||||
|
0x2817, 0x6ada, -0x6b46, -0x6a37, -0x6475, -0x5ff4, 0x5a27, 0x1dfa,
|
||||||
|
0x6bd6, -0x49da, -0x09bf, -0x7c53, 0x2cd3, -0x6be0, -0x2dca, 0x44bd,
|
||||||
|
-0x1b95, 0x7680, -0x5bb0, 0x7ad7, -0x1988, 0x149f, 0x631e, -0x1d2d,
|
||||||
|
0x632b, 0x55c7, -0x3433, 0x0dde, -0x27a7, 0x560e, -0x2063, 0x4570,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u16), .{
|
try testArgs(@Vector(1, u16), .{
|
||||||
0x9d6f,
|
0x9d6f,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1353,6 +1688,59 @@ fn Binary(comptime op: anytype) type {
|
||||||
0x2c02, 0xff5b, 0x19ca, 0xbbf5, 0x870e, 0xc9ca, 0x47bb, 0xcfcc,
|
0x2c02, 0xff5b, 0x19ca, 0xbbf5, 0x870e, 0xc9ca, 0x47bb, 0xcfcc,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i32), .{
|
||||||
|
0x7aef7b1e,
|
||||||
|
}, .{
|
||||||
|
0x60310858,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i32), .{
|
||||||
|
-0x21910ac9, 0x669f37ef,
|
||||||
|
}, .{
|
||||||
|
0x1a2a1681, 0x003b1fdf,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, i32), .{
|
||||||
|
0x7906cf0d, 0x4818a45f, -0x0a2833b6, 0x51a018c9,
|
||||||
|
}, .{
|
||||||
|
-0x05a3e6a7, -0x47f4a500, 0x50d1141f, -0x264c85c2,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, i32), .{
|
||||||
|
0x7566235a, -0x7720144f, -0x7d4f5489, 0x3cd736c8,
|
||||||
|
-0x77388801, 0x4e7f955a, 0x4cdf52bc, 0x50b0b53f,
|
||||||
|
}, .{
|
||||||
|
0x00ed6fc5, 0x37320361, 0x70c563c2, -0x09acb495,
|
||||||
|
0x0688e83f, 0x797295c4, -0x23bfbfdb, 0x38552096,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, i32), .{
|
||||||
|
-0x0214589d, 0x74a7537f, 0x7a7dcb26, 0x3e2e4c44,
|
||||||
|
-0x23bfc358, 0x60e8ef18, 0x5524a7bc, -0x3d88c153,
|
||||||
|
-0x7dc8ff0f, 0x6e2698f6, 0x05641ab8, -0x45e9e405,
|
||||||
|
-0x7c1a04d0, -0x4a8d1e91, 0x41d56723, 0x4ba924ab,
|
||||||
|
}, .{
|
||||||
|
-0x528dc756, -0x6bc217f4, 0x40789b06, 0x65f08d3a,
|
||||||
|
-0x077140ea, -0x43bdaa79, 0x5d98f4e7, -0x2356a1ca,
|
||||||
|
-0x36ef2b49, -0x7cd09b06, 0x71c8176e, 0x5b005860,
|
||||||
|
0x6ce8cfab, -0x49fd7609, 0x6cbb4e33, 0x6c7c121d,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(32, i32), .{
|
||||||
|
0x7d22905d, -0x354e4bbe, -0x68662618, -0x246e1858,
|
||||||
|
-0x1c4285a9, -0x0338059c, -0x60f5bbf4, -0x04f06917,
|
||||||
|
-0x55f837b6, -0x2fba5fe3, 0x092aabf4, -0x5f533b31,
|
||||||
|
0x6e81a558, -0x7bcac358, 0x6c4d8d04, 0x3e2f9852,
|
||||||
|
-0x78589b1a, -0x68a00fd4, -0x77d55e25, 0x7f79b51c,
|
||||||
|
-0x66b88f45, 0x7f6dc8a5, -0x27299a82, -0x426c8e1c,
|
||||||
|
0x0c288f16, 0x158f8c3f, 0x26708be1, -0x0b73626e,
|
||||||
|
-0x32df1bee, 0x196330f4, -0x68bb9529, -0x26376ab6,
|
||||||
|
}, .{
|
||||||
|
0x63bd0bd4, 0x4e507611, -0x5e5222b8, -0x35d8e114,
|
||||||
|
0x1feab77b, -0x20de7dfd, -0x0ed0b09f, -0x7fc3d585,
|
||||||
|
-0x2d3018e9, -0x261d431b, 0x54451864, 0x1415288f,
|
||||||
|
-0x3ab89593, -0x7060e4c1, -0x54fcd501, -0x26324630,
|
||||||
|
0x53fc8294, 0x2d4aceef, -0x4ac8efd2, -0x2fec97b7,
|
||||||
|
-0x4de3a2fc, 0x2269fe52, -0x58c8b473, -0x21026285,
|
||||||
|
-0x23438776, 0x3d5c8c41, -0x1fc946b2, -0x161c7005,
|
||||||
|
0x44913ff1, -0x76e2bfaa, -0x54636350, -0x6ec53870,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u32), .{
|
try testArgs(@Vector(1, u32), .{
|
||||||
0x1d0d9cc4,
|
0x1d0d9cc4,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1406,6 +1794,54 @@ fn Binary(comptime op: anytype) type {
|
||||||
0xf080e943, 0xc8718d14, 0x3f920382, 0x18d101b5,
|
0xf080e943, 0xc8718d14, 0x3f920382, 0x18d101b5,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i64), .{
|
||||||
|
0x4a31679b316d8b59,
|
||||||
|
}, .{
|
||||||
|
0x34a583368386afde,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i64), .{
|
||||||
|
0x3bae373f9cb990b3, -0x7e8c6c876e8fd34a,
|
||||||
|
}, .{
|
||||||
|
0x09dbef6f7cb9c726, 0x48dfeca879b0df51,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, i64), .{
|
||||||
|
-0x2bd24dd5f5da94bf, -0x144113bae33082c2,
|
||||||
|
0x51e8cb7027ba4b12, -0x47b02168e2e22f13,
|
||||||
|
}, .{
|
||||||
|
0x769f113245641b91, -0x414d0e24ea97bc53,
|
||||||
|
-0x0d2a570e7ef9e923, -0x070513d46d3b5a4c,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, i64), .{
|
||||||
|
0x10bb6779b6a55ca9, 0x5f6ffd567a187af4,
|
||||||
|
-0x6ba191b1168486b4, -0x441b92ce455870a1,
|
||||||
|
0x2b6fdefbec9386ad, -0x6fdd3938d79217e4,
|
||||||
|
0x6aa8fe1fb891501f, 0x20802f5bbdf6dc50,
|
||||||
|
}, .{
|
||||||
|
-0x7500319df437b479, 0x00ceb712d4fa62d4,
|
||||||
|
0x67e715b9e99e660d, -0x17ae00e1f0009ec2,
|
||||||
|
-0x5b700b948503acdf, -0x3ff61fb5cce5a530,
|
||||||
|
0x55a3efac2e3694a4, 0x7f951a8d842f1670,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(16, i64), .{
|
||||||
|
0x37a205109a685810, -0x50ff5d13134ccaa6,
|
||||||
|
0x26813391c5505d5d, -0x502cdc01603a2f21,
|
||||||
|
-0x6b1b44b1c850c7ea, 0x1f6db974ace9dd70,
|
||||||
|
-0x47d15da8b519e328, 0x3ac0763abbf79d8d,
|
||||||
|
0x5f12e0dc1aed4a4f, -0x46a973e16061e928,
|
||||||
|
-0x3f59a3fa9699b4d5, -0x2f5012d390c78315,
|
||||||
|
-0x40e510dea2c47e9c, 0x221c51defe0acc9a,
|
||||||
|
-0x385fd6f1d390b84b, 0x35932fe2783fa6b9,
|
||||||
|
}, .{
|
||||||
|
0x0ba5202b71ad73dd, 0x65c8d2d5e2a14fe5,
|
||||||
|
0x2e4d97cd66c41a3d, 0x14babbb47da51193,
|
||||||
|
0x59d1d12b42ade3aa, -0x3c3617e556dfa8fb,
|
||||||
|
-0x5a36602ba43279c4, -0x61f1ddda13665d9f,
|
||||||
|
-0x50cd6128589ddd04, 0x135ae0dcc85674ae,
|
||||||
|
-0x25e80592affc038d, 0x07e184c44fbe9b12,
|
||||||
|
-0x70ede1b90964bbaa, 0x3ec48b32e8efd98e,
|
||||||
|
-0x5267d41d85a29f46, 0x53099805f9116b60,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u64), .{
|
try testArgs(@Vector(1, u64), .{
|
||||||
0x333f593bf9d08546,
|
0x333f593bf9d08546,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1454,6 +1890,49 @@ fn Binary(comptime op: anytype) type {
|
||||||
0xed533d18f8657f3f, 0x1ddd7cd7f6bab957,
|
0xed533d18f8657f3f, 0x1ddd7cd7f6bab957,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i128), .{
|
||||||
|
-0x3bb56309fcad13fc1011dc671cf57bdc,
|
||||||
|
}, .{
|
||||||
|
-0x05338bb517db516ee08c45d1408e5836,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i128), .{
|
||||||
|
0x295f2901e3837e5592b9435f8c4df8a7,
|
||||||
|
-0x1f246b0ff2d02a6bf30a63392fc63371,
|
||||||
|
}, .{
|
||||||
|
-0x31060c09e29b545670c4cbc721a4e26b,
|
||||||
|
-0x631eb286321325d51c617aa798195392,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, i128), .{
|
||||||
|
0x47110102c74f620f08e5b7c5dbe193c2,
|
||||||
|
-0x61d12d2650413ad3ffeeeab3ba57e1f0,
|
||||||
|
0x449781e64b29dc8a17a88f4b7a5b0717,
|
||||||
|
0x0d2170e9238d12a585dc5377566e1938,
|
||||||
|
}, .{
|
||||||
|
0x0bf948e19bd01823dcb3887937d97079,
|
||||||
|
-0x16f933ab12bfba3560d0d39ffe69b64a,
|
||||||
|
0x3d0bfce3907a5cd157348f0329e2548e,
|
||||||
|
-0x3c2d182e2e238a4bebd7defbd7f9699a,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(8, i128), .{
|
||||||
|
-0x775678727c721662f02480619acbfc82,
|
||||||
|
-0x6f504fcbff673cb91e4706af4373665f,
|
||||||
|
-0x670f888d4186387c3106d125b856c294,
|
||||||
|
0x0641e7efdfdd924d126b446d874154f8,
|
||||||
|
0x57d7aef0f82d3351917f43c8f677392b,
|
||||||
|
-0x4077e745dede8367d145c94f20ab8810,
|
||||||
|
-0x0344a74fb60e1f1f72ba8ec288b05939,
|
||||||
|
-0x0be3ce9be461aca1d25ad8e74dcc36e1,
|
||||||
|
}, .{
|
||||||
|
-0x4a873d91e5a2331def0d34c008d33d83,
|
||||||
|
0x2744cecfd4c683bdd12f3cfc11d7f520,
|
||||||
|
-0x0cb8e468fc1de93a7c5ad2a5a61e8f50,
|
||||||
|
-0x1a3be9e58e918d6586cc4948a54515d3,
|
||||||
|
-0x512ec6f88c3a34950a8aaee47130120b,
|
||||||
|
-0x2e772e4a8812e553bcf9b2754a493709,
|
||||||
|
0x0c7b137937dc25f9f9cbaf4d7a88ee6b,
|
||||||
|
-0x2ecdd5eb81eb0e98ed8d0aa9516c1617,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u128), .{
|
try testArgs(@Vector(1, u128), .{
|
||||||
0x5f11e16b0ca3392f907a857881455d2e,
|
0x5f11e16b0ca3392f907a857881455d2e,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1497,6 +1976,30 @@ fn Binary(comptime op: anytype) type {
|
||||||
0xa858bce5ad0e48c13588a4e170e8667c,
|
0xa858bce5ad0e48c13588a4e170e8667c,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i256), .{
|
||||||
|
0x1fe30aed39db1accf4d1b43845aec28c1094b500492555fdf59b4f2f85c6a1ce,
|
||||||
|
}, .{
|
||||||
|
0x6932f4faf261c45ecd701a4fe3015d4255e486b04c4ab448fe162980cead63fb,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i256), .{
|
||||||
|
-0x23daa9bab59dc1e685f4220c189930c3420a55784f0dec1028c2778d907ccfe2,
|
||||||
|
0x521c992e4f46d61709d39e076ed94d5d884585f85ccbf71ca4d593da34f61bf5,
|
||||||
|
}, .{
|
||||||
|
0x2d880cb5aa793218a32411389db31e935932029645573a9625dd174099c9e5b2,
|
||||||
|
0x2394a6cde7e8b2dc2995f07f22f815baa6c223d99c0b1ec4b2d8abd0094db853,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(4, i256), .{
|
||||||
|
0x244e66ed932a4d970fd8735c10bfbd5f59bd4452c20fa0fcf873823b8c9e6321,
|
||||||
|
-0x31577b747614b1ab83fd0178293cd80b3cb92e739459b2d038688a2471f6d659,
|
||||||
|
-0x0dbdfc3d8bbd7cab6a33598cef29125aab7571fb0db9a528e42966963d6ce0e7,
|
||||||
|
-0x72c58cce172d8a34019a44407a4baf1f8f8a4a611711bd5bb4daa2a2739dd67b,
|
||||||
|
}, .{
|
||||||
|
-0x2e88bc68893fc2d61af0e5ccb541f31fa6169504e8cfcbeab0b74a03b9e86c33,
|
||||||
|
-0x7eba0783f3382b59a17ffbea57ba1dd8fa30e2d4f7eba7ed68d336d3c37b4561,
|
||||||
|
-0x66d1463efd38e9e994e126d09b5c65c8efc932ffea9ec6cdf6042561ba05f801,
|
||||||
|
0x2024bbacefbabbfd5b32a09be631451764a1f889a77918f9094382dc6d02aef2,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u256), .{
|
try testArgs(@Vector(1, u256), .{
|
||||||
0x28df37e1f57a56133ba3f5b5b2164ce24eb6c29a8973a597fd91fbee8ab4bafb,
|
0x28df37e1f57a56133ba3f5b5b2164ce24eb6c29a8973a597fd91fbee8ab4bafb,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1521,6 +2024,19 @@ fn Binary(comptime op: anytype) type {
|
||||||
0xe47a122bd45d5e7d69722d864a6b795ddee965a0993094f8791dd309d692de8b,
|
0xe47a122bd45d5e7d69722d864a6b795ddee965a0993094f8791dd309d692de8b,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i512), .{
|
||||||
|
-0x439ba81b44584e0c4d7abc80d18ab9d679a4e921884e877b28d04eb15b2d3e7be8d670b0aba2c4cc25c12655e1899ab514d0a6e50a221bcf076d506e6411d5c2,
|
||||||
|
}, .{
|
||||||
|
0x18b1d3be5a03310d82859a4ab72f056a33d1a4b554522bcc062fb33eda3b8111045ee79e045dd1a665d250b897f6f2e12003a03313c2547698f8c1eab452eae1,
|
||||||
|
});
|
||||||
|
try testArgs(@Vector(2, i512), .{
|
||||||
|
0x28e2ab84d87d5fb12be65d8650de67b992dd162fe563ca74b62f51f2f32e1084e03e32c8370930816445ac5052b4d345059c8ace582e3ef44377b160e265ec9b,
|
||||||
|
-0x3a96548c707219326c42063997e71bc7a17b3067d402063843f84c86e747b71e09338079c28943d20601c0cde018bad57f5615fc89784bcb6232e45c54dff1db,
|
||||||
|
}, .{
|
||||||
|
0x64beecc90609b7156653b75a861e174c58fb42d5c7bf8d793efbb1cbe785c6b8cd52ce5f9aa859f174123c387820d40a2f93122b81396d739eb85c3ea33fcd37,
|
||||||
|
-0x3632e347bc6d794940424ca0945dafa04328a924ec6b0ccdedcda6d296e09aa2dd5dca83b934cac752993238aa4fe826be8d62991c9347bae6f01bc0b1b4223d,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u512), .{
|
try testArgs(@Vector(1, u512), .{
|
||||||
0x651058c1d89a8f34cfc5e66b6d25294eecfcc4a7e1e4a356eb51ee7d7b2db25378e4afee51b7d18d16e520772a60c50a02d7966f40ced1870b32c658e5821397,
|
0x651058c1d89a8f34cfc5e66b6d25294eecfcc4a7e1e4a356eb51ee7d7b2db25378e4afee51b7d18d16e520772a60c50a02d7966f40ced1870b32c658e5821397,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1534,6 +2050,12 @@ fn Binary(comptime op: anytype) type {
|
||||||
0x8fa3d86099e9e2789d72f8e792290356d659ab20ac0414ff94745984c6ae7d986082197bb849889f912e896670aa2c1a11bd7e66e3f650710b0f0a18a1533f90,
|
0x8fa3d86099e9e2789d72f8e792290356d659ab20ac0414ff94745984c6ae7d986082197bb849889f912e896670aa2c1a11bd7e66e3f650710b0f0a18a1533f90,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
try testArgs(@Vector(1, i1024), .{
|
||||||
|
-0x4fe568569c0531c9bfbbda1516e93a6c61a3d035c98e13fdc85225165a3bea84d5dc6b610ced008f9321453af42ea50bbf6881d40d2759b73b9b6186c0d6d243f367e292cbbf6b5c5c30d7f4e8de19701c7b0fc9e67cdf31228daa1675a4887f6c4f1588b48855d6f4730a21f27dec8a756c568727709b65cd531020d53ff394,
|
||||||
|
}, .{
|
||||||
|
-0x7cab2a053dfbf944cd342460350c989fd1b4469a6c7b54ddcacd54e605d29c03651b5c463495610d82269c9ac5b51bfd07816a0f7b1ab50cb598989ed64607b3faff79a190702eb285b0fedc050ec1a71537abc47ec590eb671d4f76b19567049ba4789d1a4348385607a0320fbff9b78260536a9b6030bddb0b09da689d1687,
|
||||||
|
});
|
||||||
|
|
||||||
try testArgs(@Vector(1, u1024), .{
|
try testArgs(@Vector(1, u1024), .{
|
||||||
0x0ca1a0dfaf8bb1da714b457d23c71aef948e66c7cd45c0aa941498a796fb18502ec32f34e885d0a107d44ae81595f8b52c2f0fb38e584b7139903a0e8a823ae20d01ca0662722dd474e7efc40f32d74cc065d97d8a09d0447f1ab6107fa0a57f3f8c866ae872506627ce82f18add79cee8dc69837f4ead3ca770c4d622d7e544,
|
0x0ca1a0dfaf8bb1da714b457d23c71aef948e66c7cd45c0aa941498a796fb18502ec32f34e885d0a107d44ae81595f8b52c2f0fb38e584b7139903a0e8a823ae20d01ca0662722dd474e7efc40f32d74cc065d97d8a09d0447f1ab6107fa0a57f3f8c866ae872506627ce82f18add79cee8dc69837f4ead3ca770c4d622d7e544,
|
||||||
}, .{
|
}, .{
|
||||||
|
|
@ -1558,6 +2080,7 @@ test abs {
|
||||||
try Unary(abs).testIntTypes();
|
try Unary(abs).testIntTypes();
|
||||||
try Unary(abs).testIntVectorTypes();
|
try Unary(abs).testIntVectorTypes();
|
||||||
try Unary(abs).testFloatTypes();
|
try Unary(abs).testFloatTypes();
|
||||||
|
try Unary(abs).testFloatVectorTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fn clz(comptime Type: type, rhs: Type) @TypeOf(@clz(rhs)) {
|
inline fn clz(comptime Type: type, rhs: Type) @TypeOf(@clz(rhs)) {
|
||||||
|
|
@ -1591,3 +2114,19 @@ test bitXor {
|
||||||
try Binary(bitXor).testIntTypes();
|
try Binary(bitXor).testIntTypes();
|
||||||
try Binary(bitXor).testIntVectorTypes();
|
try Binary(bitXor).testIntVectorTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fn min(comptime Type: type, lhs: Type, rhs: Type) Type {
|
||||||
|
return @min(lhs, rhs);
|
||||||
|
}
|
||||||
|
test min {
|
||||||
|
try Binary(min).testIntTypes();
|
||||||
|
try Binary(min).testIntVectorTypes();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fn max(comptime Type: type, lhs: Type, rhs: Type) Type {
|
||||||
|
return @max(lhs, rhs);
|
||||||
|
}
|
||||||
|
test max {
|
||||||
|
try Binary(max).testIntTypes();
|
||||||
|
try Binary(max).testIntVectorTypes();
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,6 @@ pub export fn entry() void {
|
||||||
// error
|
// error
|
||||||
//
|
//
|
||||||
// :7:25: error: unable to resolve comptime value
|
// :7:25: error: unable to resolve comptime value
|
||||||
// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_441.C' must be comptime-known
|
// :7:25: note: initializer of comptime-only struct 'tmp.S.foo__anon_463.C' must be comptime-known
|
||||||
// :4:16: note: struct requires comptime because of this field
|
// :4:16: note: struct requires comptime because of this field
|
||||||
// :4:16: note: types are not available at runtime
|
// :4:16: note: types are not available at runtime
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@ pub export fn entry2() void {
|
||||||
//
|
//
|
||||||
// :3:6: error: no field or member function named 'copy' in '[]const u8'
|
// :3:6: error: no field or member function named 'copy' in '[]const u8'
|
||||||
// :9:8: error: no field or member function named 'bar' in '@TypeOf(.{})'
|
// :9:8: error: no field or member function named 'bar' in '@TypeOf(.{})'
|
||||||
// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_445'
|
// :12:18: error: no field or member function named 'bar' in 'tmp.entry2__struct_467'
|
||||||
// :12:6: note: struct declared here
|
// :12:6: note: struct declared here
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,6 @@ export fn foo() void {
|
||||||
|
|
||||||
// error
|
// error
|
||||||
//
|
//
|
||||||
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_434'
|
// :4:16: error: expected type 'tmp.T', found 'tmp.foo__struct_456'
|
||||||
// :3:16: note: struct declared here
|
// :3:16: note: struct declared here
|
||||||
// :1:11: note: struct declared here
|
// :1:11: note: struct declared here
|
||||||
|
|
|
||||||
|
|
@ -526,8 +526,9 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\ var null_u32: ?u32 = null;
|
\\ var null_u32: ?u32 = null;
|
||||||
\\ var maybe_u32: ?u32 = null;
|
\\ var maybe_u32: ?u32 = null;
|
||||||
\\ var nonnull_u32: ?u32 = 456;
|
\\ var nonnull_u32: ?u32 = 456;
|
||||||
|
\\ null_u32 = null_u32;
|
||||||
\\ maybe_u32 = 123;
|
\\ maybe_u32 = 123;
|
||||||
\\ _ = .{ &null_u32, &nonnull_u32 };
|
\\ nonnull_u32 = nonnull_u32;
|
||||||
\\ }
|
\\ }
|
||||||
\\}
|
\\}
|
||||||
\\
|
\\
|
||||||
|
|
@ -539,7 +540,7 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\frame variable -- null_u32 maybe_u32 nonnull_u32
|
\\frame variable -- null_u32 maybe_u32 nonnull_u32
|
||||||
\\breakpoint delete --force 1
|
\\breakpoint delete --force 1
|
||||||
\\
|
\\
|
||||||
\\breakpoint set --file optionals.zig --source-pattern-regexp '_ = \.{ &null_u32, &nonnull_u32 };'
|
\\breakpoint set --file optionals.zig --source-pattern-regexp 'nonnull_u32 = nonnull_u32;'
|
||||||
\\process continue
|
\\process continue
|
||||||
\\frame variable --show-types -- null_u32 maybe_u32 nonnull_u32
|
\\frame variable --show-types -- null_u32 maybe_u32 nonnull_u32
|
||||||
\\breakpoint delete --force 2
|
\\breakpoint delete --force 2
|
||||||
|
|
@ -1285,10 +1286,12 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\ mod1.m1cfi(r0pai ^ 8);
|
\\ mod1.m1cfi(r0pai ^ 8);
|
||||||
\\}
|
\\}
|
||||||
\\pub fn r0cf(r0ca: u32) void {
|
\\pub fn r0cf(r0ca: u32) void {
|
||||||
\\ _ = r0ca;
|
\\ var discard = r0ca;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\pub inline fn r0cfi(r0cai: u32) void {
|
\\pub inline fn r0cfi(r0cai: u32) void {
|
||||||
\\ _ = r0cai;
|
\\ var discard = r0cai;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\pub fn main() void {
|
\\pub fn main() void {
|
||||||
\\ root0.r0pf(12);
|
\\ root0.r0pf(12);
|
||||||
|
|
@ -1331,10 +1334,12 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\ mod1.m1cfi(r1pai ^ 8);
|
\\ mod1.m1cfi(r1pai ^ 8);
|
||||||
\\}
|
\\}
|
||||||
\\pub fn r1cf(r1ca: u32) void {
|
\\pub fn r1cf(r1ca: u32) void {
|
||||||
\\ _ = r1ca;
|
\\ var discard = r1ca;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\pub inline fn r1cfi(r1cai: u32) void {
|
\\pub inline fn r1cfi(r1cai: u32) void {
|
||||||
\\ _ = r1cai;
|
\\ var discard = r1cai;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\
|
\\
|
||||||
,
|
,
|
||||||
|
|
@ -1368,10 +1373,12 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\ mod1.m1cfi(m0pai ^ 8);
|
\\ mod1.m1cfi(m0pai ^ 8);
|
||||||
\\}
|
\\}
|
||||||
\\pub fn m0cf(m0ca: u32) void {
|
\\pub fn m0cf(m0ca: u32) void {
|
||||||
\\ _ = m0ca;
|
\\ var discard = m0ca;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\pub inline fn m0cfi(m0cai: u32) void {
|
\\pub inline fn m0cfi(m0cai: u32) void {
|
||||||
\\ _ = m0cai;
|
\\ var discard = m0cai;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\
|
\\
|
||||||
,
|
,
|
||||||
|
|
@ -1404,10 +1411,12 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\ mod1.m1cfi(m1pai ^ 8);
|
\\ mod1.m1cfi(m1pai ^ 8);
|
||||||
\\}
|
\\}
|
||||||
\\pub fn m1cf(m1ca: u32) void {
|
\\pub fn m1cf(m1ca: u32) void {
|
||||||
\\ _ = m1ca;
|
\\ var discard = m1ca;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\pub inline fn m1cfi(m1cai: u32) void {
|
\\pub inline fn m1cfi(m1cai: u32) void {
|
||||||
\\ _ = m1cai;
|
\\ var discard = m1cai;
|
||||||
|
\\ _ = &discard;
|
||||||
\\}
|
\\}
|
||||||
\\
|
\\
|
||||||
,
|
,
|
||||||
|
|
@ -1416,13 +1425,13 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
\\settings set frame-format 'frame #${frame.index}:{ ${module.file.basename}{\`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${line.file.basename}:${line.number}{:${line.column}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n'
|
\\settings set frame-format 'frame #${frame.index}:{ ${module.file.basename}{\`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${line.file.basename}:${line.number}{:${line.column}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\n'
|
||||||
\\
|
\\
|
||||||
\\breakpoint set --file root0.zig --line 26
|
\\breakpoint set --file root0.zig --line 26
|
||||||
\\breakpoint set --file root0.zig --line 29
|
\\breakpoint set --file root0.zig --line 30
|
||||||
\\breakpoint set --file root1.zig --line 26
|
\\breakpoint set --file root1.zig --line 26
|
||||||
\\breakpoint set --file root1.zig --line 29
|
\\breakpoint set --file root1.zig --line 30
|
||||||
\\breakpoint set --file mod0.zig --line 26
|
\\breakpoint set --file mod0.zig --line 26
|
||||||
\\breakpoint set --file mod0.zig --line 29
|
\\breakpoint set --file mod0.zig --line 30
|
||||||
\\breakpoint set --file mod1.zig --line 26
|
\\breakpoint set --file mod1.zig --line 26
|
||||||
\\breakpoint set --file mod1.zig --line 29
|
\\breakpoint set --file mod1.zig --line 30
|
||||||
\\
|
\\
|
||||||
\\process launch
|
\\process launch
|
||||||
\\thread backtrace --count 3
|
\\thread backtrace --count 3
|
||||||
|
|
@ -1563,259 +1572,259 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
|
||||||
&.{
|
&.{
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=13) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=13) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:6:15
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:6:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0pf [inlined] r0cfi(r0cai=14) at root0.zig:29:5
|
\\ * frame #0: inline_call`root0.r0pf [inlined] r0cfi(r0cai=14) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:7:16
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:7:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=15) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=15) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:8:15
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:8:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0pf [inlined] r1cfi(r1cai=8) at root1.zig:29:5
|
\\ * frame #0: inline_call`root0.r0pf [inlined] r1cfi(r1cai=8) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:9:16
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:9:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=9) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=9) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:10:14
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:10:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0pf [inlined] m0cfi(m0cai=10) at mod0.zig:29:5
|
\\ * frame #0: inline_call`root0.r0pf [inlined] m0cfi(m0cai=10) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:11:15
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:11:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=11) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=11) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:12:14
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:12:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0pf [inlined] m1cfi(m1cai=4) at mod1.zig:29:5
|
\\ * frame #0: inline_call`root0.r0pf [inlined] m1cfi(m1cai=4) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:13:15
|
\\ frame #1: inline_call`root0.r0pf(r0pa=12) at root0.zig:13:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:32:15
|
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=22) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=22) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:16:15
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:16:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=21) at root0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=21) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:17:16
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:17:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=20) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=20) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:18:15
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:18:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=19) at root1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=19) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:19:16
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:19:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=18) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=18) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:20:14
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:20:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=17) at mod0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=17) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:21:15
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:21:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=16) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=16) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:22:14
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:22:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=31) at mod1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=31) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:23:15
|
\\ frame #1: inline_call`root0.main [inlined] r0pfi(r0pai=23) at root0.zig:23:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:33:16
|
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=35) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=35) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:6:15
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:6:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1pf [inlined] r0cfi(r0cai=32) at root0.zig:29:5
|
\\ * frame #0: inline_call`root1.r1pf [inlined] r0cfi(r0cai=32) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:7:16
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:7:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=33) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=33) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:8:15
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:8:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1pf [inlined] r1cfi(r1cai=38) at root1.zig:29:5
|
\\ * frame #0: inline_call`root1.r1pf [inlined] r1cfi(r1cai=38) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:9:16
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:9:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=39) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=39) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:10:14
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:10:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1pf [inlined] m0cfi(m0cai=36) at mod0.zig:29:5
|
\\ * frame #0: inline_call`root1.r1pf [inlined] m0cfi(m0cai=36) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:11:15
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:11:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=37) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=37) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:12:14
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:12:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1pf [inlined] m1cfi(m1cai=42) at mod1.zig:29:5
|
\\ * frame #0: inline_call`root1.r1pf [inlined] m1cfi(m1cai=42) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:13:15
|
\\ frame #1: inline_call`root1.r1pf(r1pa=34) at root1.zig:13:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:34:15
|
\\ frame #2: inline_call`root0.main at root0.zig:36:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=44) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=44) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:16:15
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:16:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=47) at root0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=47) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:17:16
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:17:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=46) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=46) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:18:15
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:18:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=41) at root1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=41) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:19:16
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:19:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=40) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=40) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:20:14
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:20:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=43) at mod0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=43) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:21:15
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:21:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=42) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=42) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:22:14
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:22:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=37) at mod1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=37) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:23:15
|
\\ frame #1: inline_call`root0.main [inlined] r1pfi(r1pai=45) at root1.zig:23:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:35:16
|
\\ frame #2: inline_call`root0.main at root0.zig:37:16
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=57) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=57) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:6:15
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:6:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0pf [inlined] r0cfi(r0cai=58) at root0.zig:29:5
|
\\ * frame #0: inline_call`mod0.m0pf [inlined] r0cfi(r0cai=58) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:7:16
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:7:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=59) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=59) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:8:15
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:8:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0pf [inlined] r1cfi(r1cai=60) at root1.zig:29:5
|
\\ * frame #0: inline_call`mod0.m0pf [inlined] r1cfi(r1cai=60) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:9:16
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:9:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=61) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=61) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:10:14
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:10:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0pf [inlined] m0cfi(m0cai=62) at mod0.zig:29:5
|
\\ * frame #0: inline_call`mod0.m0pf [inlined] m0cfi(m0cai=62) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:11:15
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:11:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=63) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=63) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:12:14
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:12:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0pf [inlined] m1cfi(m1cai=48) at mod1.zig:29:5
|
\\ * frame #0: inline_call`mod0.m0pf [inlined] m1cfi(m1cai=48) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:13:15
|
\\ frame #1: inline_call`mod0.m0pf(m0pa=56) at mod0.zig:13:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:36:14
|
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=66) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=66) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:16:15
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:16:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=65) at root0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=65) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:17:16
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:17:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=64) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=64) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:18:15
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:18:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=71) at root1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=71) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:19:16
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:19:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=70) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=70) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:20:14
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:20:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=69) at mod0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=69) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:21:15
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:21:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=68) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=68) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:22:14
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:22:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=75) at mod1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=75) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:23:15
|
\\ frame #1: inline_call`root0.main [inlined] m0pfi(m0pai=67) at mod0.zig:23:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:37:15
|
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=79) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=79) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:6:15
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:6:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1pf [inlined] r0cfi(r0cai=76) at root0.zig:29:5
|
\\ * frame #0: inline_call`mod1.m1pf [inlined] r0cfi(r0cai=76) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:7:16
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:7:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=77) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=77) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:8:15
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:8:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1pf [inlined] r1cfi(r1cai=74) at root1.zig:29:5
|
\\ * frame #0: inline_call`mod1.m1pf [inlined] r1cfi(r1cai=74) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:9:16
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:9:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=75) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=75) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:10:14
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:10:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1pf [inlined] m0cfi(m0cai=72) at mod0.zig:29:5
|
\\ * frame #0: inline_call`mod1.m1pf [inlined] m0cfi(m0cai=72) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:11:15
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:11:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=73) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=73) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:12:14
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:12:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1pf [inlined] m1cfi(m1cai=70) at mod1.zig:29:5
|
\\ * frame #0: inline_call`mod1.m1pf [inlined] m1cfi(m1cai=70) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:13:15
|
\\ frame #1: inline_call`mod1.m1pf(m1pa=78) at mod1.zig:13:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:38:14
|
\\ frame #2: inline_call`root0.main at root0.zig:40:14
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.r0cf(r0ca=88) at root0.zig:26:5
|
\\ * frame #0: inline_call`root0.r0cf(r0ca=88) at root0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:16:15
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:16:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=91) at root0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r0cfi(r0cai=91) at root0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:17:16
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:17:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root1.r1cf(r1ca=90) at root1.zig:26:5
|
\\ * frame #0: inline_call`root1.r1cf(r1ca=90) at root1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:18:15
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:18:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=93) at root1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] r1cfi(r1cai=93) at root1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:19:16
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:19:16
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod0.m0cf(m0ca=92) at mod0.zig:26:5
|
\\ * frame #0: inline_call`mod0.m0cf(m0ca=92) at mod0.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:20:14
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:20:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=95) at mod0.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m0cfi(m0cai=95) at mod0.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:21:15
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:21:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`mod1.m1cf(m1ca=94) at mod1.zig:26:5
|
\\ * frame #0: inline_call`mod1.m1cf(m1ca=94) at mod1.zig:26:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:22:14
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:22:14
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
,
|
,
|
||||||
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=81) at mod1.zig:29:5
|
\\ * frame #0: inline_call`root0.main [inlined] m1cfi(m1cai=81) at mod1.zig:30:5
|
||||||
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:23:15
|
\\ frame #1: inline_call`root0.main [inlined] m1pfi(m1pai=89) at mod1.zig:23:15
|
||||||
\\ frame #2: inline_call`root0.main at root0.zig:39:15
|
\\ frame #2: inline_call`root0.main at root0.zig:41:15
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
db.addLldbTest(
|
db.addLldbTest(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue