authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2025-01-19 20:40:29-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-01-20 14:47:07-05:00
logb9198b708f8accb41fdb3f11bf635d63fbff461d
tree15a387dd0a1242423688cad861c7548367dd8730
parentd5db02728ce3ff3ba74a3e3f9050c3ea9ed34752

x86_64: rewrite `@abs`


5 files changed, 2479 insertions(+), 1189 deletions(-)

src/arch/x86_64/CodeGen.zig+1178-134
......@@ -2378,7 +2378,7 @@ fn genBodyBlock(self: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
23782378}
23792379
23802380fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
2381 @setEvalBranchQuota(1_700);
2381 @setEvalBranchQuota(1_800);
23822382 const pt = cg.pt;
23832383 const zcu = pt.zcu;
23842384 const ip = &zcu.intern_pool;
......@@ -2452,8 +2452,6 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
24522452 .sqrt => try cg.airSqrt(inst),
24532453 .neg => try cg.airFloatSign(inst),
24542454
2455 .abs => try cg.airAbs(inst),
2456
24572455 .add_with_overflow => try cg.airAddSubWithOverflow(inst),
24582456 .sub_with_overflow => try cg.airAddSubWithOverflow(inst),
24592457 .mul_with_overflow => try cg.airMulWithOverflow(inst),
......@@ -4159,11 +4157,11 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
41594157 },
41604158 .dst_temps = .{.mem},
41614159 .each = .{ .once = &.{
4162 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_src0_size), ._, ._ },
4160 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_src0_unaligned_size), ._, ._ },
41634161 .{ ._, ._, .lea, .tmp1p, .mem(.tmp3), ._, ._ },
4164 .{ .@"0:", ._, .mov, .tmp2q, .memia(.src0q, .tmp0, .add_src0_size), ._, ._ },
4165 .{ ._, ._, .xor, .tmp2q, .leaia(.qword, .tmp1, .tmp0, .add_src0_size), ._, ._ },
4166 .{ ._, ._, .mov, .memia(.dst0q, .tmp0, .add_src0_size), .tmp2q, ._, ._ },
4162 .{ .@"0:", ._, .mov, .tmp2q, .memia(.src0q, .tmp0, .add_src0_unaligned_size), ._, ._ },
4163 .{ ._, ._, .xor, .tmp2q, .leaia(.qword, .tmp1, .tmp0, .add_src0_unaligned_size), ._, ._ },
4164 .{ ._, ._, .mov, .memia(.dst0q, .tmp0, .add_src0_unaligned_size), .tmp2q, ._, ._ },
41674165 .{ ._, ._, .add, .tmp0p, .si(8), ._, ._ },
41684166 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
41694167 } },
......@@ -4181,11 +4179,11 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
41814179 },
41824180 .dst_temps = .{.mem},
41834181 .each = .{ .once = &.{
4184 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_src0_size), ._, ._ },
4182 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_src0_unaligned_size), ._, ._ },
41854183 .{ ._, ._, .lea, .tmp1p, .mem(.tmp3), ._, ._ },
4186 .{ .@"0:", ._, .mov, .tmp2d, .memia(.src0d, .tmp0, .add_src0_size), ._, ._ },
4187 .{ ._, ._, .xor, .tmp2d, .leaia(.dword, .tmp1, .tmp0, .add_src0_size), ._, ._ },
4188 .{ ._, ._, .mov, .memia(.dst0d, .tmp0, .add_src0_size), .tmp2d, ._, ._ },
4184 .{ .@"0:", ._, .mov, .tmp2d, .memia(.src0d, .tmp0, .add_src0_unaligned_size), ._, ._ },
4185 .{ ._, ._, .xor, .tmp2d, .leaia(.dword, .tmp1, .tmp0, .add_src0_unaligned_size), ._, ._ },
4186 .{ ._, ._, .mov, .memia(.dst0d, .tmp0, .add_src0_unaligned_size), .tmp2d, ._, ._ },
41894187 .{ ._, ._, .add, .tmp0p, .si(4), ._, ._ },
41904188 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
41914189 } },
......@@ -5641,7 +5639,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
56415639 } },
56425640 }, .{
56435641 .required_features = .{ .lzcnt, .slow_incdec, null, null },
5644 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5642 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
56455643 .patterns = &.{
56465644 .{ .src = .{ .to_mem, .none } },
56475645 },
......@@ -5667,7 +5665,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
56675665 } },
56685666 }, .{
56695667 .required_features = .{ .lzcnt, null, null, null },
5670 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5668 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
56715669 .patterns = &.{
56725670 .{ .src = .{ .to_mem, .none } },
56735671 },
......@@ -5693,7 +5691,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
56935691 } },
56945692 }, .{
56955693 .required_features = .{ .lzcnt, .slow_incdec, null, null },
5696 .src_constraints = .{ .{ .scalar_int = .word }, .any },
5694 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
56975695 .patterns = &.{
56985696 .{ .src = .{ .to_mem, .none } },
56995697 },
......@@ -5719,7 +5717,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
57195717 } },
57205718 }, .{
57215719 .required_features = .{ .lzcnt, null, null, null },
5722 .src_constraints = .{ .{ .scalar_int = .word }, .any },
5720 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
57235721 .patterns = &.{
57245722 .{ .src = .{ .to_mem, .none } },
57255723 },
......@@ -5745,7 +5743,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
57455743 } },
57465744 }, .{
57475745 .required_features = .{ .lzcnt, .slow_incdec, null, null },
5748 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
5746 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
57495747 .patterns = &.{
57505748 .{ .src = .{ .to_mem, .none } },
57515749 },
......@@ -5771,7 +5769,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
57715769 } },
57725770 }, .{
57735771 .required_features = .{ .lzcnt, null, null, null },
5774 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
5772 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
57755773 .patterns = &.{
57765774 .{ .src = .{ .to_mem, .none } },
57775775 },
......@@ -5797,7 +5795,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
57975795 } },
57985796 }, .{
57995797 .required_features = .{ .@"64bit", .lzcnt, .slow_incdec, null },
5800 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
5798 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
58015799 .patterns = &.{
58025800 .{ .src = .{ .to_mem, .none } },
58035801 },
......@@ -5823,7 +5821,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
58235821 } },
58245822 }, .{
58255823 .required_features = .{ .@"64bit", .lzcnt, null, null },
5826 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
5824 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
58275825 .patterns = &.{
58285826 .{ .src = .{ .to_mem, .none } },
58295827 },
......@@ -5849,7 +5847,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
58495847 } },
58505848 }, .{
58515849 .required_features = .{ .cmov, .bsf_bsr_0_clobbers_result, .slow_incdec, null },
5852 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5850 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
58535851 .patterns = &.{
58545852 .{ .src = .{ .to_mem, .none } },
58555853 },
......@@ -5878,7 +5876,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
58785876 } },
58795877 }, .{
58805878 .required_features = .{ .cmov, .bsf_bsr_0_clobbers_result, null, null },
5881 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5879 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
58825880 .patterns = &.{
58835881 .{ .src = .{ .to_mem, .none } },
58845882 },
......@@ -5907,7 +5905,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
59075905 } },
59085906 }, .{
59095907 .required_features = .{ .bsf_bsr_0_clobbers_result, .slow_incdec, null, null },
5910 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5908 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
59115909 .patterns = &.{
59125910 .{ .src = .{ .to_mem, .none } },
59135911 },
......@@ -5936,7 +5934,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
59365934 } },
59375935 }, .{
59385936 .required_features = .{ .bsf_bsr_0_clobbers_result, null, null, null },
5939 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5937 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
59405938 .patterns = &.{
59415939 .{ .src = .{ .to_mem, .none } },
59425940 },
......@@ -5965,7 +5963,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
59655963 } },
59665964 }, .{
59675965 .required_features = .{ .slow_incdec, null, null, null },
5968 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5966 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
59695967 .patterns = &.{
59705968 .{ .src = .{ .to_mem, .none } },
59715969 },
......@@ -5992,7 +5990,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
59925990 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
59935991 } },
59945992 }, .{
5995 .src_constraints = .{ .{ .scalar_int = .byte }, .any },
5993 .src_constraints = .{ .{ .scalar_int_is = .byte }, .any },
59965994 .patterns = &.{
59975995 .{ .src = .{ .to_mem, .none } },
59985996 },
......@@ -6020,7 +6018,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
60206018 } },
60216019 }, .{
60226020 .required_features = .{ .cmov, .bsf_bsr_0_clobbers_result, .slow_incdec, null },
6023 .src_constraints = .{ .{ .scalar_int = .word }, .any },
6021 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
60246022 .patterns = &.{
60256023 .{ .src = .{ .to_mem, .none } },
60266024 },
......@@ -6049,7 +6047,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
60496047 } },
60506048 }, .{
60516049 .required_features = .{ .cmov, .bsf_bsr_0_clobbers_result, null, null },
6052 .src_constraints = .{ .{ .scalar_int = .word }, .any },
6050 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
60536051 .patterns = &.{
60546052 .{ .src = .{ .to_mem, .none } },
60556053 },
......@@ -6078,7 +6076,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
60786076 } },
60796077 }, .{
60806078 .required_features = .{ .bsf_bsr_0_clobbers_result, .slow_incdec, null, null },
6081 .src_constraints = .{ .{ .scalar_int = .word }, .any },
6079 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
60826080 .patterns = &.{
60836081 .{ .src = .{ .to_mem, .none } },
60846082 },
......@@ -6107,7 +6105,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
61076105 } },
61086106 }, .{
61096107 .required_features = .{ .bsf_bsr_0_clobbers_result, null, null, null },
6110 .src_constraints = .{ .{ .scalar_int = .word }, .any },
6108 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
61116109 .patterns = &.{
61126110 .{ .src = .{ .to_mem, .none } },
61136111 },
......@@ -6136,7 +6134,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
61366134 } },
61376135 }, .{
61386136 .required_features = .{ .slow_incdec, null, null, null },
6139 .src_constraints = .{ .{ .scalar_int = .word }, .any },
6137 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
61406138 .patterns = &.{
61416139 .{ .src = .{ .to_mem, .none } },
61426140 },
......@@ -6163,7 +6161,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
61636161 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
61646162 } },
61656163 }, .{
6166 .src_constraints = .{ .{ .scalar_int = .word }, .any },
6164 .src_constraints = .{ .{ .scalar_int_is = .word }, .any },
61676165 .patterns = &.{
61686166 .{ .src = .{ .to_mem, .none } },
61696167 },
......@@ -6191,7 +6189,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
61916189 } },
61926190 }, .{
61936191 .required_features = .{ .cmov, .bsf_bsr_0_clobbers_result, .slow_incdec, null },
6194 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
6192 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
61956193 .patterns = &.{
61966194 .{ .src = .{ .to_mem, .none } },
61976195 },
......@@ -6220,7 +6218,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
62206218 } },
62216219 }, .{
62226220 .required_features = .{ .cmov, .bsf_bsr_0_clobbers_result, null, null },
6223 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
6221 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
62246222 .patterns = &.{
62256223 .{ .src = .{ .to_mem, .none } },
62266224 },
......@@ -6249,7 +6247,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
62496247 } },
62506248 }, .{
62516249 .required_features = .{ .bsf_bsr_0_clobbers_result, .slow_incdec, null, null },
6252 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
6250 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
62536251 .patterns = &.{
62546252 .{ .src = .{ .to_mem, .none } },
62556253 },
......@@ -6278,7 +6276,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
62786276 } },
62796277 }, .{
62806278 .required_features = .{ .bsf_bsr_0_clobbers_result, null, null, null },
6281 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
6279 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
62826280 .patterns = &.{
62836281 .{ .src = .{ .to_mem, .none } },
62846282 },
......@@ -6307,7 +6305,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
63076305 } },
63086306 }, .{
63096307 .required_features = .{ .slow_incdec, null, null, null },
6310 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
6308 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
63116309 .patterns = &.{
63126310 .{ .src = .{ .to_mem, .none } },
63136311 },
......@@ -6334,7 +6332,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
63346332 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
63356333 } },
63366334 }, .{
6337 .src_constraints = .{ .{ .scalar_int = .dword }, .any },
6335 .src_constraints = .{ .{ .scalar_int_is = .dword }, .any },
63386336 .patterns = &.{
63396337 .{ .src = .{ .to_mem, .none } },
63406338 },
......@@ -6362,7 +6360,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
63626360 } },
63636361 }, .{
63646362 .required_features = .{ .@"64bit", .cmov, .bsf_bsr_0_clobbers_result, .slow_incdec },
6365 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
6363 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
63666364 .patterns = &.{
63676365 .{ .src = .{ .to_mem, .none } },
63686366 },
......@@ -6391,7 +6389,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
63916389 } },
63926390 }, .{
63936391 .required_features = .{ .@"64bit", .cmov, .bsf_bsr_0_clobbers_result, null },
6394 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
6392 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
63956393 .patterns = &.{
63966394 .{ .src = .{ .to_mem, .none } },
63976395 },
......@@ -6420,7 +6418,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
64206418 } },
64216419 }, .{
64226420 .required_features = .{ .@"64bit", .bsf_bsr_0_clobbers_result, .slow_incdec, null },
6423 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
6421 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
64246422 .patterns = &.{
64256423 .{ .src = .{ .to_mem, .none } },
64266424 },
......@@ -6449,7 +6447,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
64496447 } },
64506448 }, .{
64516449 .required_features = .{ .@"64bit", .bsf_bsr_0_clobbers_result, null, null },
6452 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
6450 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
64536451 .patterns = &.{
64546452 .{ .src = .{ .to_mem, .none } },
64556453 },
......@@ -6478,7 +6476,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
64786476 } },
64796477 }, .{
64806478 .required_features = .{ .@"64bit", .slow_incdec, null, null },
6481 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
6479 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
64826480 .patterns = &.{
64836481 .{ .src = .{ .to_mem, .none } },
64846482 },
......@@ -6506,7 +6504,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
65066504 } },
65076505 }, .{
65086506 .required_features = .{ .@"64bit", null, null, null },
6509 .src_constraints = .{ .{ .scalar_int = .qword }, .any },
6507 .src_constraints = .{ .{ .scalar_int_is = .qword }, .any },
65106508 .patterns = &.{
65116509 .{ .src = .{ .to_mem, .none } },
65126510 },
......@@ -6534,7 +6532,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
65346532 } },
65356533 }, .{
65366534 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
6537 .dst_constraints = .{.{ .scalar_int = .byte }},
6535 .dst_constraints = .{.{ .scalar_int_is = .byte }},
65386536 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any },
65396537 .patterns = &.{
65406538 .{ .src = .{ .to_mem, .none } },
......@@ -6571,7 +6569,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
65716569 } },
65726570 }, .{
65736571 .required_features = .{ .@"64bit", .lzcnt, null, null },
6574 .dst_constraints = .{.{ .scalar_int = .byte }},
6572 .dst_constraints = .{.{ .scalar_int_is = .byte }},
65756573 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any },
65766574 .patterns = &.{
65776575 .{ .src = .{ .to_mem, .none } },
......@@ -6607,7 +6605,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
66076605 } },
66086606 }, .{
66096607 .required_features = .{ .@"64bit", null, null, null },
6610 .dst_constraints = .{.{ .scalar_int = .byte }},
6608 .dst_constraints = .{.{ .scalar_int_is = .byte }},
66116609 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any },
66126610 .patterns = &.{
66136611 .{ .src = .{ .to_mem, .none } },
......@@ -6643,7 +6641,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
66436641 } },
66446642 }, .{
66456643 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
6646 .dst_constraints = .{.{ .scalar_int = .byte }},
6644 .dst_constraints = .{.{ .scalar_int_is = .byte }},
66476645 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any },
66486646 .patterns = &.{
66496647 .{ .src = .{ .to_mem, .none } },
......@@ -6680,7 +6678,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
66806678 } },
66816679 }, .{
66826680 .required_features = .{ .@"64bit", .lzcnt, null, null },
6683 .dst_constraints = .{.{ .scalar_int = .byte }},
6681 .dst_constraints = .{.{ .scalar_int_is = .byte }},
66846682 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any },
66856683 .patterns = &.{
66866684 .{ .src = .{ .to_mem, .none } },
......@@ -6716,7 +6714,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
67166714 } },
67176715 }, .{
67186716 .required_features = .{ .@"64bit", null, null, null },
6719 .dst_constraints = .{.{ .scalar_int = .byte }},
6717 .dst_constraints = .{.{ .scalar_int_is = .byte }},
67206718 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any },
67216719 .patterns = &.{
67226720 .{ .src = .{ .to_mem, .none } },
......@@ -6752,7 +6750,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
67526750 } },
67536751 }, .{
67546752 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
6755 .dst_constraints = .{.{ .scalar_int = .word }},
6753 .dst_constraints = .{.{ .scalar_int_is = .word }},
67566754 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any },
67576755 .patterns = &.{
67586756 .{ .src = .{ .to_mem, .none } },
......@@ -6789,7 +6787,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
67896787 } },
67906788 }, .{
67916789 .required_features = .{ .@"64bit", .lzcnt, null, null },
6792 .dst_constraints = .{.{ .scalar_int = .word }},
6790 .dst_constraints = .{.{ .scalar_int_is = .word }},
67936791 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any },
67946792 .patterns = &.{
67956793 .{ .src = .{ .to_mem, .none } },
......@@ -6825,7 +6823,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
68256823 } },
68266824 }, .{
68276825 .required_features = .{ .@"64bit", null, null, null },
6828 .dst_constraints = .{.{ .scalar_int = .word }},
6826 .dst_constraints = .{.{ .scalar_int_is = .word }},
68296827 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .qword } }, .any },
68306828 .patterns = &.{
68316829 .{ .src = .{ .to_mem, .none } },
......@@ -6861,7 +6859,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
68616859 } },
68626860 }, .{
68636861 .required_features = .{ .@"64bit", .false_deps_lzcnt_tzcnt, .lzcnt, null },
6864 .dst_constraints = .{.{ .scalar_int = .word }},
6862 .dst_constraints = .{.{ .scalar_int_is = .word }},
68656863 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any },
68666864 .patterns = &.{
68676865 .{ .src = .{ .to_mem, .none } },
......@@ -6898,7 +6896,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
68986896 } },
68996897 }, .{
69006898 .required_features = .{ .@"64bit", .lzcnt, null, null },
6901 .dst_constraints = .{.{ .scalar_int = .word }},
6899 .dst_constraints = .{.{ .scalar_int_is = .word }},
69026900 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any },
69036901 .patterns = &.{
69046902 .{ .src = .{ .to_mem, .none } },
......@@ -6934,7 +6932,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
69346932 } },
69356933 }, .{
69366934 .required_features = .{ .@"64bit", null, null, null },
6937 .dst_constraints = .{.{ .scalar_int = .word }},
6935 .dst_constraints = .{.{ .scalar_int_is = .word }},
69386936 .src_constraints = .{ .{ .scalar_remainder_int = .{ .of = .xword, .is = .xword } }, .any },
69396937 .patterns = &.{
69406938 .{ .src = .{ .to_mem, .none } },
......@@ -7003,7 +7001,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
70037001 else => unreachable,
70047002 inline .e, .ne => |cc| comptime &.{ .{
70057003 .required_features = .{ .avx2, null, null, null },
7006 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7004 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
70077005 .patterns = &.{
70087006 .{ .src = .{ .to_ymm, .mem } },
70097007 .{ .src = .{ .mem, .to_ymm }, .commute = .{ 0, 1 } },
......@@ -7023,7 +7021,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
70237021 } },
70247022 }, .{
70257023 .required_features = .{ .avx2, null, null, null },
7026 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7024 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
70277025 .patterns = &.{
70287026 .{ .src = .{ .to_ymm, .mem } },
70297027 .{ .src = .{ .mem, .to_ymm }, .commute = .{ 0, 1 } },
......@@ -7043,7 +7041,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
70437041 } },
70447042 }, .{
70457043 .required_features = .{ .avx2, null, null, null },
7046 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7044 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
70477045 .patterns = &.{
70487046 .{ .src = .{ .to_ymm, .mem } },
70497047 .{ .src = .{ .mem, .to_ymm }, .commute = .{ 0, 1 } },
......@@ -7063,7 +7061,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
70637061 } },
70647062 }, .{
70657063 .required_features = .{ .avx2, null, null, null },
7066 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
7064 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
70677065 .patterns = &.{
70687066 .{ .src = .{ .to_ymm, .mem } },
70697067 .{ .src = .{ .mem, .to_ymm }, .commute = .{ 0, 1 } },
......@@ -7083,7 +7081,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
70837081 } },
70847082 }, .{
70857083 .required_features = .{ .avx, null, null, null },
7086 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7084 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
70877085 .patterns = &.{
70887086 .{ .src = .{ .to_xmm, .mem } },
70897087 .{ .src = .{ .mem, .to_xmm }, .commute = .{ 0, 1 } },
......@@ -7103,7 +7101,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
71037101 } },
71047102 }, .{
71057103 .required_features = .{ .avx, null, null, null },
7106 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7104 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
71077105 .patterns = &.{
71087106 .{ .src = .{ .to_xmm, .mem } },
71097107 .{ .src = .{ .mem, .to_xmm }, .commute = .{ 0, 1 } },
......@@ -7123,7 +7121,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
71237121 } },
71247122 }, .{
71257123 .required_features = .{ .avx, null, null, null },
7126 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7124 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
71277125 .patterns = &.{
71287126 .{ .src = .{ .to_xmm, .mem } },
71297127 .{ .src = .{ .mem, .to_xmm }, .commute = .{ 0, 1 } },
......@@ -7143,7 +7141,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
71437141 } },
71447142 }, .{
71457143 .required_features = .{ .avx, null, null, null },
7146 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
7144 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
71477145 .patterns = &.{
71487146 .{ .src = .{ .to_xmm, .mem } },
71497147 .{ .src = .{ .mem, .to_xmm }, .commute = .{ 0, 1 } },
......@@ -7163,7 +7161,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
71637161 } },
71647162 }, .{
71657163 .required_features = .{ .sse2, null, null, null },
7166 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7164 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
71677165 .patterns = &.{
71687166 .{ .src = .{ .to_mut_xmm, .mem } },
71697167 .{ .src = .{ .mem, .to_mut_xmm }, .commute = .{ 0, 1 } },
......@@ -7183,7 +7181,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
71837181 } },
71847182 }, .{
71857183 .required_features = .{ .sse2, null, null, null },
7186 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7184 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
71877185 .patterns = &.{
71887186 .{ .src = .{ .to_mut_xmm, .mem } },
71897187 .{ .src = .{ .mem, .to_mut_xmm }, .commute = .{ 0, 1 } },
......@@ -7203,7 +7201,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
72037201 } },
72047202 }, .{
72057203 .required_features = .{ .sse2, null, null, null },
7206 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7204 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
72077205 .patterns = &.{
72087206 .{ .src = .{ .to_mut_xmm, .mem } },
72097207 .{ .src = .{ .mem, .to_mut_xmm }, .commute = .{ 0, 1 } },
......@@ -7223,7 +7221,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
72237221 } },
72247222 }, .{
72257223 .required_features = .{ .sse4_1, null, null, null },
7226 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
7224 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
72277225 .patterns = &.{
72287226 .{ .src = .{ .to_mut_xmm, .mem } },
72297227 .{ .src = .{ .mem, .to_mut_xmm }, .commute = .{ 0, 1 } },
......@@ -7243,7 +7241,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
72437241 } },
72447242 }, .{
72457243 .required_features = .{ .mmx, null, null, null },
7246 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7244 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
72477245 .patterns = &.{
72487246 .{ .src = .{ .to_mut_mm, .mem } },
72497247 .{ .src = .{ .mem, .to_mut_mm }, .commute = .{ 0, 1 } },
......@@ -7263,7 +7261,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
72637261 } },
72647262 }, .{
72657263 .required_features = .{ .mmx, null, null, null },
7266 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7264 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
72677265 .patterns = &.{
72687266 .{ .src = .{ .to_mut_mm, .mem } },
72697267 .{ .src = .{ .mem, .to_mut_mm }, .commute = .{ 0, 1 } },
......@@ -7283,7 +7281,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
72837281 } },
72847282 }, .{
72857283 .required_features = .{ .mmx, null, null, null },
7286 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7284 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
72877285 .patterns = &.{
72887286 .{ .src = .{ .to_mut_mm, .mem } },
72897287 .{ .src = .{ .mem, .to_mut_mm }, .commute = .{ 0, 1 } },
......@@ -7439,7 +7437,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
74397437 } },
74407438 }, .{
74417439 .required_features = .{ .avx2, null, null, null },
7442 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7440 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
74437441 .patterns = &.{
74447442 .{ .src = .{ .to_mem, .to_mem } },
74457443 },
......@@ -7481,7 +7479,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
74817479 } },
74827480 }, .{
74837481 .required_features = .{ .avx2, null, null, null },
7484 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7482 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
74857483 .patterns = &.{
74867484 .{ .src = .{ .to_mem, .to_mem } },
74877485 },
......@@ -7525,7 +7523,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
75257523 } },
75267524 }, .{
75277525 .required_features = .{ .avx2, null, null, null },
7528 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7526 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
75297527 .patterns = &.{
75307528 .{ .src = .{ .to_mem, .to_mem } },
75317529 },
......@@ -7567,7 +7565,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
75677565 } },
75687566 }, .{
75697567 .required_features = .{ .avx2, null, null, null },
7570 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
7568 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
75717569 .patterns = &.{
75727570 .{ .src = .{ .to_mem, .to_mem } },
75737571 },
......@@ -7635,7 +7633,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
76357633 } },
76367634 }, .{
76377635 .required_features = .{ .avx, null, null, null },
7638 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7636 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
76397637 .patterns = &.{
76407638 .{ .src = .{ .to_mem, .to_mem } },
76417639 },
......@@ -7677,7 +7675,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
76777675 } },
76787676 }, .{
76797677 .required_features = .{ .avx, null, null, null },
7680 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7678 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
76817679 .patterns = &.{
76827680 .{ .src = .{ .to_mem, .to_mem } },
76837681 },
......@@ -7721,7 +7719,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
77217719 } },
77227720 }, .{
77237721 .required_features = .{ .avx, null, null, null },
7724 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7722 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
77257723 .patterns = &.{
77267724 .{ .src = .{ .to_mem, .to_mem } },
77277725 },
......@@ -7789,7 +7787,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
77897787 } },
77907788 }, .{
77917789 .required_features = .{ .avx, null, null, null },
7792 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
7790 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
77937791 .patterns = &.{
77947792 .{ .src = .{ .to_mem, .to_mem } },
77957793 },
......@@ -7857,7 +7855,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
78577855 } },
78587856 }, .{
78597857 .required_features = .{ .sse2, null, null, null },
7860 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
7858 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
78617859 .patterns = &.{
78627860 .{ .src = .{ .to_mem, .to_mem } },
78637861 },
......@@ -7899,7 +7897,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
78997897 } },
79007898 }, .{
79017899 .required_features = .{ .sse2, null, null, null },
7902 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
7900 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
79037901 .patterns = &.{
79047902 .{ .src = .{ .to_mem, .to_mem } },
79057903 },
......@@ -7943,7 +7941,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
79437941 } },
79447942 }, .{
79457943 .required_features = .{ .sse2, null, null, null },
7946 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
7944 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
79477945 .patterns = &.{
79487946 .{ .src = .{ .to_mem, .to_mem } },
79497947 },
......@@ -8011,7 +8009,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
80118009 } },
80128010 }, .{
80138011 .required_features = .{ .sse4_1, null, null, null },
8014 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
8012 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
80158013 .patterns = &.{
80168014 .{ .src = .{ .to_mem, .to_mem } },
80178015 },
......@@ -8079,7 +8077,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
80798077 } },
80808078 }, .{
80818079 .required_features = .{ .sse, .mmx, null, null },
8082 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
8080 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
80838081 .patterns = &.{
80848082 .{ .src = .{ .to_mem, .to_mem } },
80858083 },
......@@ -8121,7 +8119,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
81218119 } },
81228120 }, .{
81238121 .required_features = .{ .sse, .mmx, null, null },
8124 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
8122 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
81258123 .patterns = &.{
81268124 .{ .src = .{ .to_mem, .to_mem } },
81278125 },
......@@ -8193,7 +8191,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
81938191 } },
81948192 }, .{
81958193 .required_features = .{ .sse, .mmx, null, null },
8196 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
8194 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
81978195 .patterns = &.{
81988196 .{ .src = .{ .to_mem, .to_mem } },
81998197 },
......@@ -8267,7 +8265,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
82678265 } },
82688266 }, .{
82698267 .dst_constraints = .{.{ .bool_vec = .byte }},
8270 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
8268 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
82718269 .patterns = &.{
82728270 .{ .src = .{ .to_mem, .to_mem } },
82738271 },
......@@ -8296,7 +8294,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
82968294 } },
82978295 }, .{
82988296 .dst_constraints = .{.{ .bool_vec = .byte }},
8299 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
8297 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
83008298 .patterns = &.{
83018299 .{ .src = .{ .to_mem, .to_mem } },
83028300 },
......@@ -8325,7 +8323,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
83258323 } },
83268324 }, .{
83278325 .dst_constraints = .{.{ .bool_vec = .byte }},
8328 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
8326 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
83298327 .patterns = &.{
83308328 .{ .src = .{ .to_mem, .to_mem } },
83318329 },
......@@ -8355,7 +8353,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
83558353 }, .{
83568354 .required_features = .{ .@"64bit", null, null, null },
83578355 .dst_constraints = .{.{ .bool_vec = .byte }},
8358 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
8356 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
83598357 .patterns = &.{
83608358 .{ .src = .{ .to_mem, .to_mem } },
83618359 },
......@@ -8419,7 +8417,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
84198417 } },
84208418 }, .{
84218419 .dst_constraints = .{.{ .bool_vec = .dword }},
8422 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
8420 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
84238421 .patterns = &.{
84248422 .{ .src = .{ .to_mem, .to_mem } },
84258423 },
......@@ -8449,7 +8447,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
84498447 } },
84508448 }, .{
84518449 .dst_constraints = .{.{ .bool_vec = .dword }},
8452 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
8450 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
84538451 .patterns = &.{
84548452 .{ .src = .{ .to_mem, .to_mem } },
84558453 },
......@@ -8479,7 +8477,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
84798477 } },
84808478 }, .{
84818479 .dst_constraints = .{.{ .bool_vec = .dword }},
8482 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
8480 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
84838481 .patterns = &.{
84848482 .{ .src = .{ .to_mem, .to_mem } },
84858483 },
......@@ -8510,7 +8508,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
85108508 }, .{
85118509 .required_features = .{ .@"64bit", null, null, null },
85128510 .dst_constraints = .{.{ .bool_vec = .dword }},
8513 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
8511 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
85148512 .patterns = &.{
85158513 .{ .src = .{ .to_mem, .to_mem } },
85168514 },
......@@ -8577,7 +8575,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
85778575 }, .{
85788576 .required_features = .{ .@"64bit", null, null, null },
85798577 .dst_constraints = .{.{ .bool_vec = .qword }},
8580 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
8578 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
85818579 .patterns = &.{
85828580 .{ .src = .{ .to_mem, .to_mem } },
85838581 },
......@@ -8608,7 +8606,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
86088606 }, .{
86098607 .required_features = .{ .@"64bit", null, null, null },
86108608 .dst_constraints = .{.{ .bool_vec = .qword }},
8611 .src_constraints = .{ .{ .scalar_int = .word }, .{ .scalar_int = .word } },
8609 .src_constraints = .{ .{ .scalar_int_is = .word }, .{ .scalar_int_is = .word } },
86128610 .patterns = &.{
86138611 .{ .src = .{ .to_mem, .to_mem } },
86148612 },
......@@ -8638,7 +8636,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
86388636 }, .{
86398637 .required_features = .{ .@"64bit", null, null, null },
86408638 .dst_constraints = .{.{ .bool_vec = .qword }},
8641 .src_constraints = .{ .{ .scalar_int = .dword }, .{ .scalar_int = .dword } },
8639 .src_constraints = .{ .{ .scalar_int_is = .dword }, .{ .scalar_int_is = .dword } },
86428640 .patterns = &.{
86438641 .{ .src = .{ .to_mem, .to_mem } },
86448642 },
......@@ -8669,7 +8667,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
86698667 }, .{
86708668 .required_features = .{ .@"64bit", null, null, null },
86718669 .dst_constraints = .{.{ .bool_vec = .qword }},
8672 .src_constraints = .{ .{ .scalar_int = .qword }, .{ .scalar_int = .qword } },
8670 .src_constraints = .{ .{ .scalar_int_is = .qword }, .{ .scalar_int_is = .qword } },
86738671 .patterns = &.{
86748672 .{ .src = .{ .to_mem, .to_mem } },
86758673 },
......@@ -8735,7 +8733,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
87358733 .{ ._, ._b, .j, .@"0b", ._, ._, ._ },
87368734 } },
87378735 }, .{
8738 .src_constraints = .{ .{ .scalar_int = .byte }, .{ .scalar_int = .byte } },
8736 .src_constraints = .{ .{ .scalar_int_is = .byte }, .{ .scalar_int_is = .byte } },
87398737 .patterns = &.{
87408738 .{ .src = .{ .to_mem, .to_mem } },
87418739 },
......@@ -8784,9 +8782,1039 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
87848782 }),
87858783 else => |e| return e,
87868784 },
8787 .gte => unreachable,
8788 .gt => unreachable,
8789 }
8785 .gte => unreachable,
8786 .gt => unreachable,
8787 }
8788 for (ops) |op| for (res) |r| {
8789 if (op.index == r.index) break;
8790 } else try op.die(cg);
8791 try res[0].moveTo(inst, cg);
8792 },
8793
8794 .abs => |air_tag| if (use_old) try cg.airAbs(inst) else fallback: {
8795 const ty_op = air_datas[@intFromEnum(inst)].ty_op;
8796 if (ty_op.ty.toType().scalarType(zcu).isRuntimeFloat()) break :fallback try cg.airAbs(inst);
8797 var ops = try cg.tempsFromOperands(inst, .{ty_op.operand});
8798 var res: [1]Temp = undefined;
8799 cg.select(&res, &.{ty_op.ty.toType()}, &ops, comptime &.{ .{
8800 .required_features = .{ .cmov, null, null, null },
8801 .src_constraints = .{ .{ .int = .byte }, .any },
8802 .patterns = &.{
8803 .{ .src = .{ .to_gpr, .none } },
8804 },
8805 .dst_temps = .{.{ .rc = .general_purpose }},
8806 .clobbers = .{ .eflags = true },
8807 .each = .{ .once = &.{
8808 .{ ._, ._, .xor, .dst0d, .dst0d, ._, ._ },
8809 .{ ._, ._, .sub, .dst0b, .src0b, ._, ._ },
8810 .{ ._, ._s, .cmov, .dst0d, .src0d, ._, ._ },
8811 } },
8812 }, .{
8813 .src_constraints = .{ .{ .int = .byte }, .any },
8814 .patterns = &.{
8815 .{ .src = .{ .mut_mem, .none } },
8816 },
8817 .dst_temps = .{.{ .ref = .src0 }},
8818 .clobbers = .{ .eflags = true },
8819 .each = .{ .once = &.{
8820 .{ ._, ._, .cmp, .src0b, .si(0), ._, ._ },
8821 .{ ._, ._ge, .j, .@"0f", ._, ._, ._ },
8822 .{ ._, ._, .neg, .dst0b, ._, ._, ._ },
8823 } },
8824 }, .{
8825 .src_constraints = .{ .{ .int = .byte }, .any },
8826 .patterns = &.{
8827 .{ .src = .{ .to_mut_gpr, .none } },
8828 },
8829 .dst_temps = .{.{ .ref = .src0 }},
8830 .clobbers = .{ .eflags = true },
8831 .each = .{ .once = &.{
8832 .{ ._, ._, .@"test", .src0b, .src0b, ._, ._ },
8833 .{ ._, ._ns, .j, .@"0f", ._, ._, ._ },
8834 .{ ._, ._, .neg, .dst0b, ._, ._, ._ },
8835 } },
8836 }, .{
8837 .required_features = .{ .cmov, null, null, null },
8838 .src_constraints = .{ .{ .int = .word }, .any },
8839 .patterns = &.{
8840 .{ .src = .{ .mem, .none } },
8841 },
8842 .dst_temps = .{.{ .rc = .general_purpose }},
8843 .clobbers = .{ .eflags = true },
8844 .each = .{ .once = &.{
8845 .{ ._, ._, .xor, .dst0d, .dst0d, ._, ._ },
8846 .{ ._, ._, .sub, .dst0w, .src0w, ._, ._ },
8847 .{ ._, ._s, .cmov, .dst0w, .src0w, ._, ._ },
8848 } },
8849 }, .{
8850 .required_features = .{ .cmov, null, null, null },
8851 .src_constraints = .{ .{ .int = .word }, .any },
8852 .patterns = &.{
8853 .{ .src = .{ .to_gpr, .none } },
8854 },
8855 .dst_temps = .{.{ .rc = .general_purpose }},
8856 .clobbers = .{ .eflags = true },
8857 .each = .{ .once = &.{
8858 .{ ._, ._, .xor, .dst0d, .dst0d, ._, ._ },
8859 .{ ._, ._, .sub, .dst0w, .src0w, ._, ._ },
8860 .{ ._, ._s, .cmov, .dst0d, .src0d, ._, ._ },
8861 } },
8862 }, .{
8863 .src_constraints = .{ .{ .int = .word }, .any },
8864 .patterns = &.{
8865 .{ .src = .{ .mut_mem, .none } },
8866 },
8867 .dst_temps = .{.{ .ref = .src0 }},
8868 .clobbers = .{ .eflags = true },
8869 .each = .{ .once = &.{
8870 .{ ._, ._, .cmp, .src0w, .si(0), ._, ._ },
8871 .{ ._, ._ge, .j, .@"0f", ._, ._, ._ },
8872 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
8873 } },
8874 }, .{
8875 .src_constraints = .{ .{ .int = .word }, .any },
8876 .patterns = &.{
8877 .{ .src = .{ .to_mut_gpr, .none } },
8878 },
8879 .dst_temps = .{.{ .ref = .src0 }},
8880 .clobbers = .{ .eflags = true },
8881 .each = .{ .once = &.{
8882 .{ ._, ._, .@"test", .src0w, .src0w, ._, ._ },
8883 .{ ._, ._ns, .j, .@"0f", ._, ._, ._ },
8884 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
8885 } },
8886 }, .{
8887 .required_features = .{ .cmov, null, null, null },
8888 .src_constraints = .{ .{ .int = .dword }, .any },
8889 .patterns = &.{
8890 .{ .src = .{ .mem, .none } },
8891 .{ .src = .{ .to_gpr, .none } },
8892 },
8893 .dst_temps = .{.{ .rc = .general_purpose }},
8894 .clobbers = .{ .eflags = true },
8895 .each = .{ .once = &.{
8896 .{ ._, ._, .xor, .dst0d, .dst0d, ._, ._ },
8897 .{ ._, ._, .sub, .dst0d, .src0d, ._, ._ },
8898 .{ ._, ._s, .cmov, .dst0d, .src0d, ._, ._ },
8899 } },
8900 }, .{
8901 .src_constraints = .{ .{ .int = .dword }, .any },
8902 .patterns = &.{
8903 .{ .src = .{ .mut_mem, .none } },
8904 },
8905 .dst_temps = .{.{ .ref = .src0 }},
8906 .clobbers = .{ .eflags = true },
8907 .each = .{ .once = &.{
8908 .{ ._, ._, .cmp, .src0d, .si(0), ._, ._ },
8909 .{ ._, ._ge, .j, .@"0f", ._, ._, ._ },
8910 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
8911 } },
8912 }, .{
8913 .src_constraints = .{ .{ .int = .dword }, .any },
8914 .patterns = &.{
8915 .{ .src = .{ .to_mut_gpr, .none } },
8916 },
8917 .dst_temps = .{.{ .ref = .src0 }},
8918 .clobbers = .{ .eflags = true },
8919 .each = .{ .once = &.{
8920 .{ ._, ._, .@"test", .src0d, .src0d, ._, ._ },
8921 .{ ._, ._ns, .j, .@"0f", ._, ._, ._ },
8922 .{ ._, ._, .neg, .dst0d, ._, ._, ._ },
8923 } },
8924 }, .{
8925 .required_features = .{ .@"64bit", .cmov, null, null },
8926 .src_constraints = .{ .{ .int = .qword }, .any },
8927 .patterns = &.{
8928 .{ .src = .{ .mem, .none } },
8929 .{ .src = .{ .to_gpr, .none } },
8930 },
8931 .dst_temps = .{.{ .rc = .general_purpose }},
8932 .clobbers = .{ .eflags = true },
8933 .each = .{ .once = &.{
8934 .{ ._, ._, .xor, .dst0d, .dst0d, ._, ._ },
8935 .{ ._, ._, .sub, .dst0q, .src0q, ._, ._ },
8936 .{ ._, ._s, .cmov, .dst0q, .src0q, ._, ._ },
8937 } },
8938 }, .{
8939 .required_features = .{ .@"64bit", null, null, null },
8940 .src_constraints = .{ .{ .int = .qword }, .any },
8941 .patterns = &.{
8942 .{ .src = .{ .mut_mem, .none } },
8943 },
8944 .dst_temps = .{.{ .ref = .src0 }},
8945 .clobbers = .{ .eflags = true },
8946 .each = .{ .once = &.{
8947 .{ ._, ._, .cmp, .src0q, .si(0), ._, ._ },
8948 .{ ._, ._ge, .j, .@"0f", ._, ._, ._ },
8949 .{ ._, ._, .neg, .dst0q, ._, ._, ._ },
8950 } },
8951 }, .{
8952 .required_features = .{ .@"64bit", null, null, null },
8953 .src_constraints = .{ .{ .int = .qword }, .any },
8954 .patterns = &.{
8955 .{ .src = .{ .to_mut_gpr, .none } },
8956 },
8957 .dst_temps = .{.{ .ref = .src0 }},
8958 .clobbers = .{ .eflags = true },
8959 .each = .{ .once = &.{
8960 .{ ._, ._, .@"test", .src0q, .src0q, ._, ._ },
8961 .{ ._, ._ns, .j, .@"0f", ._, ._, ._ },
8962 .{ ._, ._, .neg, .dst0q, ._, ._, ._ },
8963 } },
8964 }, .{
8965 .required_features = .{ .@"64bit", null, null, null },
8966 .src_constraints = .{ .any_int, .any },
8967 .patterns = &.{
8968 .{ .src = .{ .to_mem, .none } },
8969 },
8970 .extra_temps = .{
8971 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
8972 .{ .type = .i64, .kind = .{ .rc = .general_purpose } },
8973 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
8974 .{ .type = .i64, .kind = .{ .rc = .general_purpose } },
8975 .unused,
8976 .unused,
8977 },
8978 .dst_temps = .{.mem},
8979 .clobbers = .{ .eflags = true },
8980 .each = .{ .once = &.{
8981 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
8982 .{ ._, ._, .mov, .tmp1q, .memad(.src0q, .add_size, -8), ._, ._ },
8983 .{ ._, ._r, .sa, .tmp1q, .si(63), ._, ._ },
8984 .{ ._, ._, .xor, .tmp2d, .tmp2d, ._, ._ },
8985 .{ .@"0:", ._, .mov, .tmp3q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
8986 .{ ._, ._, .xor, .tmp3q, .tmp1q, ._, ._ },
8987 .{ ._, ._r, .sh, .tmp2b, .si(1), ._, ._ },
8988 .{ ._, ._, .sbb, .tmp3q, .tmp1q, ._, ._ },
8989 .{ ._, ._c, .set, .tmp2b, ._, ._, ._ },
8990 .{ ._, ._, .mov, .memia(.dst0q, .tmp0, .add_size), .tmp3q, ._, ._ },
8991 .{ ._, ._, .add, .tmp0p, .si(8), ._, ._ },
8992 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
8993 } },
8994 }, .{
8995 .required_features = .{ .mmx, .ssse3, null, null },
8996 .src_constraints = .{ .{ .scalar_int = .{ .of = .qword, .is = .byte } }, .any },
8997 .patterns = &.{
8998 .{ .src = .{ .mut_mm, .none } },
8999 },
9000 .dst_temps = .{.{ .ref = .src0 }},
9001 .each = .{ .once = &.{
9002 .{ ._, .p_b, .abs, .dst0q, .src0q, ._, ._ },
9003 } },
9004 }, .{
9005 .required_features = .{ .mmx, .ssse3, null, null },
9006 .src_constraints = .{ .{ .scalar_int = .{ .of = .qword, .is = .byte } }, .any },
9007 .patterns = &.{
9008 .{ .src = .{ .mem, .none } },
9009 .{ .src = .{ .to_mm, .none } },
9010 },
9011 .dst_temps = .{.{ .rc = .sse }},
9012 .each = .{ .once = &.{
9013 .{ ._, .p_b, .abs, .dst0q, .src0q, ._, ._ },
9014 } },
9015 }, .{
9016 .required_features = .{ .mmx, .ssse3, null, null },
9017 .src_constraints = .{ .{ .scalar_int = .{ .of = .qword, .is = .word } }, .any },
9018 .patterns = &.{
9019 .{ .src = .{ .mut_mm, .none } },
9020 },
9021 .dst_temps = .{.{ .ref = .src0 }},
9022 .each = .{ .once = &.{
9023 .{ ._, .p_w, .abs, .dst0q, .src0q, ._, ._ },
9024 } },
9025 }, .{
9026 .required_features = .{ .mmx, .ssse3, null, null },
9027 .src_constraints = .{ .{ .scalar_int = .{ .of = .qword, .is = .word } }, .any },
9028 .patterns = &.{
9029 .{ .src = .{ .mem, .none } },
9030 .{ .src = .{ .to_mm, .none } },
9031 },
9032 .dst_temps = .{.{ .rc = .sse }},
9033 .each = .{ .once = &.{
9034 .{ ._, .p_w, .abs, .dst0q, .src0q, ._, ._ },
9035 } },
9036 }, .{
9037 .required_features = .{ .mmx, .ssse3, null, null },
9038 .src_constraints = .{ .{ .scalar_int = .{ .of = .qword, .is = .dword } }, .any },
9039 .patterns = &.{
9040 .{ .src = .{ .mut_mm, .none } },
9041 },
9042 .dst_temps = .{.{ .ref = .src0 }},
9043 .each = .{ .once = &.{
9044 .{ ._, .p_d, .abs, .dst0q, .src0q, ._, ._ },
9045 } },
9046 }, .{
9047 .required_features = .{ .mmx, .ssse3, null, null },
9048 .src_constraints = .{ .{ .scalar_int = .{ .of = .qword, .is = .dword } }, .any },
9049 .patterns = &.{
9050 .{ .src = .{ .mem, .none } },
9051 .{ .src = .{ .to_mm, .none } },
9052 },
9053 .dst_temps = .{.{ .rc = .sse }},
9054 .each = .{ .once = &.{
9055 .{ ._, .p_d, .abs, .dst0q, .src0q, ._, ._ },
9056 } },
9057 }, .{
9058 .required_features = .{ .ssse3, null, null, null },
9059 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .byte } }, .any },
9060 .patterns = &.{
9061 .{ .src = .{ .mut_xmm, .none } },
9062 },
9063 .dst_temps = .{.{ .ref = .src0 }},
9064 .each = .{ .once = &.{
9065 .{ ._, .p_b, .abs, .dst0x, .src0x, ._, ._ },
9066 } },
9067 }, .{
9068 .required_features = .{ .ssse3, null, null, null },
9069 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .byte } }, .any },
9070 .patterns = &.{
9071 .{ .src = .{ .mem, .none } },
9072 .{ .src = .{ .to_xmm, .none } },
9073 },
9074 .dst_temps = .{.{ .rc = .sse }},
9075 .each = .{ .once = &.{
9076 .{ ._, .p_b, .abs, .dst0x, .src0x, ._, ._ },
9077 } },
9078 }, .{
9079 .required_features = .{ .ssse3, null, null, null },
9080 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .word } }, .any },
9081 .patterns = &.{
9082 .{ .src = .{ .mut_xmm, .none } },
9083 },
9084 .dst_temps = .{.{ .ref = .src0 }},
9085 .each = .{ .once = &.{
9086 .{ ._, .p_w, .abs, .dst0x, .src0x, ._, ._ },
9087 } },
9088 }, .{
9089 .required_features = .{ .ssse3, null, null, null },
9090 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .word } }, .any },
9091 .patterns = &.{
9092 .{ .src = .{ .mem, .none } },
9093 .{ .src = .{ .to_xmm, .none } },
9094 },
9095 .dst_temps = .{.{ .rc = .sse }},
9096 .each = .{ .once = &.{
9097 .{ ._, .p_w, .abs, .dst0x, .src0x, ._, ._ },
9098 } },
9099 }, .{
9100 .required_features = .{ .ssse3, null, null, null },
9101 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .dword } }, .any },
9102 .patterns = &.{
9103 .{ .src = .{ .mut_xmm, .none } },
9104 },
9105 .dst_temps = .{.{ .ref = .src0 }},
9106 .each = .{ .once = &.{
9107 .{ ._, .p_d, .abs, .dst0x, .src0x, ._, ._ },
9108 } },
9109 }, .{
9110 .required_features = .{ .ssse3, null, null, null },
9111 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .dword } }, .any },
9112 .patterns = &.{
9113 .{ .src = .{ .mem, .none } },
9114 .{ .src = .{ .to_xmm, .none } },
9115 },
9116 .dst_temps = .{.{ .rc = .sse }},
9117 .each = .{ .once = &.{
9118 .{ ._, .p_d, .abs, .dst0x, .src0x, ._, ._ },
9119 } },
9120 }, .{
9121 .required_features = .{ .avx, null, null, null },
9122 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .byte } }, .any },
9123 .patterns = &.{
9124 .{ .src = .{ .mut_xmm, .none } },
9125 },
9126 .dst_temps = .{.{ .ref = .src0 }},
9127 .each = .{ .once = &.{
9128 .{ ._, .vp_b, .abs, .dst0x, .src0x, ._, ._ },
9129 } },
9130 }, .{
9131 .required_features = .{ .avx, null, null, null },
9132 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .byte } }, .any },
9133 .patterns = &.{
9134 .{ .src = .{ .mem, .none } },
9135 .{ .src = .{ .to_xmm, .none } },
9136 },
9137 .dst_temps = .{.{ .rc = .sse }},
9138 .each = .{ .once = &.{
9139 .{ ._, .vp_b, .abs, .dst0x, .src0x, ._, ._ },
9140 } },
9141 }, .{
9142 .required_features = .{ .avx, null, null, null },
9143 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .word } }, .any },
9144 .patterns = &.{
9145 .{ .src = .{ .mut_xmm, .none } },
9146 },
9147 .dst_temps = .{.{ .ref = .src0 }},
9148 .each = .{ .once = &.{
9149 .{ ._, .vp_w, .abs, .dst0x, .src0x, ._, ._ },
9150 } },
9151 }, .{
9152 .required_features = .{ .avx, null, null, null },
9153 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .word } }, .any },
9154 .patterns = &.{
9155 .{ .src = .{ .mem, .none } },
9156 .{ .src = .{ .to_xmm, .none } },
9157 },
9158 .dst_temps = .{.{ .rc = .sse }},
9159 .each = .{ .once = &.{
9160 .{ ._, .vp_w, .abs, .dst0x, .src0x, ._, ._ },
9161 } },
9162 }, .{
9163 .required_features = .{ .avx, null, null, null },
9164 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .dword } }, .any },
9165 .patterns = &.{
9166 .{ .src = .{ .mut_xmm, .none } },
9167 },
9168 .dst_temps = .{.{ .ref = .src0 }},
9169 .each = .{ .once = &.{
9170 .{ ._, .vp_d, .abs, .dst0x, .src0x, ._, ._ },
9171 } },
9172 }, .{
9173 .required_features = .{ .avx, null, null, null },
9174 .src_constraints = .{ .{ .scalar_int = .{ .of = .xword, .is = .dword } }, .any },
9175 .patterns = &.{
9176 .{ .src = .{ .mem, .none } },
9177 .{ .src = .{ .to_xmm, .none } },
9178 },
9179 .dst_temps = .{.{ .rc = .sse }},
9180 .each = .{ .once = &.{
9181 .{ ._, .vp_d, .abs, .dst0x, .src0x, ._, ._ },
9182 } },
9183 }, .{
9184 .required_features = .{ .avx2, null, null, null },
9185 .src_constraints = .{ .{ .scalar_int = .{ .of = .yword, .is = .byte } }, .any },
9186 .patterns = &.{
9187 .{ .src = .{ .mut_ymm, .none } },
9188 },
9189 .dst_temps = .{.{ .ref = .src0 }},
9190 .each = .{ .once = &.{
9191 .{ ._, .vp_b, .abs, .dst0y, .src0y, ._, ._ },
9192 } },
9193 }, .{
9194 .required_features = .{ .avx2, null, null, null },
9195 .src_constraints = .{ .{ .scalar_int = .{ .of = .yword, .is = .byte } }, .any },
9196 .patterns = &.{
9197 .{ .src = .{ .mem, .none } },
9198 .{ .src = .{ .to_ymm, .none } },
9199 },
9200 .dst_temps = .{.{ .rc = .sse }},
9201 .each = .{ .once = &.{
9202 .{ ._, .vp_b, .abs, .dst0y, .src0y, ._, ._ },
9203 } },
9204 }, .{
9205 .required_features = .{ .avx2, null, null, null },
9206 .src_constraints = .{ .{ .scalar_int = .{ .of = .yword, .is = .word } }, .any },
9207 .patterns = &.{
9208 .{ .src = .{ .mut_ymm, .none } },
9209 },
9210 .dst_temps = .{.{ .ref = .src0 }},
9211 .each = .{ .once = &.{
9212 .{ ._, .vp_w, .abs, .dst0y, .src0y, ._, ._ },
9213 } },
9214 }, .{
9215 .required_features = .{ .avx2, null, null, null },
9216 .src_constraints = .{ .{ .scalar_int = .{ .of = .yword, .is = .word } }, .any },
9217 .patterns = &.{
9218 .{ .src = .{ .mem, .none } },
9219 .{ .src = .{ .to_ymm, .none } },
9220 },
9221 .dst_temps = .{.{ .rc = .sse }},
9222 .each = .{ .once = &.{
9223 .{ ._, .vp_w, .abs, .dst0y, .src0y, ._, ._ },
9224 } },
9225 }, .{
9226 .required_features = .{ .avx2, null, null, null },
9227 .src_constraints = .{ .{ .scalar_int = .{ .of = .yword, .is = .dword } }, .any },
9228 .patterns = &.{
9229 .{ .src = .{ .mut_ymm, .none } },
9230 },
9231 .dst_temps = .{.{ .ref = .src0 }},
9232 .each = .{ .once = &.{
9233 .{ ._, .vp_d, .abs, .dst0y, .src0y, ._, ._ },
9234 } },
9235 }, .{
9236 .required_features = .{ .avx2, null, null, null },
9237 .src_constraints = .{ .{ .scalar_int = .{ .of = .yword, .is = .dword } }, .any },
9238 .patterns = &.{
9239 .{ .src = .{ .mem, .none } },
9240 .{ .src = .{ .to_ymm, .none } },
9241 },
9242 .dst_temps = .{.{ .rc = .sse }},
9243 .each = .{ .once = &.{
9244 .{ ._, .vp_d, .abs, .dst0y, .src0y, ._, ._ },
9245 } },
9246 }, .{
9247 .required_features = .{ .avx2, null, null, null },
9248 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .yword, .is = .byte } }, .any },
9249 .patterns = &.{
9250 .{ .src = .{ .to_mem, .none } },
9251 },
9252 .extra_temps = .{
9253 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9254 .{ .kind = .{ .rc = .sse } },
9255 .unused,
9256 .unused,
9257 .unused,
9258 .unused,
9259 },
9260 .dst_temps = .{.mem},
9261 .clobbers = .{ .eflags = true },
9262 .each = .{ .once = &.{
9263 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9264 .{ .@"0:", .vp_b, .abs, .tmp1y, .memia(.src0y, .tmp0, .add_size), ._, ._ },
9265 .{ ._, .v_dqa, .mov, .memia(.dst0y, .tmp0, .add_size), .tmp1y, ._, ._ },
9266 .{ ._, ._, .add, .tmp0p, .si(32), ._, ._ },
9267 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9268 } },
9269 }, .{
9270 .required_features = .{ .avx2, null, null, null },
9271 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .yword, .is = .word } }, .any },
9272 .patterns = &.{
9273 .{ .src = .{ .to_mem, .none } },
9274 },
9275 .extra_temps = .{
9276 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9277 .{ .kind = .{ .rc = .sse } },
9278 .unused,
9279 .unused,
9280 .unused,
9281 .unused,
9282 },
9283 .dst_temps = .{.mem},
9284 .clobbers = .{ .eflags = true },
9285 .each = .{ .once = &.{
9286 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9287 .{ .@"0:", .vp_w, .abs, .tmp1y, .memia(.src0y, .tmp0, .add_size), ._, ._ },
9288 .{ ._, .v_dqa, .mov, .memia(.dst0y, .tmp0, .add_size), .tmp1y, ._, ._ },
9289 .{ ._, ._, .add, .tmp0p, .si(32), ._, ._ },
9290 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9291 } },
9292 }, .{
9293 .required_features = .{ .avx2, null, null, null },
9294 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .yword, .is = .dword } }, .any },
9295 .patterns = &.{
9296 .{ .src = .{ .to_mem, .none } },
9297 },
9298 .extra_temps = .{
9299 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9300 .{ .kind = .{ .rc = .sse } },
9301 .unused,
9302 .unused,
9303 .unused,
9304 .unused,
9305 },
9306 .dst_temps = .{.mem},
9307 .clobbers = .{ .eflags = true },
9308 .each = .{ .once = &.{
9309 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9310 .{ .@"0:", .vp_d, .abs, .tmp1y, .memia(.src0y, .tmp0, .add_size), ._, ._ },
9311 .{ ._, .v_dqa, .mov, .memia(.dst0y, .tmp0, .add_size), .tmp1y, ._, ._ },
9312 .{ ._, ._, .add, .tmp0p, .si(32), ._, ._ },
9313 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9314 } },
9315 }, .{
9316 .required_features = .{ .avx, null, null, null },
9317 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .xword, .is = .byte } }, .any },
9318 .patterns = &.{
9319 .{ .src = .{ .to_mem, .none } },
9320 },
9321 .extra_temps = .{
9322 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9323 .{ .kind = .{ .rc = .sse } },
9324 .unused,
9325 .unused,
9326 .unused,
9327 .unused,
9328 },
9329 .dst_temps = .{.mem},
9330 .clobbers = .{ .eflags = true },
9331 .each = .{ .once = &.{
9332 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9333 .{ .@"0:", .vp_b, .abs, .tmp1x, .memia(.src0x, .tmp0, .add_size), ._, ._ },
9334 .{ ._, .v_dqa, .mov, .memia(.dst0x, .tmp0, .add_size), .tmp1x, ._, ._ },
9335 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9336 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9337 } },
9338 }, .{
9339 .required_features = .{ .avx, null, null, null },
9340 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .xword, .is = .word } }, .any },
9341 .patterns = &.{
9342 .{ .src = .{ .to_mem, .none } },
9343 },
9344 .extra_temps = .{
9345 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9346 .{ .kind = .{ .rc = .sse } },
9347 .unused,
9348 .unused,
9349 .unused,
9350 .unused,
9351 },
9352 .dst_temps = .{.mem},
9353 .clobbers = .{ .eflags = true },
9354 .each = .{ .once = &.{
9355 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9356 .{ .@"0:", .vp_w, .abs, .tmp1x, .memia(.src0x, .tmp0, .add_size), ._, ._ },
9357 .{ ._, .v_dqa, .mov, .memia(.dst0x, .tmp0, .add_size), .tmp1x, ._, ._ },
9358 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9359 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9360 } },
9361 }, .{
9362 .required_features = .{ .avx, null, null, null },
9363 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .xword, .is = .dword } }, .any },
9364 .patterns = &.{
9365 .{ .src = .{ .to_mem, .none } },
9366 },
9367 .extra_temps = .{
9368 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9369 .{ .kind = .{ .rc = .sse } },
9370 .unused,
9371 .unused,
9372 .unused,
9373 .unused,
9374 },
9375 .dst_temps = .{.mem},
9376 .clobbers = .{ .eflags = true },
9377 .each = .{ .once = &.{
9378 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9379 .{ .@"0:", .vp_d, .abs, .tmp1x, .memia(.src0x, .tmp0, .add_size), ._, ._ },
9380 .{ ._, .v_dqa, .mov, .memia(.dst0x, .tmp0, .add_size), .tmp1x, ._, ._ },
9381 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9382 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9383 } },
9384 }, .{
9385 .required_features = .{ .ssse3, null, null, null },
9386 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .xword, .is = .byte } }, .any },
9387 .patterns = &.{
9388 .{ .src = .{ .to_mem, .none } },
9389 },
9390 .extra_temps = .{
9391 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9392 .{ .kind = .{ .rc = .sse } },
9393 .unused,
9394 .unused,
9395 .unused,
9396 .unused,
9397 },
9398 .dst_temps = .{.mem},
9399 .clobbers = .{ .eflags = true },
9400 .each = .{ .once = &.{
9401 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9402 .{ .@"0:", .p_b, .abs, .tmp1x, .memia(.src0x, .tmp0, .add_size), ._, ._ },
9403 .{ ._, ._dqa, .mov, .memia(.dst0x, .tmp0, .add_size), .tmp1x, ._, ._ },
9404 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9405 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9406 } },
9407 }, .{
9408 .required_features = .{ .ssse3, null, null, null },
9409 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .xword, .is = .word } }, .any },
9410 .patterns = &.{
9411 .{ .src = .{ .to_mem, .none } },
9412 },
9413 .extra_temps = .{
9414 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9415 .{ .kind = .{ .rc = .sse } },
9416 .unused,
9417 .unused,
9418 .unused,
9419 .unused,
9420 },
9421 .dst_temps = .{.mem},
9422 .clobbers = .{ .eflags = true },
9423 .each = .{ .once = &.{
9424 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9425 .{ .@"0:", .p_w, .abs, .tmp1x, .memia(.src0x, .tmp0, .add_size), ._, ._ },
9426 .{ ._, ._dqa, .mov, .memia(.dst0x, .tmp0, .add_size), .tmp1x, ._, ._ },
9427 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9428 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9429 } },
9430 }, .{
9431 .required_features = .{ .ssse3, null, null, null },
9432 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .xword, .is = .dword } }, .any },
9433 .patterns = &.{
9434 .{ .src = .{ .to_mem, .none } },
9435 },
9436 .extra_temps = .{
9437 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9438 .{ .kind = .{ .rc = .sse } },
9439 .unused,
9440 .unused,
9441 .unused,
9442 .unused,
9443 },
9444 .dst_temps = .{.mem},
9445 .clobbers = .{ .eflags = true },
9446 .each = .{ .once = &.{
9447 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9448 .{ .@"0:", .p_d, .abs, .tmp1x, .memia(.src0x, .tmp0, .add_size), ._, ._ },
9449 .{ ._, ._dqa, .mov, .memia(.dst0x, .tmp0, .add_size), .tmp1x, ._, ._ },
9450 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9451 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9452 } },
9453 }, .{
9454 .required_features = .{ .mmx, .ssse3, null, null },
9455 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .qword, .is = .byte } }, .any },
9456 .patterns = &.{
9457 .{ .src = .{ .to_mem, .none } },
9458 },
9459 .extra_temps = .{
9460 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9461 .{ .kind = .{ .rc = .sse } },
9462 .unused,
9463 .unused,
9464 .unused,
9465 .unused,
9466 },
9467 .dst_temps = .{.mem},
9468 .clobbers = .{ .eflags = true },
9469 .each = .{ .once = &.{
9470 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9471 .{ .@"0:", .p_b, .abs, .tmp1q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
9472 .{ ._, ._q, .mov, .memia(.dst0q, .tmp0, .add_size), .tmp1q, ._, ._ },
9473 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9474 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9475 } },
9476 }, .{
9477 .required_features = .{ .mmx, .ssse3, null, null },
9478 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .qword, .is = .word } }, .any },
9479 .patterns = &.{
9480 .{ .src = .{ .to_mem, .none } },
9481 },
9482 .extra_temps = .{
9483 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9484 .{ .kind = .{ .rc = .sse } },
9485 .unused,
9486 .unused,
9487 .unused,
9488 .unused,
9489 },
9490 .dst_temps = .{.mem},
9491 .clobbers = .{ .eflags = true },
9492 .each = .{ .once = &.{
9493 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9494 .{ .@"0:", .p_w, .abs, .tmp1q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
9495 .{ ._, ._q, .mov, .memia(.dst0q, .tmp0, .add_size), .tmp1q, ._, ._ },
9496 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9497 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9498 } },
9499 }, .{
9500 .required_features = .{ .mmx, .ssse3, null, null },
9501 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .qword, .is = .dword } }, .any },
9502 .patterns = &.{
9503 .{ .src = .{ .to_mem, .none } },
9504 },
9505 .extra_temps = .{
9506 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9507 .{ .kind = .{ .rc = .sse } },
9508 .unused,
9509 .unused,
9510 .unused,
9511 .unused,
9512 },
9513 .dst_temps = .{.mem},
9514 .clobbers = .{ .eflags = true },
9515 .each = .{ .once = &.{
9516 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9517 .{ .@"0:", .p_d, .abs, .tmp1q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
9518 .{ ._, ._q, .mov, .memia(.dst0q, .tmp0, .add_size), .tmp1q, ._, ._ },
9519 .{ ._, ._, .add, .tmp0p, .si(16), ._, ._ },
9520 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9521 } },
9522 }, .{
9523 .required_features = .{ .cmov, .slow_incdec, null, null },
9524 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .byte, .is = .byte } }, .any },
9525 .patterns = &.{
9526 .{ .src = .{ .to_mem, .none } },
9527 },
9528 .extra_temps = .{
9529 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9530 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9531 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9532 .unused,
9533 .unused,
9534 .unused,
9535 },
9536 .dst_temps = .{.mem},
9537 .clobbers = .{ .eflags = true },
9538 .each = .{ .once = &.{
9539 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9540 .{ .@"0:", ._, .xor, .tmp1d, .tmp1d, ._, ._ },
9541 .{ ._, ._, .movsx, .tmp2d, .memia(.src0b, .tmp0, .add_size), ._, ._ },
9542 .{ ._, ._, .sub, .tmp1b, .tmp2b, ._, ._ },
9543 .{ ._, ._s, .cmov, .tmp1d, .tmp2d, ._, ._ },
9544 .{ ._, ._, .mov, .memia(.dst0b, .tmp0, .add_size), .tmp1b, ._, ._ },
9545 .{ ._, ._, .add, .tmp0p, .si(1), ._, ._ },
9546 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9547 } },
9548 }, .{
9549 .required_features = .{ .cmov, null, null, null },
9550 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .byte, .is = .byte } }, .any },
9551 .patterns = &.{
9552 .{ .src = .{ .to_mem, .none } },
9553 },
9554 .extra_temps = .{
9555 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9556 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9557 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9558 .unused,
9559 .unused,
9560 .unused,
9561 },
9562 .dst_temps = .{.mem},
9563 .clobbers = .{ .eflags = true },
9564 .each = .{ .once = &.{
9565 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9566 .{ .@"0:", ._, .xor, .tmp1d, .tmp1d, ._, ._ },
9567 .{ ._, ._, .movsx, .tmp2d, .memia(.src0b, .tmp0, .add_size), ._, ._ },
9568 .{ ._, ._, .sub, .tmp1b, .tmp2b, ._, ._ },
9569 .{ ._, ._s, .cmov, .tmp1d, .tmp2d, ._, ._ },
9570 .{ ._, ._, .mov, .memia(.dst0b, .tmp0, .add_size), .tmp1b, ._, ._ },
9571 .{ ._, ._c, .in, .tmp0p, ._, ._, ._ },
9572 .{ ._, ._nz, .j, .@"0b", ._, ._, ._ },
9573 } },
9574 }, .{
9575 .required_features = .{ .slow_incdec, null, null, null },
9576 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .byte, .is = .byte } }, .any },
9577 .patterns = &.{
9578 .{ .src = .{ .to_mem, .none } },
9579 },
9580 .extra_temps = .{
9581 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9582 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9583 .unused,
9584 .unused,
9585 .unused,
9586 .unused,
9587 },
9588 .dst_temps = .{.mem},
9589 .clobbers = .{ .eflags = true },
9590 .each = .{ .once = &.{
9591 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9592 .{ .@"0:", ._, .movsx, .tmp1d, .memia(.src0b, .tmp0, .add_size), ._, ._ },
9593 .{ ._, ._, .@"test", .tmp1b, .tmp1b, ._, ._ },
9594 .{ ._, ._ns, .j, .@"1f", ._, ._, ._ },
9595 .{ ._, ._, .neg, .tmp1b, ._, ._, ._ },
9596 .{ .@"1:", ._, .mov, .memia(.dst0b, .tmp0, .add_size), .tmp1b, ._, ._ },
9597 .{ ._, ._, .add, .tmp0p, .si(1), ._, ._ },
9598 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9599 } },
9600 }, .{
9601 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .byte, .is = .byte } }, .any },
9602 .patterns = &.{
9603 .{ .src = .{ .to_mem, .none } },
9604 },
9605 .extra_temps = .{
9606 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9607 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9608 .unused,
9609 .unused,
9610 .unused,
9611 .unused,
9612 },
9613 .dst_temps = .{.mem},
9614 .clobbers = .{ .eflags = true },
9615 .each = .{ .once = &.{
9616 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9617 .{ .@"0:", ._, .movsx, .tmp1d, .memia(.src0b, .tmp0, .add_size), ._, ._ },
9618 .{ ._, ._, .@"test", .tmp1b, .tmp1b, ._, ._ },
9619 .{ ._, ._ns, .j, .@"1f", ._, ._, ._ },
9620 .{ ._, ._, .neg, .tmp1b, ._, ._, ._ },
9621 .{ .@"1:", ._, .mov, .memia(.dst0b, .tmp0, .add_size), .tmp1b, ._, ._ },
9622 .{ ._, ._c, .in, .tmp0p, ._, ._, ._ },
9623 .{ ._, ._nz, .j, .@"0b", ._, ._, ._ },
9624 } },
9625 }, .{
9626 .required_features = .{ .cmov, null, null, null },
9627 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .word, .is = .word } }, .any },
9628 .patterns = &.{
9629 .{ .src = .{ .to_mem, .none } },
9630 },
9631 .extra_temps = .{
9632 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9633 .{ .type = .u16, .kind = .{ .rc = .general_purpose } },
9634 .unused,
9635 .unused,
9636 .unused,
9637 .unused,
9638 },
9639 .dst_temps = .{.mem},
9640 .clobbers = .{ .eflags = true },
9641 .each = .{ .once = &.{
9642 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9643 .{ .@"0:", ._, .xor, .tmp1d, .tmp1d, ._, ._ },
9644 .{ ._, ._, .sub, .tmp1w, .memia(.src0w, .tmp0, .add_size), ._, ._ },
9645 .{ ._, ._s, .cmov, .tmp1w, .memia(.src0w, .tmp0, .add_size), ._, ._ },
9646 .{ ._, ._, .mov, .memia(.dst0w, .tmp0, .add_size), .tmp1w, ._, ._ },
9647 .{ ._, ._, .add, .tmp0p, .si(2), ._, ._ },
9648 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9649 } },
9650 }, .{
9651 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .word, .is = .word } }, .any },
9652 .patterns = &.{
9653 .{ .src = .{ .to_mem, .none } },
9654 },
9655 .extra_temps = .{
9656 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9657 .{ .type = .u16, .kind = .{ .rc = .general_purpose } },
9658 .unused,
9659 .unused,
9660 .unused,
9661 .unused,
9662 },
9663 .dst_temps = .{.mem},
9664 .clobbers = .{ .eflags = true },
9665 .each = .{ .once = &.{
9666 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9667 .{ .@"0:", ._, .movsx, .tmp1d, .memia(.src0w, .tmp0, .add_size), ._, ._ },
9668 .{ ._, ._, .@"test", .tmp1d, .tmp1d, ._, ._ },
9669 .{ ._, ._ns, .j, .@"1f", ._, ._, ._ },
9670 .{ ._, ._, .neg, .tmp1d, ._, ._, ._ },
9671 .{ .@"1:", ._, .mov, .memia(.dst0w, .tmp0, .add_size), .tmp1w, ._, ._ },
9672 .{ ._, ._, .add, .tmp0p, .si(2), ._, ._ },
9673 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9674 } },
9675 }, .{
9676 .required_features = .{ .cmov, null, null, null },
9677 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .dword, .is = .dword } }, .any },
9678 .patterns = &.{
9679 .{ .src = .{ .to_mem, .none } },
9680 },
9681 .extra_temps = .{
9682 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9683 .{ .type = .u32, .kind = .{ .rc = .general_purpose } },
9684 .unused,
9685 .unused,
9686 .unused,
9687 .unused,
9688 },
9689 .dst_temps = .{.mem},
9690 .clobbers = .{ .eflags = true },
9691 .each = .{ .once = &.{
9692 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9693 .{ .@"0:", ._, .xor, .tmp1d, .tmp1d, ._, ._ },
9694 .{ ._, ._, .sub, .tmp1d, .memia(.src0d, .tmp0, .add_size), ._, ._ },
9695 .{ ._, ._s, .cmov, .tmp1d, .memia(.src0d, .tmp0, .add_size), ._, ._ },
9696 .{ ._, ._, .mov, .memia(.dst0d, .tmp0, .add_size), .tmp1d, ._, ._ },
9697 .{ ._, ._, .add, .tmp0p, .si(4), ._, ._ },
9698 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9699 } },
9700 }, .{
9701 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .dword, .is = .dword } }, .any },
9702 .patterns = &.{
9703 .{ .src = .{ .to_mem, .none } },
9704 },
9705 .extra_temps = .{
9706 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9707 .{ .type = .u32, .kind = .{ .rc = .general_purpose } },
9708 .unused,
9709 .unused,
9710 .unused,
9711 .unused,
9712 },
9713 .dst_temps = .{.mem},
9714 .clobbers = .{ .eflags = true },
9715 .each = .{ .once = &.{
9716 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9717 .{ .@"0:", ._, .mov, .tmp1d, .memia(.src0d, .tmp0, .add_size), ._, ._ },
9718 .{ ._, ._, .@"test", .tmp1d, .tmp1d, ._, ._ },
9719 .{ ._, ._ns, .j, .@"1f", ._, ._, ._ },
9720 .{ ._, ._, .neg, .tmp1d, ._, ._, ._ },
9721 .{ .@"1:", ._, .mov, .memia(.dst0d, .tmp0, .add_size), .tmp1d, ._, ._ },
9722 .{ ._, ._, .add, .tmp0p, .si(4), ._, ._ },
9723 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9724 } },
9725 }, .{
9726 .required_features = .{ .@"64bit", .cmov, null, null },
9727 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .qword, .is = .qword } }, .any },
9728 .patterns = &.{
9729 .{ .src = .{ .to_mem, .none } },
9730 },
9731 .extra_temps = .{
9732 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9733 .{ .type = .u64, .kind = .{ .rc = .general_purpose } },
9734 .unused,
9735 .unused,
9736 .unused,
9737 .unused,
9738 },
9739 .dst_temps = .{.mem},
9740 .clobbers = .{ .eflags = true },
9741 .each = .{ .once = &.{
9742 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9743 .{ .@"0:", ._, .xor, .tmp1d, .tmp1d, ._, ._ },
9744 .{ ._, ._, .sub, .tmp1q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
9745 .{ ._, ._s, .cmov, .tmp1q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
9746 .{ ._, ._, .mov, .memia(.dst0q, .tmp0, .add_size), .tmp1q, ._, ._ },
9747 .{ ._, ._, .add, .tmp0p, .si(8), ._, ._ },
9748 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9749 } },
9750 }, .{
9751 .required_features = .{ .@"64bit", null, null, null },
9752 .src_constraints = .{ .{ .multiple_scalar_int = .{ .of = .qword, .is = .qword } }, .any },
9753 .patterns = &.{
9754 .{ .src = .{ .to_mem, .none } },
9755 },
9756 .extra_temps = .{
9757 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9758 .{ .type = .u64, .kind = .{ .rc = .general_purpose } },
9759 .unused,
9760 .unused,
9761 .unused,
9762 .unused,
9763 },
9764 .dst_temps = .{.mem},
9765 .clobbers = .{ .eflags = true },
9766 .each = .{ .once = &.{
9767 .{ ._, ._, .mov, .tmp0p, .sa(.src0, .sub_size), ._, ._ },
9768 .{ .@"0:", ._, .mov, .tmp1q, .memia(.src0q, .tmp0, .add_size), ._, ._ },
9769 .{ ._, ._, .@"test", .tmp1q, .tmp1q, ._, ._ },
9770 .{ ._, ._ns, .j, .@"1f", ._, ._, ._ },
9771 .{ ._, ._, .neg, .tmp1q, ._, ._, ._ },
9772 .{ .@"1:", ._, .mov, .memia(.dst0q, .tmp0, .add_size), .tmp1q, ._, ._ },
9773 .{ ._, ._, .add, .tmp0p, .si(8), ._, ._ },
9774 .{ ._, ._nc, .j, .@"0b", ._, ._, ._ },
9775 } },
9776 }, .{
9777 .required_features = .{ .@"64bit", null, null, null },
9778 .src_constraints = .{ .any_scalar_int, .any },
9779 .patterns = &.{
9780 .{ .src = .{ .to_mem, .none } },
9781 },
9782 .extra_temps = .{
9783 .{ .type = .usize, .kind = .{ .rc = .general_purpose } },
9784 .{ .type = .isize, .kind = .{ .rc = .general_purpose } },
9785 .{ .type = .i64, .kind = .{ .rc = .general_purpose } },
9786 .{ .type = .u8, .kind = .{ .rc = .general_purpose } },
9787 .{ .type = .i64, .kind = .{ .rc = .general_purpose } },
9788 .unused,
9789 },
9790 .dst_temps = .{.mem},
9791 .clobbers = .{ .eflags = true },
9792 .each = .{ .once = &.{
9793 .{ ._, ._, .xor, .tmp0d, .tmp0d, ._, ._ },
9794 .{ .@"0:", ._, .mov, .tmp1d, .sa(.none, .add_src0_elem_size), ._, ._ },
9795 .{ ._, ._, .mov, .tmp2q, .memiad(.src0q, .tmp0, .add_src0_elem_size, -8), ._, ._ },
9796 .{ ._, ._r, .sa, .tmp2q, .si(63), ._, ._ },
9797 .{ ._, ._, .xor, .tmp3d, .tmp3d, ._, ._ },
9798 .{ .@"1:", ._, .mov, .tmp4q, .memi(.src0q, .tmp0), ._, ._ },
9799 .{ ._, ._, .xor, .tmp4q, .tmp2q, ._, ._ },
9800 .{ ._, ._r, .sh, .tmp3b, .si(1), ._, ._ },
9801 .{ ._, ._, .sbb, .tmp4q, .tmp2q, ._, ._ },
9802 .{ ._, ._c, .set, .tmp3b, ._, ._, ._ },
9803 .{ ._, ._, .mov, .memi(.dst0q, .tmp0), .tmp4q, ._, ._ },
9804 .{ ._, ._, .lea, .tmp0d, .lead(.none, .tmp0, 8), ._, ._ },
9805 .{ ._, ._, .sub, .tmp1d, .si(8), ._, ._ },
9806 .{ ._, ._a, .j, .@"1b", ._, ._, ._ },
9807 .{ ._, ._, .cmp, .tmp0d, .sa(.none, .add_src0_unaligned_size), ._, ._ },
9808 .{ ._, ._b, .j, .@"0b", ._, ._, ._ },
9809 } },
9810 } }) catch |err| switch (err) {
9811 error.SelectFailed => return cg.fail("failed to select {s} {} {}", .{
9812 @tagName(air_tag),
9813 cg.typeOf(ty_op.operand).fmt(pt),
9814 ops[0].tracking(cg),
9815 }),
9816 else => |e| return e,
9817 };
87909818 for (ops) |op| for (res) |r| {
87919819 if (op.index == r.index) break;
87929820 } else try op.die(cg);
......@@ -9002,7 +10030,7 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void {
900210030 }) else fallback: {
900310031 const bin_op = air_datas[@intFromEnum(inst)].bin_op;
900410032 const scalar_ty = cg.typeOf(bin_op.lhs).scalarType(zcu);
9005 if (intInfo(scalar_ty, cg) == null) break :fallback try cg.airCmp(inst, switch (air_tag) {
10033 if (cg.intInfo(scalar_ty) == null) break :fallback try cg.airCmp(inst, switch (air_tag) {
900610034 else => unreachable,
900710035 .cmp_eq, .cmp_eq_optimized => .eq,
900810036 .cmp_neq, .cmp_neq_optimized => .neq,
......@@ -28051,7 +29079,15 @@ fn promoteVarArg(self: *CodeGen, ty: Type) Type {
2805129079 }
2805229080}
2805329081
28054fn intInfo(ty: Type, cg: *CodeGen) ?std.builtin.Type.Int {
29082fn unalignedSize(cg: *CodeGen, ty: Type) u64 {
29083 const zcu = cg.pt.zcu;
29084 return switch (zcu.intern_pool.indexToKey(ty.toIntern())) {
29085 .vector_type => |vector_type| Type.fromInterned(vector_type.child).abiSize(zcu) * vector_type.len,
29086 else => ty.abiSize(zcu),
29087 };
29088}
29089
29090fn intInfo(cg: *CodeGen, ty: Type) ?std.builtin.Type.Int {
2805529091 const zcu = cg.pt.zcu;
2805629092 const ip = &zcu.intern_pool;
2805729093 var ty_index = ty.ip_index;
......@@ -29253,6 +30289,7 @@ const Select = struct {
2925330289 any_bool_vec,
2925430290 any_int,
2925530291 any_signed_int,
30292 any_scalar_int,
2925630293 any_float,
2925730294 po2_any,
2925830295 bool_vec: Memory.Size,
......@@ -29263,10 +30300,12 @@ const Select = struct {
2926330300 size: Memory.Size,
2926430301 multiple_size: Memory.Size,
2926530302 int: Memory.Size,
29266 scalar_int: Memory.Size,
30303 scalar_int_is: Memory.Size,
30304 scalar_int: struct { of: Memory.Size, is: Memory.Size },
2926730305 scalar_signed_int: Memory.Size,
2926830306 scalar_unsigned_int: Memory.Size,
2926930307 scalar_remainder_int: struct { of: Memory.Size, is: Memory.Size },
30308 multiple_scalar_int: struct { of: Memory.Size, is: Memory.Size },
2927030309 exact_int: u16,
2927130310 exact_signed_int: u16,
2927230311 exact_unsigned_int: u16,
......@@ -29290,8 +30329,9 @@ const Select = struct {
2929030329 return switch (constraint) {
2929130330 .any => true,
2929230331 .any_bool_vec => ty.isVector(zcu) and ty.childType(zcu).toIntern() == .bool_type,
29293 .any_int => intInfo(ty, cg) != null,
29294 .any_signed_int => if (intInfo(ty, cg)) |int_info| int_info.signedness == .signed else false,
30332 .any_int => cg.intInfo(ty) != null,
30333 .any_signed_int => if (cg.intInfo(ty)) |int_info| int_info.signedness == .signed else false,
30334 .any_scalar_int => cg.intInfo(ty.scalarType(zcu)) != null,
2929530335 .any_float => ty.isRuntimeFloat(),
2929630336 .po2_any => std.math.isPowerOfTwo(ty.abiSize(zcu)),
2929730337 .bool_vec => |size| ty.isVector(zcu) and ty.scalarType(zcu).toIntern() == .bool_type and
......@@ -29299,89 +30339,93 @@ const Select = struct {
2929930339 .vec => |size| ty.isVector(zcu) and ty.scalarType(zcu).toIntern() != .bool_type and
2930030340 size.bitSize(cg.target) >= ty.abiSize(zcu),
2930130341 .signed_int_vec => |size| ty.isVector(zcu) and size.bitSize(cg.target) >= 8 * ty.abiSize(zcu) and
29302 if (intInfo(ty.childType(zcu), cg)) |int_info| int_info.signedness == .signed else false,
30342 if (cg.intInfo(ty.childType(zcu))) |int_info| int_info.signedness == .signed else false,
2930330343 .signed_int_or_full_vec => |size| ty.isVector(zcu) and size.bitSize(cg.target) >= 8 * ty.abiSize(zcu) and
29304 if (intInfo(ty.childType(zcu), cg)) |int_info| switch (int_info.signedness) {
30344 if (cg.intInfo(ty.childType(zcu))) |int_info| switch (int_info.signedness) {
2930530345 .signed => true,
2930630346 .unsigned => int_info.bits >= 8 and std.math.isPowerOfTwo(int_info.bits),
2930730347 } else false,
2930830348 .unsigned_int_vec => |size| ty.isVector(zcu) and size.bitSize(cg.target) >= 8 * ty.abiSize(zcu) and
29309 if (intInfo(ty.childType(zcu), cg)) |int_info| int_info.signedness == .unsigned else false,
30349 if (cg.intInfo(ty.childType(zcu))) |int_info| int_info.signedness == .unsigned else false,
2931030350 .size => |size| size.bitSize(cg.target) >= 8 * ty.abiSize(zcu),
2931130351 .multiple_size => |size| size.bitSize(cg.target) % 8 * ty.abiSize(zcu) == 0,
29312 .int => |size| if (intInfo(ty, cg)) |int_info| size.bitSize(cg.target) >= int_info.bits else false,
29313 .scalar_int => |size| if (intInfo(ty.scalarType(zcu), cg)) |int_info|
30352 .int => |size| if (cg.intInfo(ty)) |int_info| size.bitSize(cg.target) >= int_info.bits else false,
30353 .scalar_int_is => |size| if (cg.intInfo(ty.scalarType(zcu))) |int_info|
2931430354 size.bitSize(cg.target) >= int_info.bits
2931530355 else
2931630356 false,
29317 .scalar_signed_int => |size| if (intInfo(ty.scalarType(zcu), cg)) |int_info| switch (int_info.signedness) {
30357 .scalar_int => |of_is| of_is.of.bitSize(cg.target) >= 8 * ty.abiSize(zcu) and
30358 if (cg.intInfo(ty.scalarType(zcu))) |int_info| of_is.is.bitSize(cg.target) >= int_info.bits else false,
30359 .scalar_signed_int => |size| if (cg.intInfo(ty.scalarType(zcu))) |int_info| switch (int_info.signedness) {
2931830360 .signed => size.bitSize(cg.target) >= int_info.bits,
2931930361 .unsigned => false,
2932030362 } else false,
29321 .scalar_unsigned_int => |size| if (intInfo(ty.scalarType(zcu), cg)) |int_info| switch (int_info.signedness) {
30363 .scalar_unsigned_int => |size| if (cg.intInfo(ty.scalarType(zcu))) |int_info| switch (int_info.signedness) {
2932230364 .signed => false,
2932330365 .unsigned => size.bitSize(cg.target) >= int_info.bits,
2932430366 } else false,
29325 .scalar_remainder_int => |of_is| if (intInfo(ty.scalarType(zcu), cg)) |int_info|
30367 .multiple_scalar_int => |of_is| of_is.of.bitSize(cg.target) % 8 * ty.abiSize(zcu) == 0 and
30368 if (cg.intInfo(ty.scalarType(zcu))) |int_info| of_is.is.bitSize(cg.target) >= int_info.bits else false,
30369 .scalar_remainder_int => |of_is| if (cg.intInfo(ty.scalarType(zcu))) |int_info|
2932630370 of_is.is.bitSize(cg.target) >= (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1
2932730371 else
2932830372 false,
29329 .exact_int => |bit_size| if (intInfo(ty, cg)) |int_info| bit_size == int_info.bits else false,
29330 .exact_signed_int => |bit_size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30373 .exact_int => |bit_size| if (cg.intInfo(ty)) |int_info| bit_size == int_info.bits else false,
30374 .exact_signed_int => |bit_size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2933130375 .signed => bit_size == int_info.bits,
2933230376 .unsigned => false,
2933330377 } else false,
29334 .exact_unsigned_int => |bit_size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30378 .exact_unsigned_int => |bit_size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2933530379 .signed => false,
2933630380 .unsigned => bit_size == int_info.bits,
2933730381 } else false,
29338 .signed_or_exact_int => |size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30382 .signed_or_exact_int => |size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2933930383 .signed => size.bitSize(cg.target) >= int_info.bits,
2934030384 .unsigned => size.bitSize(cg.target) == int_info.bits,
2934130385 } else false,
29342 .unsigned_or_exact_int => |size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30386 .unsigned_or_exact_int => |size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2934330387 .signed => size.bitSize(cg.target) == int_info.bits,
2934430388 .unsigned => size.bitSize(cg.target) >= int_info.bits,
2934530389 } else false,
29346 .po2_int => |size| if (intInfo(ty, cg)) |int_info|
30390 .po2_int => |size| if (cg.intInfo(ty)) |int_info|
2934730391 std.math.isPowerOfTwo(int_info.bits) and size.bitSize(cg.target) >= int_info.bits
2934830392 else
2934930393 false,
29350 .signed_po2_int => |size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30394 .signed_po2_int => |size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2935130395 .signed => std.math.isPowerOfTwo(int_info.bits) and size.bitSize(cg.target) >= int_info.bits,
2935230396 .unsigned => false,
2935330397 } else false,
29354 .unsigned_po2_or_exact_int => |size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30398 .unsigned_po2_or_exact_int => |size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2935530399 .signed => size.bitSize(cg.target) == int_info.bits,
2935630400 .unsigned => std.math.isPowerOfTwo(int_info.bits) and size.bitSize(cg.target) >= int_info.bits,
2935730401 } else false,
29358 .remainder_int => |of_is| if (intInfo(ty, cg)) |int_info|
30402 .remainder_int => |of_is| if (cg.intInfo(ty)) |int_info|
2935930403 of_is.is.bitSize(cg.target) >= (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1
2936030404 else
2936130405 false,
29362 .exact_remainder_int => |of_is| if (intInfo(ty, cg)) |int_info|
30406 .exact_remainder_int => |of_is| if (cg.intInfo(ty)) |int_info|
2936330407 of_is.is.bitSize(cg.target) == (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1
2936430408 else
2936530409 false,
29366 .signed_or_exact_remainder_int => |of_is| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30410 .signed_or_exact_remainder_int => |of_is| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2936730411 .signed => of_is.is.bitSize(cg.target) >= (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1,
2936830412 .unsigned => of_is.is.bitSize(cg.target) == (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1,
2936930413 } else false,
29370 .unsigned_or_exact_remainder_int => |of_is| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30414 .unsigned_or_exact_remainder_int => |of_is| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2937130415 .signed => of_is.is.bitSize(cg.target) == (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1,
2937230416 .unsigned => of_is.is.bitSize(cg.target) >= (int_info.bits - 1) % of_is.of.bitSize(cg.target) + 1,
2937330417 } else false,
29374 .signed_int => |size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30418 .signed_int => |size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2937530419 .signed => size.bitSize(cg.target) >= int_info.bits,
2937630420 .unsigned => false,
2937730421 } else false,
29378 .unsigned_int => |size| if (intInfo(ty, cg)) |int_info| switch (int_info.signedness) {
30422 .unsigned_int => |size| if (cg.intInfo(ty)) |int_info| switch (int_info.signedness) {
2937930423 .signed => false,
2938030424 .unsigned => size.bitSize(cg.target) >= int_info.bits,
2938130425 } else false,
2938230426 .elem_size_is => |size| size == ty.elemType2(zcu).abiSize(zcu),
2938330427 .po2_elem_size => std.math.isPowerOfTwo(ty.elemType2(zcu).abiSize(zcu)),
29384 .elem_int => |size| if (intInfo(ty.elemType2(zcu), cg)) |elem_int_info|
30428 .elem_int => |size| if (cg.intInfo(ty.elemType2(zcu))) |elem_int_info|
2938530429 size.bitSize(cg.target) >= elem_int_info.bits
2938630430 else
2938730431 false,
......@@ -29565,7 +30609,7 @@ const Select = struct {
2956530609 }),
2956630610 },
2956730611 else => {
29568 const scalar_info = intInfo(scalar_ty, cg).?;
30612 const scalar_info = cg.intInfo(scalar_ty).?;
2956930613 const scalar_int_ty = try pt.intType(scalar_info.signedness, scalar_info.bits);
2957030614 if (scalar_info.bits <= 64) {
2957130615 const int_val: i64 = switch (spec.kind) {
......@@ -29649,7 +30693,7 @@ const Select = struct {
2964930693 ptr_size,
2965030694 ptr_bit_size,
2965130695 size,
29652 src0_size,
30696 src0_unaligned_size,
2965330697 bit_size,
2965430698 src0_bit_size,
2965530699 len,
......@@ -29667,8 +30711,8 @@ const Select = struct {
2966730711 const add_ptr_bit_size: Adjust = .{ .factor = 1, .scale = .@"1", .amount = .ptr_bit_size };
2966830712 const add_size: Adjust = .{ .factor = 1, .scale = .@"1", .amount = .size };
2966930713 const sub_size: Adjust = .{ .factor = -1, .scale = .@"1", .amount = .size };
29670 const add_src0_size: Adjust = .{ .factor = 1, .scale = .@"1", .amount = .src0_size };
29671 const sub_src0_size: Adjust = .{ .factor = -1, .scale = .@"1", .amount = .src0_size };
30714 const add_src0_unaligned_size: Adjust = .{ .factor = 1, .scale = .@"1", .amount = .src0_unaligned_size };
30715 const sub_src0_unaligned_size: Adjust = .{ .factor = -1, .scale = .@"1", .amount = .src0_unaligned_size };
2967230716 const add_2_bit_size: Adjust = .{ .factor = 1, .scale = .@"2", .amount = .bit_size };
2967330717 const add_bit_size: Adjust = .{ .factor = 1, .scale = .@"1", .amount = .bit_size };
2967430718 const sub_bit_size: Adjust = .{ .factor = -1, .scale = .@"1", .amount = .bit_size };
......@@ -30064,7 +31108,7 @@ const Select = struct {
3006431108 .ptr_size => @divExact(s.cg.target.ptrBitWidth(), 8),
3006531109 .ptr_bit_size => s.cg.target.ptrBitWidth(),
3006631110 .size => @intCast(op.base.ref.deref(s).typeOf(s.cg).abiSize(s.cg.pt.zcu)),
30067 .src0_size => @intCast(Select.Operand.Ref.src0.deref(s).typeOf(s.cg).abiSize(s.cg.pt.zcu)),
31111 .src0_unaligned_size => @intCast(s.cg.unalignedSize(Select.Operand.Ref.src0.deref(s).typeOf(s.cg))),
3006831112 .bit_size => @intCast(op.base.ref.deref(s).typeOf(s.cg).scalarType(s.cg.pt.zcu).bitSize(s.cg.pt.zcu)),
3006931113 .src0_bit_size => @intCast(Select.Operand.Ref.src0.deref(s).typeOf(s.cg).scalarType(s.cg.pt.zcu).bitSize(s.cg.pt.zcu)),
3007031114 .len => @intCast(op.base.ref.deref(s).typeOf(s.cg).vectorLen(s.cg.pt.zcu)),
src/arch/x86_64/Mir.zig+2-2
......@@ -55,9 +55,9 @@ pub const Inst = struct {
5555 _pkru,
5656 /// ___ Performance-Monitoring Counters
5757 _pmc,
58 /// ___ Rondam Number
58 /// ___ Random Number
5959 _rand,
60 /// ___ Rondam Seed
60 /// ___ Random Seed
6161 _seed,
6262 /// ___ Shadow Stack Pointer Doubleword
6363 _sspd,
test/behavior/abs.zig+5-6
......@@ -210,7 +210,7 @@ fn testAbsFloats(comptime T: type) !void {
210210test "@abs int vectors" {
211211 if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
212212 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
213 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
213 if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
214214 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
215215 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
216216 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
......@@ -268,8 +268,8 @@ fn testAbsIntVectors(comptime len: comptime_int) !void {
268268 try expect(std.mem.eql(u64, &@as([len]u64, y), &@as([len]u64, @abs(x))));
269269 }
270270 {
271 var x = std.simd.repeat(len, @Vector(4, i32){ -2, 5, std.math.minInt(i32), -7 });
272 var y = std.simd.repeat(len, @Vector(4, u32){ 2, 5, -std.math.minInt(i32), 7 });
271 var x = comptime std.simd.repeat(len, @Vector(4, i32){ -2, 5, std.math.minInt(i32), -7 });
272 var y = comptime std.simd.repeat(len, @Vector(4, u32){ 2, 5, -std.math.minInt(i32), 7 });
273273 _ = .{ &x, &y };
274274 try expect(std.mem.eql(u32, &@as([len]u32, y), &@as([len]u32, @abs(x))));
275275 }
......@@ -277,7 +277,6 @@ fn testAbsIntVectors(comptime len: comptime_int) !void {
277277
278278test "@abs unsigned int vectors" {
279279 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
280 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
281280 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
282281 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
283282 if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
......@@ -327,8 +326,8 @@ fn testAbsUnsignedIntVectors(comptime len: comptime_int) !void {
327326 try expect(std.mem.eql(u64, &@as([len]u64, y), &@as([len]u64, @abs(x))));
328327 }
329328 {
330 var x = std.simd.repeat(len, @Vector(3, u32){ 2, 5, 7 });
331 var y = std.simd.repeat(len, @Vector(3, u32){ 2, 5, 7 });
329 var x = comptime std.simd.repeat(len, @Vector(3, u32){ 2, 5, 7 });
330 var y = comptime std.simd.repeat(len, @Vector(3, u32){ 2, 5, 7 });
332331 _ = .{ &x, &y };
333332 try expect(std.mem.eql(u32, &@as([len]u32, y), &@as([len]u32, @abs(x))));
334333 }
test/behavior/x86_64/build.zig+7
......@@ -1,5 +1,11 @@
11const std = @import("std");
22pub fn build(b: *std.Build) void {
3 const test_filters = b.option(
4 []const []const u8,
5 "test-filter",
6 "Skip tests that do not match any filter",
7 ) orelse &[0][]const u8{};
8
39 const compiler_rt_lib = b.addStaticLibrary(.{
410 .name = "compiler_rt",
511 .use_llvm = false,
......@@ -96,6 +102,7 @@ pub fn build(b: *std.Build) void {
96102 });
97103 const test_exe = b.addTest(.{
98104 .name = std.fs.path.stem(path),
105 .filters = test_filters,
99106 .use_llvm = false,
100107 .use_lld = false,
101108 .root_module = test_mod,
test/behavior/x86_64/math.zig+1287-1047
......@@ -1,1103 +1,1343 @@
1fn testUnary(comptime op: anytype) !void {
2 const testType = struct {
3 fn testType(comptime Type: type, comptime imm_arg: Type) !void {
1fn Unary(comptime op: anytype) type {
2 return struct {
3 fn testArgs(comptime Type: type, comptime imm_arg: Type) !void {
44 const expected = op(Type, imm_arg);
55 try struct {
6 fn testOne(actual: @TypeOf(expected)) !void {
6 fn checkExpected(actual: @TypeOf(expected)) !void {
77 if (switch (@typeInfo(@TypeOf(expected))) {
88 else => actual != expected,
99 .vector => @reduce(.Or, actual != expected),
1010 }) return error.Unexpected;
1111 }
12 noinline fn testOps(mem_arg: Type) !void {
12 noinline fn testArgKinds(mem_arg: Type) !void {
1313 var reg_arg = mem_arg;
1414 _ = .{&reg_arg};
15 try testOne(op(Type, reg_arg));
16 try testOne(op(Type, mem_arg));
17 try testOne(op(Type, imm_arg));
15 try checkExpected(op(Type, reg_arg));
16 try checkExpected(op(Type, mem_arg));
17 try checkExpected(op(Type, imm_arg));
1818 }
19 }.testOps(imm_arg);
19 }.testArgKinds(imm_arg);
2020 }
21 }.testType;
22
23 try testType(i0, 0);
24 try testType(u0, 0);
25
26 try testType(i1, -1);
27 try testType(i1, 0);
28 try testType(u1, 0);
29 try testType(u1, 1 << 0);
30
31 try testType(i2, -1 << 1);
32 try testType(i2, -1);
33 try testType(i2, 0);
34 try testType(u2, 0);
35 try testType(u2, 1 << 0);
36 try testType(u2, 1 << 1);
37
38 try testType(i3, -1 << 2);
39 try testType(i3, -1);
40 try testType(i3, 0);
41 try testType(u3, 0);
42 try testType(u3, 1 << 0);
43 try testType(u3, 1 << 1);
44 try testType(u3, 1 << 2);
45
46 try testType(i4, -1 << 3);
47 try testType(i4, -1);
48 try testType(i4, 0);
49 try testType(u4, 0);
50 try testType(u4, 1 << 0);
51 try testType(u4, 1 << 1);
52 try testType(u4, 1 << 2);
53 try testType(u4, 1 << 3);
54
55 try testType(i5, -1 << 4);
56 try testType(i5, -1);
57 try testType(i5, 0);
58 try testType(u5, 0);
59 try testType(u5, 1 << 0);
60 try testType(u5, 1 << 1);
61 try testType(u5, 1 << 3);
62 try testType(u5, 1 << 4);
63
64 try testType(i7, -1 << 6);
65 try testType(i7, -1);
66 try testType(i7, 0);
67 try testType(u7, 0);
68 try testType(u7, 1 << 0);
69 try testType(u7, 1 << 1);
70 try testType(u7, 1 << 5);
71 try testType(u7, 1 << 6);
72
73 try testType(i8, -1 << 7);
74 try testType(i8, -1);
75 try testType(i8, 0);
76 try testType(u8, 0);
77 try testType(u8, 1 << 0);
78 try testType(u8, 1 << 1);
79 try testType(u8, 1 << 6);
80 try testType(u8, 1 << 7);
81
82 try testType(i9, -1 << 8);
83 try testType(i9, -1);
84 try testType(i9, 0);
85 try testType(u9, 0);
86 try testType(u9, 1 << 0);
87 try testType(u9, 1 << 1);
88 try testType(u9, 1 << 7);
89 try testType(u9, 1 << 8);
90
91 try testType(i15, -1 << 14);
92 try testType(i15, -1);
93 try testType(i15, 0);
94 try testType(u15, 0);
95 try testType(u15, 1 << 0);
96 try testType(u15, 1 << 1);
97 try testType(u15, 1 << 13);
98 try testType(u15, 1 << 14);
99
100 try testType(i16, -1 << 15);
101 try testType(i16, -1);
102 try testType(i16, 0);
103 try testType(u16, 0);
104 try testType(u16, 1 << 0);
105 try testType(u16, 1 << 1);
106 try testType(u16, 1 << 14);
107 try testType(u16, 1 << 15);
108
109 try testType(i17, -1 << 16);
110 try testType(i17, -1);
111 try testType(i17, 0);
112 try testType(u17, 0);
113 try testType(u17, 1 << 0);
114 try testType(u17, 1 << 1);
115 try testType(u17, 1 << 15);
116 try testType(u17, 1 << 16);
117
118 try testType(i31, -1 << 30);
119 try testType(i31, -1);
120 try testType(i31, 0);
121 try testType(u31, 0);
122 try testType(u31, 1 << 0);
123 try testType(u31, 1 << 1);
124 try testType(u31, 1 << 29);
125 try testType(u31, 1 << 30);
126
127 try testType(i32, -1 << 31);
128 try testType(i32, -1);
129 try testType(i32, 0);
130 try testType(u32, 0);
131 try testType(u32, 1 << 0);
132 try testType(u32, 1 << 1);
133 try testType(u32, 1 << 30);
134 try testType(u32, 1 << 31);
135
136 try testType(i33, -1 << 32);
137 try testType(i33, -1);
138 try testType(i33, 0);
139 try testType(u33, 0);
140 try testType(u33, 1 << 0);
141 try testType(u33, 1 << 1);
142 try testType(u33, 1 << 31);
143 try testType(u33, 1 << 32);
144
145 try testType(i63, -1 << 62);
146 try testType(i63, -1);
147 try testType(i63, 0);
148 try testType(u63, 0);
149 try testType(u63, 1 << 0);
150 try testType(u63, 1 << 1);
151 try testType(u63, 1 << 61);
152 try testType(u63, 1 << 62);
153
154 try testType(i64, -1 << 63);
155 try testType(i64, -1);
156 try testType(i64, 0);
157 try testType(u64, 0);
158 try testType(u64, 1 << 0);
159 try testType(u64, 1 << 1);
160 try testType(u64, 1 << 62);
161 try testType(u64, 1 << 63);
162
163 try testType(i65, -1 << 64);
164 try testType(i65, -1);
165 try testType(i65, 0);
166 try testType(u65, 0);
167 try testType(u65, 1 << 0);
168 try testType(u65, 1 << 1);
169 try testType(u65, 1 << 63);
170 try testType(u65, 1 << 64);
171
172 try testType(i95, -1 << 94);
173 try testType(i95, -1);
174 try testType(i95, 0);
175 try testType(u95, 0);
176 try testType(u95, 1 << 0);
177 try testType(u95, 1 << 1);
178 try testType(u95, 1 << 93);
179 try testType(u95, 1 << 94);
180
181 try testType(i96, -1 << 95);
182 try testType(i96, -1);
183 try testType(i96, 0);
184 try testType(u96, 0);
185 try testType(u96, 1 << 0);
186 try testType(u96, 1 << 1);
187 try testType(u96, 1 << 94);
188 try testType(u96, 1 << 95);
189
190 try testType(i97, -1 << 96);
191 try testType(i97, -1);
192 try testType(i97, 0);
193 try testType(u97, 0);
194 try testType(u97, 1 << 0);
195 try testType(u97, 1 << 1);
196 try testType(u97, 1 << 95);
197 try testType(u97, 1 << 96);
198
199 try testType(i127, -1 << 126);
200 try testType(i127, -1);
201 try testType(i127, 0);
202 try testType(u127, 0);
203 try testType(u127, 1 << 0);
204 try testType(u127, 1 << 1);
205 try testType(u127, 1 << 125);
206 try testType(u127, 1 << 126);
207
208 try testType(i128, -1 << 127);
209 try testType(i128, -1);
210 try testType(i128, 0);
211 try testType(u128, 0);
212 try testType(u128, 1 << 0);
213 try testType(u128, 1 << 1);
214 try testType(u128, 1 << 126);
215 try testType(u128, 1 << 127);
216
217 try testType(i129, -1 << 128);
218 try testType(i129, -1);
219 try testType(i129, 0);
220 try testType(u129, 0);
221 try testType(u129, 1 << 0);
222 try testType(u129, 1 << 1);
223 try testType(u129, 1 << 127);
224 try testType(u129, 1 << 128);
225
226 try testType(i159, -1 << 158);
227 try testType(i159, -1);
228 try testType(i159, 0);
229 try testType(u159, 0);
230 try testType(u159, 1 << 0);
231 try testType(u159, 1 << 1);
232 try testType(u159, 1 << 157);
233 try testType(u159, 1 << 158);
234
235 try testType(i160, -1 << 159);
236 try testType(i160, -1);
237 try testType(i160, 0);
238 try testType(u160, 0);
239 try testType(u160, 1 << 0);
240 try testType(u160, 1 << 1);
241 try testType(u160, 1 << 158);
242 try testType(u160, 1 << 159);
243
244 try testType(i161, -1 << 160);
245 try testType(i161, -1);
246 try testType(i161, 0);
247 try testType(u161, 0);
248 try testType(u161, 1 << 0);
249 try testType(u161, 1 << 1);
250 try testType(u161, 1 << 159);
251 try testType(u161, 1 << 160);
252
253 try testType(i191, -1 << 190);
254 try testType(i191, -1);
255 try testType(i191, 0);
256 try testType(u191, 0);
257 try testType(u191, 1 << 0);
258 try testType(u191, 1 << 1);
259 try testType(u191, 1 << 189);
260 try testType(u191, 1 << 190);
261
262 try testType(i192, -1 << 191);
263 try testType(i192, -1);
264 try testType(i192, 0);
265 try testType(u192, 0);
266 try testType(u192, 1 << 0);
267 try testType(u192, 1 << 1);
268 try testType(u192, 1 << 190);
269 try testType(u192, 1 << 191);
270
271 try testType(i193, -1 << 192);
272 try testType(i193, -1);
273 try testType(i193, 0);
274 try testType(u193, 0);
275 try testType(u193, 1 << 0);
276 try testType(u193, 1 << 1);
277 try testType(u193, 1 << 191);
278 try testType(u193, 1 << 192);
279
280 try testType(i223, -1 << 222);
281 try testType(i223, -1);
282 try testType(i223, 0);
283 try testType(u223, 0);
284 try testType(u223, 1 << 0);
285 try testType(u223, 1 << 1);
286 try testType(u223, 1 << 221);
287 try testType(u223, 1 << 222);
288
289 try testType(i224, -1 << 223);
290 try testType(i224, -1);
291 try testType(i224, 0);
292 try testType(u224, 0);
293 try testType(u224, 1 << 0);
294 try testType(u224, 1 << 1);
295 try testType(u224, 1 << 222);
296 try testType(u224, 1 << 223);
297
298 try testType(i225, -1 << 224);
299 try testType(i225, -1);
300 try testType(i225, 0);
301 try testType(u225, 0);
302 try testType(u225, 1 << 0);
303 try testType(u225, 1 << 1);
304 try testType(u225, 1 << 223);
305 try testType(u225, 1 << 224);
306
307 try testType(i255, -1 << 254);
308 try testType(i255, -1);
309 try testType(i255, 0);
310 try testType(u255, 0);
311 try testType(u255, 1 << 0);
312 try testType(u255, 1 << 1);
313 try testType(u255, 1 << 253);
314 try testType(u255, 1 << 254);
315
316 try testType(i256, -1 << 255);
317 try testType(i256, -1);
318 try testType(i256, 0);
319 try testType(u256, 0);
320 try testType(u256, 1 << 0);
321 try testType(u256, 1 << 1);
322 try testType(u256, 1 << 254);
323 try testType(u256, 1 << 255);
324
325 try testType(i257, -1 << 256);
326 try testType(i257, -1);
327 try testType(i257, 0);
328 try testType(u257, 0);
329 try testType(u257, 1 << 0);
330 try testType(u257, 1 << 1);
331 try testType(u257, 1 << 255);
332 try testType(u257, 1 << 256);
333
334 try testType(i511, -1 << 510);
335 try testType(i511, -1);
336 try testType(i511, 0);
337 try testType(u511, 0);
338 try testType(u511, 1 << 0);
339 try testType(u511, 1 << 1);
340 try testType(u511, 1 << 509);
341 try testType(u511, 1 << 510);
342
343 try testType(i512, -1 << 511);
344 try testType(i512, -1);
345 try testType(i512, 0);
346 try testType(u512, 0);
347 try testType(u512, 1 << 0);
348 try testType(u512, 1 << 1);
349 try testType(u512, 1 << 510);
350 try testType(u512, 1 << 511);
351
352 try testType(i513, -1 << 512);
353 try testType(i513, -1);
354 try testType(i513, 0);
355 try testType(u513, 0);
356 try testType(u513, 1 << 0);
357 try testType(u513, 1 << 1);
358 try testType(u513, 1 << 511);
359 try testType(u513, 1 << 512);
360
361 try testType(i1023, -1 << 1022);
362 try testType(i1023, -1);
363 try testType(i1023, 0);
364 try testType(u1023, 0);
365 try testType(u1023, 1 << 0);
366 try testType(u1023, 1 << 1);
367 try testType(u1023, 1 << 1021);
368 try testType(u1023, 1 << 1022);
369
370 try testType(i1024, -1 << 1023);
371 try testType(i1024, -1);
372 try testType(i1024, 0);
373 try testType(u1024, 0);
374 try testType(u1024, 1 << 0);
375 try testType(u1024, 1 << 1);
376 try testType(u1024, 1 << 1022);
377 try testType(u1024, 1 << 1023);
378
379 try testType(i1025, -1 << 1024);
380 try testType(i1025, -1);
381 try testType(i1025, 0);
382 try testType(u1025, 0);
383 try testType(u1025, 1 << 0);
384 try testType(u1025, 1 << 1);
385 try testType(u1025, 1 << 1023);
386 try testType(u1025, 1 << 1024);
387
388 try testType(@Vector(3, i0), .{ 0 << 0, 0, 0 });
389 try testType(@Vector(3, u0), .{ 0, 0, 0 << 0 });
390
391 try testType(@Vector(3, i1), .{ -1 << 0, -1, 0 });
392 try testType(@Vector(3, u1), .{ 0, 1, 1 << 0 });
393
394 try testType(@Vector(3, i2), .{ -1 << 1, -1, 0 });
395 try testType(@Vector(3, u2), .{ 0, 1, 1 << 1 });
396
397 try testType(@Vector(3, i3), .{ -1 << 2, -1, 0 });
398 try testType(@Vector(3, u3), .{ 0, 1, 1 << 2 });
399
400 try testType(@Vector(3, i4), .{ -1 << 3, -1, 0 });
401 try testType(@Vector(3, u4), .{ 0, 1, 1 << 3 });
402 try testType(@Vector(1, u4), .{
403 0xb,
404 });
405 try testType(@Vector(2, u4), .{
406 0x3, 0x4,
407 });
408 try testType(@Vector(4, u4), .{
409 0x9, 0x2, 0xf, 0xe,
410 });
411 try testType(@Vector(8, u4), .{
412 0x8, 0x1, 0xb, 0x1, 0xf, 0x5, 0x9, 0x6,
413 });
414 try testType(@Vector(16, u4), .{
415 0xb, 0x6, 0x0, 0x7, 0x8, 0x5, 0x6, 0x9, 0xe, 0xb, 0x3, 0xa, 0xb, 0x5, 0x8, 0xc,
416 });
417 try testType(@Vector(32, u4), .{
418 0xe, 0x6, 0xe, 0xa, 0xb, 0x4, 0xa, 0xb, 0x1, 0x3, 0xb, 0xc, 0x0, 0xb, 0x9, 0x4, 0xd, 0xa, 0xd, 0xd, 0x4, 0x8, 0x8, 0x6, 0xb, 0xe, 0x9, 0x6, 0xc, 0xd, 0x5, 0xd,
419 });
420 try testType(@Vector(64, u4), .{
421 0x1, 0xc, 0xe, 0x9, 0x9, 0xf, 0x3, 0xf, 0x9, 0x9, 0x5, 0x3, 0xb, 0xd, 0xd, 0xf, 0x1, 0x2, 0xf, 0x9, 0x4, 0x4, 0x8, 0x9, 0x2, 0x9, 0x8, 0xe, 0x8, 0xa, 0x4, 0x3,
422 0x4, 0xc, 0xb, 0x6, 0x4, 0x0, 0xa, 0x5, 0x1, 0xa, 0x4, 0xe, 0xa, 0x7, 0xd, 0x0, 0x4, 0xe, 0xe, 0x7, 0x7, 0xa, 0x4, 0x5, 0x6, 0xc, 0x6, 0x2, 0x6, 0xa, 0xe, 0xa,
423 });
424 try testType(@Vector(128, u4), .{
425 0xd, 0x5, 0x6, 0xe, 0x3, 0x3, 0x3, 0xe, 0xd, 0xd, 0x9, 0x0, 0x0, 0xe, 0xa, 0x9, 0x8, 0x7, 0xb, 0x5, 0x7, 0xf, 0xb, 0x8, 0x0, 0xf, 0xb, 0x3, 0xa, 0x2, 0xb, 0xc,
426 0x1, 0x1, 0xc, 0x8, 0x8, 0x6, 0x9, 0x1, 0xb, 0x0, 0x2, 0xb, 0x2, 0x2, 0x7, 0x6, 0x1, 0x1, 0xb, 0x4, 0x6, 0x4, 0x7, 0xc, 0xd, 0xc, 0xa, 0x8, 0x1, 0x7, 0x8, 0xa,
427 0x9, 0xa, 0x1, 0x8, 0x1, 0x7, 0x9, 0x4, 0x5, 0x9, 0xd, 0x0, 0xa, 0xf, 0x3, 0x3, 0x9, 0x2, 0xf, 0x5, 0xb, 0x8, 0x6, 0xb, 0xf, 0x5, 0x8, 0x3, 0x9, 0xf, 0x6, 0x8,
428 0xc, 0x8, 0x3, 0x4, 0xa, 0xe, 0xc, 0x1, 0xe, 0x9, 0x1, 0x8, 0xf, 0x6, 0xc, 0xc, 0x6, 0xf, 0x6, 0xd, 0xb, 0x9, 0xc, 0x3, 0xd, 0xa, 0x6, 0x8, 0x4, 0xa, 0x6, 0x9,
429 });
430 try testType(@Vector(256, u4), .{
431 0x6, 0xc, 0xe, 0x3, 0x8, 0x2, 0xb, 0xd, 0x3, 0xa, 0x3, 0x8, 0xb, 0x8, 0x3, 0x0, 0xb, 0x5, 0x1, 0x3, 0x2, 0x2, 0xf, 0xc, 0x5, 0x1, 0x3, 0xb, 0x1, 0xc, 0x2, 0xd,
432 0xa, 0x8, 0x1, 0xc, 0xb, 0xa, 0x3, 0x1, 0xe, 0x4, 0xf, 0xb, 0xd, 0x8, 0xf, 0xa, 0xc, 0xb, 0xb, 0x0, 0xa, 0xc, 0xf, 0xe, 0x8, 0xd, 0x9, 0x3, 0xa, 0xe, 0x8, 0x7,
433 0x5, 0xa, 0x0, 0xe, 0x0, 0xd, 0x2, 0x2, 0x9, 0x4, 0x8, 0x9, 0x0, 0x4, 0x4, 0x8, 0xe, 0x1, 0xf, 0x1, 0x9, 0x3, 0xf, 0xc, 0xa, 0x0, 0x3, 0x2, 0x4, 0x1, 0x2, 0x3,
434 0xf, 0x2, 0x7, 0xb, 0x5, 0x0, 0xd, 0x3, 0x4, 0xf, 0xa, 0x3, 0xc, 0x2, 0x5, 0xe, 0x7, 0x5, 0xd, 0x7, 0x9, 0x0, 0xd, 0x7, 0x9, 0xd, 0x5, 0x7, 0xf, 0xd, 0xb, 0x4,
435 0x9, 0x6, 0xf, 0xb, 0x1, 0xb, 0x6, 0xb, 0xf, 0x7, 0xf, 0x0, 0x4, 0x7, 0x5, 0xa, 0x8, 0x1, 0xf, 0x9, 0x9, 0x0, 0x6, 0xb, 0x1, 0x2, 0x4, 0x3, 0x2, 0x0, 0x7, 0x0,
436 0x6, 0x7, 0xf, 0x1, 0xe, 0xa, 0x8, 0x2, 0x9, 0xc, 0x1, 0x5, 0x7, 0x1, 0xb, 0x0, 0x1, 0x3, 0xd, 0x3, 0x0, 0x1, 0xa, 0x0, 0x3, 0x7, 0x1, 0x2, 0xb, 0xc, 0x2, 0x9,
437 0x8, 0x8, 0x7, 0x0, 0xd, 0x5, 0x1, 0x5, 0x7, 0x7, 0x2, 0x3, 0x8, 0x7, 0xc, 0x8, 0xf, 0xa, 0xf, 0xf, 0x3, 0x2, 0x0, 0x4, 0x7, 0x5, 0x6, 0xd, 0x6, 0x3, 0xa, 0x4,
438 0x1, 0x1, 0x2, 0xc, 0x3, 0xe, 0x2, 0xc, 0x7, 0x6, 0xe, 0xf, 0xb, 0x8, 0x6, 0x6, 0x9, 0x0, 0x4, 0xb, 0xe, 0x4, 0x2, 0x7, 0xf, 0xc, 0x0, 0x6, 0xd, 0xa, 0xe, 0xc,
439 });
440
441 try testType(@Vector(3, i5), .{ -1 << 4, -1, 0 });
442 try testType(@Vector(3, u5), .{ 0, 1, 1 << 4 });
443
444 try testType(@Vector(3, i7), .{ -1 << 6, -1, 0 });
445 try testType(@Vector(3, u7), .{ 0, 1, 1 << 6 });
446
447 try testType(@Vector(3, i8), .{ -1 << 7, -1, 0 });
448 try testType(@Vector(3, u8), .{ 0, 1, 1 << 7 });
449 try testType(@Vector(1, u8), .{
450 0x33,
451 });
452 try testType(@Vector(2, u8), .{
453 0x66, 0x87,
454 });
455 try testType(@Vector(4, u8), .{
456 0x9d, 0xcb, 0x30, 0x7b,
457 });
458 try testType(@Vector(8, u8), .{
459 0x4b, 0x35, 0x3f, 0x5c, 0xa5, 0x91, 0x23, 0x6d,
460 });
461 try testType(@Vector(16, u8), .{
462 0xb7, 0x57, 0x27, 0x29, 0x58, 0xf8, 0xc9, 0x6c, 0xbe, 0x41, 0xf4, 0xd7, 0x4d, 0x01, 0xf0, 0x37,
463 });
464 try testType(@Vector(32, u8), .{
465 0x5f, 0x61, 0x34, 0xe8, 0x37, 0x12, 0xba, 0x5a, 0x85, 0xf3, 0x3e, 0xa2, 0x0f, 0xd0, 0x65, 0xae,
466 0xed, 0xf5, 0xe8, 0x65, 0x61, 0x28, 0x4a, 0x27, 0x2e, 0x01, 0x40, 0x8c, 0xe3, 0x36, 0x5d, 0xb6,
467 });
468 try testType(@Vector(64, u8), .{
469 0xb0, 0x19, 0x5c, 0xc2, 0x3b, 0x16, 0x70, 0xad, 0x26, 0x45, 0xf2, 0xe1, 0x4f, 0x0f, 0x01, 0x72,
470 0x7f, 0x1f, 0x07, 0x9e, 0xee, 0x9b, 0xb3, 0x38, 0x50, 0xf3, 0x56, 0x73, 0xd0, 0xd1, 0xee, 0xe3,
471 0xeb, 0xf3, 0x1b, 0xe0, 0x77, 0x78, 0x75, 0xc6, 0x19, 0xe4, 0x69, 0xaa, 0x73, 0x08, 0xcd, 0x0c,
472 0xf9, 0xed, 0x94, 0xf8, 0x79, 0x86, 0x63, 0x31, 0xbf, 0xd1, 0xe3, 0x17, 0x2b, 0xb9, 0xa1, 0x72,
473 });
474 try testType(@Vector(128, u8), .{
475 0x2e, 0x93, 0x87, 0x09, 0x4f, 0x68, 0x14, 0xab, 0x3f, 0x04, 0x86, 0xc1, 0x95, 0xe8, 0x74, 0x11,
476 0x57, 0x25, 0xe1, 0x88, 0xc0, 0x96, 0x33, 0x99, 0x15, 0x86, 0x2c, 0x84, 0x2e, 0xd7, 0x57, 0x21,
477 0xd3, 0x18, 0xd5, 0x0e, 0xb4, 0x60, 0xe2, 0x08, 0xce, 0xbc, 0xd5, 0x4d, 0x8f, 0x59, 0x01, 0x67,
478 0x71, 0x0a, 0x74, 0x48, 0xef, 0x39, 0x49, 0x7e, 0xa8, 0x39, 0x34, 0x75, 0x95, 0x3b, 0x38, 0xea,
479 0x60, 0xd7, 0xed, 0x8f, 0xbb, 0xc0, 0x7d, 0xc2, 0x79, 0x2d, 0xbf, 0xa5, 0x64, 0xf4, 0x09, 0x86,
480 0xfb, 0x29, 0xfe, 0xc7, 0xff, 0x62, 0x1a, 0x6f, 0xf8, 0xbd, 0xfe, 0xa4, 0xac, 0x24, 0xcf, 0x56,
481 0x82, 0x69, 0x81, 0x0d, 0xc1, 0x51, 0x8d, 0x85, 0xf4, 0x00, 0xe7, 0x25, 0xab, 0xa5, 0x33, 0x45,
482 0x66, 0x2e, 0x33, 0xc8, 0xf3, 0x35, 0x16, 0x7d, 0x1f, 0xc9, 0xf7, 0x44, 0xab, 0x66, 0x28, 0x0d,
483 });
484
485 try testType(@Vector(3, i9), .{ -1 << 8, -1, 0 });
486 try testType(@Vector(3, u9), .{ 0, 1, 1 << 8 });
487
488 try testType(@Vector(3, i15), .{ -1 << 14, -1, 0 });
489 try testType(@Vector(3, u15), .{ 0, 1, 1 << 14 });
490
491 try testType(@Vector(3, i16), .{ -1 << 15, -1, 0 });
492 try testType(@Vector(3, u16), .{ 0, 1, 1 << 15 });
493 try testType(@Vector(1, u16), .{
494 0x4da6,
495 });
496 try testType(@Vector(2, u16), .{
497 0x04d7, 0x50c6,
498 });
499 try testType(@Vector(4, u16), .{
500 0x4c06, 0xd71f, 0x4d8f, 0xe0a4,
501 });
502 try testType(@Vector(8, u16), .{
503 0xee9a, 0x881d, 0x31fb, 0xd3f7, 0x2c74, 0x6949, 0x4e04, 0x53d7,
504 });
505 try testType(@Vector(16, u16), .{
506 0xeafe, 0x9a7b, 0x0d6f, 0x18cb, 0xaf8f, 0x8ee4, 0xa47e, 0xd39a,
507 0x6572, 0x9c53, 0xf36e, 0x982e, 0x41c1, 0x8682, 0xf5dc, 0x7e01,
508 });
509 try testType(@Vector(32, u16), .{
510 0xdfb3, 0x7de6, 0xd9ed, 0xb42e, 0x95ac, 0x9b5b, 0x0422, 0xdfcd,
511 0x6196, 0x4dbe, 0x1818, 0x8816, 0x75e7, 0xc9b0, 0x92f7, 0x1f71,
512 0xe584, 0x576c, 0x043a, 0x0f31, 0xfc4c, 0x2c87, 0x6b02, 0x0229,
513 0x25b7, 0x53cd, 0x9bab, 0x866b, 0x9008, 0xf0f3, 0xeb21, 0x88e2,
514 });
515 try testType(@Vector(64, u16), .{
516 0x084c, 0x445f, 0xce89, 0xd3ee, 0xb399, 0x315d, 0x8ef8, 0x4f6f,
517 0xf9af, 0xcbc4, 0x0332, 0xcd55, 0xa4dc, 0xbc38, 0x6e33, 0x8ead,
518 0xd15a, 0x5057, 0x58ef, 0x657a, 0xe9f0, 0x1418, 0x2b62, 0x3387,
519 0x1c15, 0x04e1, 0x0276, 0x3783, 0xad9c, 0xea9a, 0x0e5e, 0xe803,
520 0x2ee7, 0x0cf1, 0x30f1, 0xb12a, 0x381b, 0x353d, 0xf637, 0xf853,
521 0x2ac1, 0x7ce8, 0x6a50, 0xcbb8, 0xc9b8, 0x9b25, 0xd1e9, 0xeff0,
522 0xc0a2, 0x8e51, 0xde7a, 0x4e58, 0x5685, 0xeb3f, 0xd29b, 0x66ed,
523 0x3dd5, 0xcb59, 0x6003, 0xf710, 0x943a, 0x7276, 0xe547, 0xe48f,
524 });
525
526 try testType(@Vector(3, i17), .{ -1 << 16, -1, 0 });
527 try testType(@Vector(3, u17), .{ 0, 1, 1 << 16 });
528
529 try testType(@Vector(3, i31), .{ -1 << 30, -1, 0 });
530 try testType(@Vector(3, u31), .{ 0, 1, 1 << 30 });
531
532 try testType(@Vector(3, i32), .{ -1 << 31, -1, 0 });
533 try testType(@Vector(3, u32), .{ 0, 1, 1 << 31 });
534 try testType(@Vector(1, u32), .{
535 0x17e2805c,
536 });
537 try testType(@Vector(2, u32), .{
538 0xdb6aadc5, 0xb1ff3754,
539 });
540 try testType(@Vector(4, u32), .{
541 0xf7897b31, 0x342e1af9, 0x190fd76b, 0x283b5374,
542 });
543 try testType(@Vector(8, u32), .{
544 0x81a0bd16, 0xc55da94e, 0x910f7e7c, 0x078d5ef7,
545 0x0bdb1e4a, 0xf1a96e99, 0xcdd729b5, 0xe6966a1c,
546 });
547 try testType(@Vector(16, u32), .{
548 0xfee812db, 0x29eacbed, 0xaed48136, 0x3053de13,
549 0xbbda20df, 0x6faa274a, 0xe0b5ec3a, 0x1878b0dc,
550 0x98204475, 0x810d8d05, 0x1e6996b6, 0xc543826a,
551 0x53b47d8c, 0xc72c3142, 0x12f7e1f9, 0xf6782e54,
552 });
553 try testType(@Vector(32, u32), .{
554 0xf0cf30d3, 0xe3c587b8, 0xcee44739, 0xe4a0bd72,
555 0x41d44cce, 0x6d7c4259, 0xd85580a5, 0xec4b02d7,
556 0xa366483d, 0x2d7b59d4, 0xe9c0ace4, 0x82cb441c,
557 0xa23958ba, 0x04a70148, 0x3f0d20a3, 0xf9e21e37,
558 0x009fce8b, 0x4a34a229, 0xf09c35cf, 0xc0977d4d,
559 0xcc4d4647, 0xa30f1363, 0x27a65b14, 0xe572c785,
560 0x8f42e320, 0x2b2cdeca, 0x11205bd4, 0x739d26aa,
561 0xcbcc2df0, 0x5f7a3649, 0xbde1b7aa, 0x180a169f,
562 });
563
564 try testType(@Vector(3, i33), .{ -1 << 32, -1, 0 });
565 try testType(@Vector(3, u33), .{ 0, 1, 1 << 32 });
566
567 try testType(@Vector(3, i63), .{ -1 << 62, -1, 0 });
568 try testType(@Vector(3, u63), .{ 0, 1, 1 << 62 });
569
570 try testType(@Vector(3, i64), .{ -1 << 63, -1, 0 });
571 try testType(@Vector(3, u64), .{ 0, 1, 1 << 63 });
572 try testType(@Vector(1, u64), .{
573 0x7d2e439abb0edba7,
574 });
575 try testType(@Vector(2, u64), .{
576 0x3749ee5a2d237b9f, 0x6d8f4c3e1378f389,
577 });
578 try testType(@Vector(4, u64), .{
579 0x03c127040e10d52b, 0xa86fe019072e27eb,
580 0x0a554a47b709cdba, 0xf4342cc597e196c3,
581 });
582 try testType(@Vector(8, u64), .{
583 0xea455c104375a055, 0x5c35d9d945edb2fa,
584 0xc11b73d9d9d546fc, 0x2a9d63aae838dd5b,
585 0xed6603f1f5d574b3, 0x2f37b354c81c1e56,
586 0xbe7f5e2476bc76bd, 0xb0c88eacfffa9a8f,
587 });
588 try testType(@Vector(16, u64), .{
589 0x2258fc04b31f8dbe, 0x3a2e5483003a10d8,
590 0xebf24b31c0460510, 0x15d5b4c09b53ffa5,
591 0x05abf6e744b17cc6, 0x9747b483f2d159fe,
592 0x4616d8b2c8673125, 0x8ae3f91d422447eb,
593 0x18da2f101a9e9776, 0x77a1197fb0441007,
594 0x4ba480c8ec2dd10b, 0xeb99b9c0a1725278,
595 0xd9d0acc5084ecdf0, 0xa0a23317fff4f515,
596 0x0901c59a9a6a408b, 0x7c77ca72e25df033,
597 });
598
599 try testType(@Vector(3, i65), .{ -1 << 64, -1, 0 });
600 try testType(@Vector(3, u65), .{ 0, 1, 1 << 64 });
601
602 try testType(@Vector(3, i127), .{ -1 << 126, -1, 0 });
603 try testType(@Vector(3, u127), .{ 0, 1, 1 << 126 });
604
605 try testType(@Vector(3, i128), .{ -1 << 127, -1, 0 });
606 try testType(@Vector(3, u128), .{ 0, 1, 1 << 127 });
607 try testType(@Vector(1, u128), .{
608 0x809f29e7fbafadc01145e1732590e7d9,
609 });
610 try testType(@Vector(2, u128), .{
611 0x5150ac3438aacd0d51132cc2723b2995,
612 0x151be9c47ad29cf719cf8358dd40165c,
613 });
614 try testType(@Vector(4, u128), .{
615 0x4bae22df929f2f7cb9bd84deaad3e7a8,
616 0x1ed46b2d6e1f3569f56b2ac33d8bc1cb,
617 0xae93ea459d2ccfd5fb794e6d5c31aabb,
618 0xb1177136acf099f550b70949ac202ec4,
619 });
620 try testType(@Vector(8, u128), .{
621 0x7cd78db6baed6bfdf8c5265136c4e0fd,
622 0xa41b8984c6bbde84640068194b7eba98,
623 0xd33102778f2ae1a48d1e9bf8801bbbf0,
624 0x0d59f6de003513a60055c86cbce2c200,
625 0x825579d90012afddfbf04851c0748561,
626 0xc2647c885e9d6f0ee1f5fac5da8ef7f5,
627 0xcb4bbc1f81aa8ee68aa4dc140745687b,
628 0x4ff10f914f74b46c694407f5bf7c7836,
629 });
630
631 try testType(@Vector(3, i129), .{ -1 << 128, -1, 0 });
632 try testType(@Vector(3, u129), .{ 0, 1, 1 << 128 });
633
634 try testType(@Vector(3, i191), .{ -1 << 190, -1, 0 });
635 try testType(@Vector(3, u191), .{ 0, 1, 1 << 190 });
636
637 try testType(@Vector(3, i192), .{ -1 << 191, -1, 0 });
638 try testType(@Vector(3, u192), .{ 0, 1, 1 << 191 });
639 try testType(@Vector(1, u192), .{
640 0xe7baafcb9781626a77571b0539b9471a60c97d6c02106c8b,
641 });
642 try testType(@Vector(2, u192), .{
643 0xbc9510913ed09e2c2aa50ffab9f1bc7b303a87f36e232a83,
644 0x1f37bee446d7712d1ad457c47a66812cb926198d052aee65,
645 });
646 try testType(@Vector(4, u192), .{
647 0xdca6a7cfc19c69efc34022062a8ca36f2569ab3dce001202,
648 0xd25a4529e621c9084181fdb6917c6a32eccc58b63601b35d,
649 0x0a258afd6debbaf8c158f1caa61fed63b31871d13f51b43d,
650 0x6b40a178674fcb82c623ac322f851623d5e993dac97a219a,
651 });
652
653 try testType(@Vector(3, i193), .{ -1 << 192, -1, 0 });
654 try testType(@Vector(3, u193), .{ 0, 1, 1 << 192 });
655
656 try testType(@Vector(3, i255), .{ -1 << 254, -1, 0 });
657 try testType(@Vector(3, u255), .{ 0, 1, 1 << 254 });
658
659 try testType(@Vector(3, i256), .{ -1 << 255, -1, 0 });
660 try testType(@Vector(3, u256), .{ 0, 1, 1 << 255 });
661 try testType(@Vector(1, u256), .{
662 0x230413bb481fa3a997796acf282010c560d1942e7339fd584a0f15a90c83fbda,
663 });
664 try testType(@Vector(2, u256), .{
665 0x3ad569f8d91fdbc9da8ec0e933565919f2feb90b996c90c352b461aa0908e62d,
666 0x0f109696d64647983f1f757042515510729ad1350e862cbf38cb73b5cf99f0f7,
667 });
668 try testType(@Vector(4, u256), .{
669 0x1717c6ded4ac6de282d59f75f068da47d5a47a30f2c5053d2d59e715f9d28b97,
670 0x3087189ce7540e2e0028b80af571ebc6353a00b2917f243a869ed29ecca0adaa,
671 0x1507c6a9d104684bf503cdb08841cf91adab4644306bd67aafff5326604833ce,
672 0x857e134ff9179733c871295b25f824bd3eb562977bad30890964fa0cdc15bb07,
673 });
674
675 try testType(@Vector(3, i257), .{ -1 << 256, -1, 0 });
676 try testType(@Vector(3, u257), .{ 0, 1, 1 << 256 });
677
678 try testType(@Vector(3, i511), .{ -1 << 510, -1, 0 });
679 try testType(@Vector(3, u511), .{ 0, 1, 1 << 510 });
680
681 try testType(@Vector(3, i512), .{ -1 << 511, -1, 0 });
682 try testType(@Vector(3, u512), .{ 0, 1, 1 << 511 });
683 try testType(@Vector(1, u512), .{
684 0xa3ff51a609f1370e5eeb96b05169bf7469e465cf76ac5b4ea8ffd166c1ba3cd94f2dedf0d647a1fe424f3a06e6d7940f03e257f28100970b00bd5528c52b9ae6,
685 });
686 try testType(@Vector(2, u512), .{
687 0xc6d43cd46ae31ab71f9468a895c83bf17516c6b2f1c9b04b9aa113bf7fe1b789eb7d95fcf951f12a9a6f2124589551efdd8c00f528b366a7bfb852faf8f3da53,
688 0xc9099d2bdf8d1a0d30485ec6db4a24cbc0d89a863de30e18313ee1d66f71dd2d26235caaa703286cf4a2b51e1a12ef96d2d944c66c0bd3f0d72dd4cf0fc8100e,
689 });
690
691 try testType(@Vector(3, i513), .{ -1 << 512, -1, 0 });
692 try testType(@Vector(3, u513), .{ 0, 1, 1 << 512 });
693
694 try testType(@Vector(3, i1023), .{ -1 << 1022, -1, 0 });
695 try testType(@Vector(3, u1023), .{ 0, 1, 1 << 1022 });
696
697 try testType(@Vector(3, i1024), .{ -1 << 1023, -1, 0 });
698 try testType(@Vector(3, u1024), .{ 0, 1, 1 << 1023 });
699 try testType(@Vector(1, u1024), .{
700 0xc6cfaa6571139552e1f067402dfc131d9b9a58aafda97198a78764b05138fb68cf26f085b7652f3d5ae0e56aa21732f296a581bb411d4a73795c213de793489fa49b173b9f5c089aa6295ff1fcdc14d491a05035b45d08fc35cd67a83d887a02b8db512f07518132e0ba56533c7d6fbe958255eddf5649bd8aba288c0dd84a25,
701 });
702
703 try testType(@Vector(3, i1025), .{ -1 << 1024, -1, 0 });
704 try testType(@Vector(3, u1025), .{ 0, 1, 1 << 1024 });
21 fn testIntTypes() !void {
22 try testArgs(i1, -1);
23 try testArgs(i1, 0);
24 try testArgs(u1, 0);
25 try testArgs(u1, 1 << 0);
26
27 try testArgs(i2, -1 << 1);
28 try testArgs(i2, -1);
29 try testArgs(i2, 0);
30 try testArgs(u2, 0);
31 try testArgs(u2, 1 << 0);
32 try testArgs(u2, 1 << 1);
33
34 try testArgs(i3, -1 << 2);
35 try testArgs(i3, -1);
36 try testArgs(i3, 0);
37 try testArgs(u3, 0);
38 try testArgs(u3, 1 << 0);
39 try testArgs(u3, 1 << 1);
40 try testArgs(u3, 1 << 2);
41
42 try testArgs(i4, -1 << 3);
43 try testArgs(i4, -1);
44 try testArgs(i4, 0);
45 try testArgs(u4, 0);
46 try testArgs(u4, 1 << 0);
47 try testArgs(u4, 1 << 1);
48 try testArgs(u4, 1 << 2);
49 try testArgs(u4, 1 << 3);
50
51 try testArgs(i5, -1 << 4);
52 try testArgs(i5, -1);
53 try testArgs(i5, 0);
54 try testArgs(u5, 0);
55 try testArgs(u5, 1 << 0);
56 try testArgs(u5, 1 << 1);
57 try testArgs(u5, 1 << 3);
58 try testArgs(u5, 1 << 4);
59
60 try testArgs(i7, -1 << 6);
61 try testArgs(i7, -1);
62 try testArgs(i7, 0);
63 try testArgs(u7, 0);
64 try testArgs(u7, 1 << 0);
65 try testArgs(u7, 1 << 1);
66 try testArgs(u7, 1 << 5);
67 try testArgs(u7, 1 << 6);
68
69 try testArgs(i8, -1 << 7);
70 try testArgs(i8, -1);
71 try testArgs(i8, 0);
72 try testArgs(u8, 0);
73 try testArgs(u8, 1 << 0);
74 try testArgs(u8, 1 << 1);
75 try testArgs(u8, 1 << 6);
76 try testArgs(u8, 1 << 7);
77
78 try testArgs(i9, -1 << 8);
79 try testArgs(i9, -1);
80 try testArgs(i9, 0);
81 try testArgs(u9, 0);
82 try testArgs(u9, 1 << 0);
83 try testArgs(u9, 1 << 1);
84 try testArgs(u9, 1 << 7);
85 try testArgs(u9, 1 << 8);
86
87 try testArgs(i15, -1 << 14);
88 try testArgs(i15, -1);
89 try testArgs(i15, 0);
90 try testArgs(u15, 0);
91 try testArgs(u15, 1 << 0);
92 try testArgs(u15, 1 << 1);
93 try testArgs(u15, 1 << 13);
94 try testArgs(u15, 1 << 14);
95
96 try testArgs(i16, -1 << 15);
97 try testArgs(i16, -1);
98 try testArgs(i16, 0);
99 try testArgs(u16, 0);
100 try testArgs(u16, 1 << 0);
101 try testArgs(u16, 1 << 1);
102 try testArgs(u16, 1 << 14);
103 try testArgs(u16, 1 << 15);
104
105 try testArgs(i17, -1 << 16);
106 try testArgs(i17, -1);
107 try testArgs(i17, 0);
108 try testArgs(u17, 0);
109 try testArgs(u17, 1 << 0);
110 try testArgs(u17, 1 << 1);
111 try testArgs(u17, 1 << 15);
112 try testArgs(u17, 1 << 16);
113
114 try testArgs(i31, -1 << 30);
115 try testArgs(i31, -1);
116 try testArgs(i31, 0);
117 try testArgs(u31, 0);
118 try testArgs(u31, 1 << 0);
119 try testArgs(u31, 1 << 1);
120 try testArgs(u31, 1 << 29);
121 try testArgs(u31, 1 << 30);
122
123 try testArgs(i32, -1 << 31);
124 try testArgs(i32, -1);
125 try testArgs(i32, 0);
126 try testArgs(u32, 0);
127 try testArgs(u32, 1 << 0);
128 try testArgs(u32, 1 << 1);
129 try testArgs(u32, 1 << 30);
130 try testArgs(u32, 1 << 31);
131
132 try testArgs(i33, -1 << 32);
133 try testArgs(i33, -1);
134 try testArgs(i33, 0);
135 try testArgs(u33, 0);
136 try testArgs(u33, 1 << 0);
137 try testArgs(u33, 1 << 1);
138 try testArgs(u33, 1 << 31);
139 try testArgs(u33, 1 << 32);
140
141 try testArgs(i63, -1 << 62);
142 try testArgs(i63, -1);
143 try testArgs(i63, 0);
144 try testArgs(u63, 0);
145 try testArgs(u63, 1 << 0);
146 try testArgs(u63, 1 << 1);
147 try testArgs(u63, 1 << 61);
148 try testArgs(u63, 1 << 62);
149
150 try testArgs(i64, -1 << 63);
151 try testArgs(i64, -1);
152 try testArgs(i64, 0);
153 try testArgs(u64, 0);
154 try testArgs(u64, 1 << 0);
155 try testArgs(u64, 1 << 1);
156 try testArgs(u64, 1 << 62);
157 try testArgs(u64, 1 << 63);
158
159 try testArgs(i65, -1 << 64);
160 try testArgs(i65, -1);
161 try testArgs(i65, 0);
162 try testArgs(u65, 0);
163 try testArgs(u65, 1 << 0);
164 try testArgs(u65, 1 << 1);
165 try testArgs(u65, 1 << 63);
166 try testArgs(u65, 1 << 64);
167
168 try testArgs(i95, -1 << 94);
169 try testArgs(i95, -1);
170 try testArgs(i95, 0);
171 try testArgs(u95, 0);
172 try testArgs(u95, 1 << 0);
173 try testArgs(u95, 1 << 1);
174 try testArgs(u95, 1 << 93);
175 try testArgs(u95, 1 << 94);
176
177 try testArgs(i96, -1 << 95);
178 try testArgs(i96, -1);
179 try testArgs(i96, 0);
180 try testArgs(u96, 0);
181 try testArgs(u96, 1 << 0);
182 try testArgs(u96, 1 << 1);
183 try testArgs(u96, 1 << 94);
184 try testArgs(u96, 1 << 95);
185
186 try testArgs(i97, -1 << 96);
187 try testArgs(i97, -1);
188 try testArgs(i97, 0);
189 try testArgs(u97, 0);
190 try testArgs(u97, 1 << 0);
191 try testArgs(u97, 1 << 1);
192 try testArgs(u97, 1 << 95);
193 try testArgs(u97, 1 << 96);
194
195 try testArgs(i127, -1 << 126);
196 try testArgs(i127, -1);
197 try testArgs(i127, 0);
198 try testArgs(u127, 0);
199 try testArgs(u127, 1 << 0);
200 try testArgs(u127, 1 << 1);
201 try testArgs(u127, 1 << 125);
202 try testArgs(u127, 1 << 126);
203
204 try testArgs(i128, -1 << 127);
205 try testArgs(i128, -1);
206 try testArgs(i128, 0);
207 try testArgs(u128, 0);
208 try testArgs(u128, 1 << 0);
209 try testArgs(u128, 1 << 1);
210 try testArgs(u128, 1 << 126);
211 try testArgs(u128, 1 << 127);
212
213 try testArgs(i129, -1 << 128);
214 try testArgs(i129, -1);
215 try testArgs(i129, 0);
216 try testArgs(u129, 0);
217 try testArgs(u129, 1 << 0);
218 try testArgs(u129, 1 << 1);
219 try testArgs(u129, 1 << 127);
220 try testArgs(u129, 1 << 128);
221
222 try testArgs(i159, -1 << 158);
223 try testArgs(i159, -1);
224 try testArgs(i159, 0);
225 try testArgs(u159, 0);
226 try testArgs(u159, 1 << 0);
227 try testArgs(u159, 1 << 1);
228 try testArgs(u159, 1 << 157);
229 try testArgs(u159, 1 << 158);
230
231 try testArgs(i160, -1 << 159);
232 try testArgs(i160, -1);
233 try testArgs(i160, 0);
234 try testArgs(u160, 0);
235 try testArgs(u160, 1 << 0);
236 try testArgs(u160, 1 << 1);
237 try testArgs(u160, 1 << 158);
238 try testArgs(u160, 1 << 159);
239
240 try testArgs(i161, -1 << 160);
241 try testArgs(i161, -1);
242 try testArgs(i161, 0);
243 try testArgs(u161, 0);
244 try testArgs(u161, 1 << 0);
245 try testArgs(u161, 1 << 1);
246 try testArgs(u161, 1 << 159);
247 try testArgs(u161, 1 << 160);
248
249 try testArgs(i191, -1 << 190);
250 try testArgs(i191, -1);
251 try testArgs(i191, 0);
252 try testArgs(u191, 0);
253 try testArgs(u191, 1 << 0);
254 try testArgs(u191, 1 << 1);
255 try testArgs(u191, 1 << 189);
256 try testArgs(u191, 1 << 190);
257
258 try testArgs(i192, -1 << 191);
259 try testArgs(i192, -1);
260 try testArgs(i192, 0);
261 try testArgs(u192, 0);
262 try testArgs(u192, 1 << 0);
263 try testArgs(u192, 1 << 1);
264 try testArgs(u192, 1 << 190);
265 try testArgs(u192, 1 << 191);
266
267 try testArgs(i193, -1 << 192);
268 try testArgs(i193, -1);
269 try testArgs(i193, 0);
270 try testArgs(u193, 0);
271 try testArgs(u193, 1 << 0);
272 try testArgs(u193, 1 << 1);
273 try testArgs(u193, 1 << 191);
274 try testArgs(u193, 1 << 192);
275
276 try testArgs(i223, -1 << 222);
277 try testArgs(i223, -1);
278 try testArgs(i223, 0);
279 try testArgs(u223, 0);
280 try testArgs(u223, 1 << 0);
281 try testArgs(u223, 1 << 1);
282 try testArgs(u223, 1 << 221);
283 try testArgs(u223, 1 << 222);
284
285 try testArgs(i224, -1 << 223);
286 try testArgs(i224, -1);
287 try testArgs(i224, 0);
288 try testArgs(u224, 0);
289 try testArgs(u224, 1 << 0);
290 try testArgs(u224, 1 << 1);
291 try testArgs(u224, 1 << 222);
292 try testArgs(u224, 1 << 223);
293
294 try testArgs(i225, -1 << 224);
295 try testArgs(i225, -1);
296 try testArgs(i225, 0);
297 try testArgs(u225, 0);
298 try testArgs(u225, 1 << 0);
299 try testArgs(u225, 1 << 1);
300 try testArgs(u225, 1 << 223);
301 try testArgs(u225, 1 << 224);
302
303 try testArgs(i255, -1 << 254);
304 try testArgs(i255, -1);
305 try testArgs(i255, 0);
306 try testArgs(u255, 0);
307 try testArgs(u255, 1 << 0);
308 try testArgs(u255, 1 << 1);
309 try testArgs(u255, 1 << 253);
310 try testArgs(u255, 1 << 254);
311
312 try testArgs(i256, -1 << 255);
313 try testArgs(i256, -1);
314 try testArgs(i256, 0);
315 try testArgs(u256, 0);
316 try testArgs(u256, 1 << 0);
317 try testArgs(u256, 1 << 1);
318 try testArgs(u256, 1 << 254);
319 try testArgs(u256, 1 << 255);
320
321 try testArgs(i257, -1 << 256);
322 try testArgs(i257, -1);
323 try testArgs(i257, 0);
324 try testArgs(u257, 0);
325 try testArgs(u257, 1 << 0);
326 try testArgs(u257, 1 << 1);
327 try testArgs(u257, 1 << 255);
328 try testArgs(u257, 1 << 256);
329
330 try testArgs(i511, -1 << 510);
331 try testArgs(i511, -1);
332 try testArgs(i511, 0);
333 try testArgs(u511, 0);
334 try testArgs(u511, 1 << 0);
335 try testArgs(u511, 1 << 1);
336 try testArgs(u511, 1 << 509);
337 try testArgs(u511, 1 << 510);
338
339 try testArgs(i512, -1 << 511);
340 try testArgs(i512, -1);
341 try testArgs(i512, 0);
342 try testArgs(u512, 0);
343 try testArgs(u512, 1 << 0);
344 try testArgs(u512, 1 << 1);
345 try testArgs(u512, 1 << 510);
346 try testArgs(u512, 1 << 511);
347
348 try testArgs(i513, -1 << 512);
349 try testArgs(i513, -1);
350 try testArgs(i513, 0);
351 try testArgs(u513, 0);
352 try testArgs(u513, 1 << 0);
353 try testArgs(u513, 1 << 1);
354 try testArgs(u513, 1 << 511);
355 try testArgs(u513, 1 << 512);
356
357 try testArgs(i1023, -1 << 1022);
358 try testArgs(i1023, -1);
359 try testArgs(i1023, 0);
360 try testArgs(u1023, 0);
361 try testArgs(u1023, 1 << 0);
362 try testArgs(u1023, 1 << 1);
363 try testArgs(u1023, 1 << 1021);
364 try testArgs(u1023, 1 << 1022);
365
366 try testArgs(i1024, -1 << 1023);
367 try testArgs(i1024, -1);
368 try testArgs(i1024, 0);
369 try testArgs(u1024, 0);
370 try testArgs(u1024, 1 << 0);
371 try testArgs(u1024, 1 << 1);
372 try testArgs(u1024, 1 << 1022);
373 try testArgs(u1024, 1 << 1023);
374
375 try testArgs(i1025, -1 << 1024);
376 try testArgs(i1025, -1);
377 try testArgs(i1025, 0);
378 try testArgs(u1025, 0);
379 try testArgs(u1025, 1 << 0);
380 try testArgs(u1025, 1 << 1);
381 try testArgs(u1025, 1 << 1023);
382 try testArgs(u1025, 1 << 1024);
383 }
384 fn testIntVectorTypes() !void {
385 try testArgs(@Vector(3, i1), .{ -1 << 0, -1, 0 });
386 try testArgs(@Vector(3, u1), .{ 0, 1, 1 << 0 });
387
388 try testArgs(@Vector(3, i2), .{ -1 << 1, -1, 0 });
389 try testArgs(@Vector(3, u2), .{ 0, 1, 1 << 1 });
390
391 try testArgs(@Vector(3, i3), .{ -1 << 2, -1, 0 });
392 try testArgs(@Vector(3, u3), .{ 0, 1, 1 << 2 });
393
394 try testArgs(@Vector(3, i4), .{ -1 << 3, -1, 0 });
395 try testArgs(@Vector(1, i4), .{
396 -0x2,
397 });
398 try testArgs(@Vector(2, i4), .{
399 -0x7, 0x4,
400 });
401 try testArgs(@Vector(4, i4), .{
402 -0x3, 0x4, 0x2, -0x2,
403 });
404 try testArgs(@Vector(8, i4), .{
405 -0x6, 0x3, 0x4, 0x3, 0x4, -0x8, -0x3, -0x5,
406 });
407 try testArgs(@Vector(16, i4), .{
408 -0x3, 0x5, 0x4, -0x1, 0x2, 0x7, 0x1, 0x0, -0x2, 0x6, -0x1, -0x3, 0x5, -0x3, 0x3, -0x7,
409 });
410 try testArgs(@Vector(32, i4), .{
411 -0x4, -0x2, 0x6, 0x6, -0x5, -0x8, -0x8, 0x7, -0x5, -0x5, 0x4, 0x5, -0x6, -0x1, 0x2, 0x0, -0x1, 0x3, 0x5, 0x1, -0x4, 0x2, -0x8, -0x6, -0x1, 0x3, 0x1, -0x8, 0x5, -0x6, 0x0, 0x2,
412 });
413 try testArgs(@Vector(64, i4), .{
414 -0x2, 0x6, -0x5, 0x2, 0x6, -0x5, 0x1, -0x6, -0x6, 0x3, -0x5, 0x5, 0x0, 0x3, -0x6, -0x2, 0x0, -0x5, -0x2, -0x7, 0x6, 0x6, -0x6, 0x5, -0x1, 0x1, -0x5, 0x4, -0x1, 0x2, 0x5, 0x0,
415 0x6, -0x1, -0x3, -0x1, 0x0, 0x0, -0x2, -0x5, 0x7, 0x4, -0x7, 0x4, -0x8, 0x2, -0x1, -0x5, 0x4, -0x6, -0x3, 0x6, -0x6, 0x5, 0x0, 0x6, -0x3, 0x3, -0x4, -0x4, 0x3, -0x6, -0x5, -0x3,
416 });
417 try testArgs(@Vector(128, i4), .{
418 -0x2, 0x7, -0x7, 0x5, 0x4, -0x8, -0x4, 0x2, -0x6, 0x6, 0x3, 0x4, -0x6, -0x3, 0x1, -0x3, 0x4, -0x4, 0x0, -0x5, 0x4, -0x2, 0x4, -0x6, 0x4, 0x7, -0x6, 0x3, -0x6, 0x5, 0x7, -0x7,
419 -0x8, 0x0, 0x2, -0x6, -0x4, 0x5, -0x2, -0x6, 0x2, -0x3, -0x8, -0x3, -0x1, 0x4, 0x7, -0x2, 0x7, -0x3, 0x5, 0x3, -0x6, 0x5, -0x2, -0x5, -0x1, 0x5, -0x6, -0x2, -0x5, -0x4, -0x7, -0x3,
420 -0x4, -0x4, 0x6, -0x8, -0x2, 0x3, 0x1, 0x7, 0x1, -0x2, -0x7, -0x2, -0x8, -0x6, -0x6, 0x0, -0x3, -0x4, 0x3, -0x5, -0x3, -0x5, 0x6, 0x5, -0x7, -0x8, -0x5, -0x6, -0x2, -0x5, 0x5, -0x5,
421 0x0, -0x6, -0x3, 0x0, 0x7, 0x6, -0x6, -0x7, -0x4, -0x5, 0x3, 0x2, 0x7, -0x3, -0x2, 0x4, -0x4, -0x5, 0x6, 0x1, 0x7, -0x5, -0x6, 0x0, 0x0, -0x8, 0x4, -0x1, -0x7, 0x0, 0x0, 0x5,
422 });
423 try testArgs(@Vector(256, i4), .{
424 -0x7, 0x4, 0x7, -0x5, 0x6, -0x2, 0x6, -0x5, 0x5, 0x5, 0x3, -0x3, -0x5, 0x0, 0x5, 0x1, 0x4, -0x1, 0x4, -0x8, -0x4, -0x8, 0x2, -0x8, 0x3, 0x1, -0x7, -0x3, -0x1, 0x5, -0x5, -0x8,
425 -0x3, -0x3, -0x5, 0x6, 0x0, 0x4, -0x3, -0x5, 0x0, 0x5, -0x1, -0x3, -0x4, -0x3, 0x6, -0x3, -0x1, 0x5, -0x3, -0x3, 0x0, 0x3, -0x2, -0x1, -0x5, 0x3, 0x2, -0x8, 0x7, -0x8, 0x6, 0x4,
426 -0x5, -0x4, 0x5, 0x5, 0x6, -0x3, 0x2, -0x4, 0x3, 0x7, 0x6, -0x2, -0x8, -0x1, -0x8, 0x2, 0x4, 0x1, 0x2, -0x1, 0x5, 0x1, 0x3, 0x1, 0x3, -0x5, 0x3, -0x5, -0x5, 0x5, -0x6, -0x7,
427 0x0, 0x0, -0x3, 0x6, 0x0, 0x5, 0x3, 0x0, 0x0, -0x1, -0x6, -0x4, 0x5, -0x8, -0x4, -0x3, -0x3, 0x2, -0x5, -0x4, 0x4, 0x5, -0x6, -0x3, 0x2, 0x5, -0x7, -0x6, 0x3, 0x7, -0x2, 0x6,
428 0x2, 0x3, 0x7, 0x3, 0x2, -0x5, 0x4, 0x5, -0x4, -0x7, 0x2, 0x2, -0x5, 0x7, -0x3, -0x8, 0x2, -0x4, 0x2, 0x4, 0x5, -0x7, 0x7, -0x6, 0x4, -0x8, -0x1, 0x7, 0x0, -0x4, 0x6, -0x8,
429 -0x5, 0x4, -0x5, 0x1, 0x6, -0x8, -0x1, -0x3, -0x5, 0x7, 0x1, 0x0, -0x3, 0x4, -0x5, -0x7, -0x5, 0x2, 0x0, -0x1, -0x4, 0x0, 0x5, 0x6, -0x3, -0x4, -0x2, 0x4, -0x1, -0x8, 0x0, 0x6,
430 0x7, 0x1, 0x5, 0x2, -0x4, -0x7, -0x3, -0x3, -0x8, -0x8, -0x3, -0x4, 0x5, -0x5, -0x2, -0x2, 0x1, 0x1, 0x1, -0x8, 0x5, 0x4, 0x5, 0x6, 0x3, 0x0, -0x2, -0x1, 0x4, -0x4, -0x5, 0x0,
431 -0x7, -0x8, -0x2, 0x1, 0x5, 0x4, 0x5, -0x7, 0x3, 0x2, 0x2, 0x5, -0x3, 0x7, -0x4, 0x0, -0x3, -0x2, -0x5, 0x1, 0x1, -0x4, -0x4, 0x1, -0x8, -0x3, 0x6, -0x8, -0x2, 0x5, 0x7, -0x3,
432 });
433
434 try testArgs(@Vector(3, u4), .{ 0, 1, 1 << 3 });
435 try testArgs(@Vector(1, u4), .{
436 0xb,
437 });
438 try testArgs(@Vector(2, u4), .{
439 0x3, 0x4,
440 });
441 try testArgs(@Vector(4, u4), .{
442 0x9, 0x2, 0xf, 0xe,
443 });
444 try testArgs(@Vector(8, u4), .{
445 0x8, 0x1, 0xb, 0x1, 0xf, 0x5, 0x9, 0x6,
446 });
447 try testArgs(@Vector(16, u4), .{
448 0xb, 0x6, 0x0, 0x7, 0x8, 0x5, 0x6, 0x9, 0xe, 0xb, 0x3, 0xa, 0xb, 0x5, 0x8, 0xc,
449 });
450 try testArgs(@Vector(32, u4), .{
451 0xe, 0x6, 0xe, 0xa, 0xb, 0x4, 0xa, 0xb, 0x1, 0x3, 0xb, 0xc, 0x0, 0xb, 0x9, 0x4, 0xd, 0xa, 0xd, 0xd, 0x4, 0x8, 0x8, 0x6, 0xb, 0xe, 0x9, 0x6, 0xc, 0xd, 0x5, 0xd,
452 });
453 try testArgs(@Vector(64, u4), .{
454 0x1, 0xc, 0xe, 0x9, 0x9, 0xf, 0x3, 0xf, 0x9, 0x9, 0x5, 0x3, 0xb, 0xd, 0xd, 0xf, 0x1, 0x2, 0xf, 0x9, 0x4, 0x4, 0x8, 0x9, 0x2, 0x9, 0x8, 0xe, 0x8, 0xa, 0x4, 0x3,
455 0x4, 0xc, 0xb, 0x6, 0x4, 0x0, 0xa, 0x5, 0x1, 0xa, 0x4, 0xe, 0xa, 0x7, 0xd, 0x0, 0x4, 0xe, 0xe, 0x7, 0x7, 0xa, 0x4, 0x5, 0x6, 0xc, 0x6, 0x2, 0x6, 0xa, 0xe, 0xa,
456 });
457 try testArgs(@Vector(128, u4), .{
458 0xd, 0x5, 0x6, 0xe, 0x3, 0x3, 0x3, 0xe, 0xd, 0xd, 0x9, 0x0, 0x0, 0xe, 0xa, 0x9, 0x8, 0x7, 0xb, 0x5, 0x7, 0xf, 0xb, 0x8, 0x0, 0xf, 0xb, 0x3, 0xa, 0x2, 0xb, 0xc,
459 0x1, 0x1, 0xc, 0x8, 0x8, 0x6, 0x9, 0x1, 0xb, 0x0, 0x2, 0xb, 0x2, 0x2, 0x7, 0x6, 0x1, 0x1, 0xb, 0x4, 0x6, 0x4, 0x7, 0xc, 0xd, 0xc, 0xa, 0x8, 0x1, 0x7, 0x8, 0xa,
460 0x9, 0xa, 0x1, 0x8, 0x1, 0x7, 0x9, 0x4, 0x5, 0x9, 0xd, 0x0, 0xa, 0xf, 0x3, 0x3, 0x9, 0x2, 0xf, 0x5, 0xb, 0x8, 0x6, 0xb, 0xf, 0x5, 0x8, 0x3, 0x9, 0xf, 0x6, 0x8,
461 0xc, 0x8, 0x3, 0x4, 0xa, 0xe, 0xc, 0x1, 0xe, 0x9, 0x1, 0x8, 0xf, 0x6, 0xc, 0xc, 0x6, 0xf, 0x6, 0xd, 0xb, 0x9, 0xc, 0x3, 0xd, 0xa, 0x6, 0x8, 0x4, 0xa, 0x6, 0x9,
462 });
463 try testArgs(@Vector(256, u4), .{
464 0x6, 0xc, 0xe, 0x3, 0x8, 0x2, 0xb, 0xd, 0x3, 0xa, 0x3, 0x8, 0xb, 0x8, 0x3, 0x0, 0xb, 0x5, 0x1, 0x3, 0x2, 0x2, 0xf, 0xc, 0x5, 0x1, 0x3, 0xb, 0x1, 0xc, 0x2, 0xd,
465 0xa, 0x8, 0x1, 0xc, 0xb, 0xa, 0x3, 0x1, 0xe, 0x4, 0xf, 0xb, 0xd, 0x8, 0xf, 0xa, 0xc, 0xb, 0xb, 0x0, 0xa, 0xc, 0xf, 0xe, 0x8, 0xd, 0x9, 0x3, 0xa, 0xe, 0x8, 0x7,
466 0x5, 0xa, 0x0, 0xe, 0x0, 0xd, 0x2, 0x2, 0x9, 0x4, 0x8, 0x9, 0x0, 0x4, 0x4, 0x8, 0xe, 0x1, 0xf, 0x1, 0x9, 0x3, 0xf, 0xc, 0xa, 0x0, 0x3, 0x2, 0x4, 0x1, 0x2, 0x3,
467 0xf, 0x2, 0x7, 0xb, 0x5, 0x0, 0xd, 0x3, 0x4, 0xf, 0xa, 0x3, 0xc, 0x2, 0x5, 0xe, 0x7, 0x5, 0xd, 0x7, 0x9, 0x0, 0xd, 0x7, 0x9, 0xd, 0x5, 0x7, 0xf, 0xd, 0xb, 0x4,
468 0x9, 0x6, 0xf, 0xb, 0x1, 0xb, 0x6, 0xb, 0xf, 0x7, 0xf, 0x0, 0x4, 0x7, 0x5, 0xa, 0x8, 0x1, 0xf, 0x9, 0x9, 0x0, 0x6, 0xb, 0x1, 0x2, 0x4, 0x3, 0x2, 0x0, 0x7, 0x0,
469 0x6, 0x7, 0xf, 0x1, 0xe, 0xa, 0x8, 0x2, 0x9, 0xc, 0x1, 0x5, 0x7, 0x1, 0xb, 0x0, 0x1, 0x3, 0xd, 0x3, 0x0, 0x1, 0xa, 0x0, 0x3, 0x7, 0x1, 0x2, 0xb, 0xc, 0x2, 0x9,
470 0x8, 0x8, 0x7, 0x0, 0xd, 0x5, 0x1, 0x5, 0x7, 0x7, 0x2, 0x3, 0x8, 0x7, 0xc, 0x8, 0xf, 0xa, 0xf, 0xf, 0x3, 0x2, 0x0, 0x4, 0x7, 0x5, 0x6, 0xd, 0x6, 0x3, 0xa, 0x4,
471 0x1, 0x1, 0x2, 0xc, 0x3, 0xe, 0x2, 0xc, 0x7, 0x6, 0xe, 0xf, 0xb, 0x8, 0x6, 0x6, 0x9, 0x0, 0x4, 0xb, 0xe, 0x4, 0x2, 0x7, 0xf, 0xc, 0x0, 0x6, 0xd, 0xa, 0xe, 0xc,
472 });
473
474 try testArgs(@Vector(3, i5), .{ -1 << 4, -1, 0 });
475 try testArgs(@Vector(3, u5), .{ 0, 1, 1 << 4 });
476
477 try testArgs(@Vector(3, i7), .{ -1 << 6, -1, 0 });
478 try testArgs(@Vector(3, u7), .{ 0, 1, 1 << 6 });
479
480 try testArgs(@Vector(3, i8), .{ -1 << 7, -1, 0 });
481 try testArgs(@Vector(1, i8), .{
482 0x71,
483 });
484 try testArgs(@Vector(2, i8), .{
485 -0x50, -0x43,
486 });
487 try testArgs(@Vector(4, i8), .{
488 -0x09, -0x19, -0x15, -0x5d,
489 });
490 try testArgs(@Vector(8, i8), .{
491 -0x4f, -0x55, -0x5b, -0x23, -0x76, 0x36, 0x6f, -0x63,
492 });
493 try testArgs(@Vector(16, i8), .{
494 0x24, -0x03, 0x2e, 0x7b, 0x68, 0x29, 0x6c, 0x7f, -0x2f, -0x3b, -0x11, -0x3c, -0x2e, 0x27, -0x45, 0x45,
495 });
496 try testArgs(@Vector(32, i8), .{
497 0x70, 0x33, -0x28, -0x38, -0x3b, 0x44, -0x1d, 0x7d, -0x48, 0x3c, 0x61, -0x09, -0x49, 0x15, 0x0a, -0x5a,
498 0x78, 0x11, -0x07, -0x23, 0x4a, -0x72, 0x25, -0x17, -0x51, -0x04, 0x55, 0x20, -0x80, -0x3d, 0x59, -0x39,
499 });
500 try testArgs(@Vector(64, i8), .{
501 0x4f, 0x40, -0x62, -0x4f, 0x37, -0x06, -0x33, 0x4d, -0x10, 0x55, 0x24, -0x76, 0x1d, 0x2b, -0x54, -0x0f,
502 0x21, -0x4c, -0x74, -0x07, 0x23, -0x5a, -0x21, -0x4a, -0x7c, -0x16, -0x20, -0x2e, 0x0a, 0x15, 0x03, 0x44,
503 0x19, -0x27, 0x3e, 0x61, 0x6e, -0x76, 0x2a, 0x74, -0x21, 0x34, -0x69, -0x18, -0x21, -0x61, -0x34, -0x02,
504 0x5e, -0x36, -0x79, -0x0f, 0x26, 0x6e, 0x5f, 0x52, -0x0f, -0x64, 0x1a, 0x74, -0x37, 0x00, -0x47, -0x57,
505 });
506 try testArgs(@Vector(128, i8), .{
507 -0x38, -0x19, 0x51, 0x09, 0x76, -0x3b, -0x33, 0x39, 0x67, 0x51, 0x10, 0x77, 0x24, 0x21, 0x6f, -0x1a,
508 0x4e, -0x69, 0x2e, -0x78, -0x06, 0x5c, 0x17, 0x2e, -0x0e, -0x2e, 0x09, 0x2a, -0x5f, -0x40, -0x64, 0x3f,
509 0x4a, -0x77, -0x54, 0x38, 0x6b, 0x1f, -0x04, 0x40, 0x27, -0x0c, 0x65, -0x46, 0x49, -0x69, -0x53, 0x64,
510 0x13, -0x33, 0x3a, -0x10, -0x15, 0x7f, -0x1c, 0x5e, -0x22, 0x2f, -0x75, 0x77, 0x22, 0x6b, -0x32, -0x55,
511 0x18, 0x19, 0x2c, -0x27, -0x03, 0x4f, 0x07, 0x0b, 0x44, -0x21, 0x79, 0x55, -0x65, 0x1d, -0x29, 0x2f,
512 0x4a, 0x6f, -0x40, -0x57, -0x2f, 0x42, 0x52, 0x68, -0x2a, -0x6b, 0x6f, -0x49, -0x32, 0x52, 0x1e, -0x60,
513 -0x80, 0x53, 0x5e, 0x73, -0x1e, 0x2d, -0x46, -0x27, 0x4b, 0x57, 0x1f, 0x6a, -0x65, 0x5f, -0x2b, -0x03,
514 -0x3a, -0x76, -0x51, 0x20, 0x04, -0x0a, 0x2b, -0x04, -0x1e, -0x18, -0x2d, 0x53, -0x58, -0x69, 0x16, 0x19,
515 });
516
517 try testArgs(@Vector(3, u8), .{ 0, 1, 1 << 7 });
518 try testArgs(@Vector(1, u8), .{
519 0x33,
520 });
521 try testArgs(@Vector(2, u8), .{
522 0x66, 0x87,
523 });
524 try testArgs(@Vector(4, u8), .{
525 0x9d, 0xcb, 0x30, 0x7b,
526 });
527 try testArgs(@Vector(8, u8), .{
528 0x4b, 0x35, 0x3f, 0x5c, 0xa5, 0x91, 0x23, 0x6d,
529 });
530 try testArgs(@Vector(16, u8), .{
531 0xb7, 0x57, 0x27, 0x29, 0x58, 0xf8, 0xc9, 0x6c, 0xbe, 0x41, 0xf4, 0xd7, 0x4d, 0x01, 0xf0, 0x37,
532 });
533 try testArgs(@Vector(32, u8), .{
534 0x5f, 0x61, 0x34, 0xe8, 0x37, 0x12, 0xba, 0x5a, 0x85, 0xf3, 0x3e, 0xa2, 0x0f, 0xd0, 0x65, 0xae,
535 0xed, 0xf5, 0xe8, 0x65, 0x61, 0x28, 0x4a, 0x27, 0x2e, 0x01, 0x40, 0x8c, 0xe3, 0x36, 0x5d, 0xb6,
536 });
537 try testArgs(@Vector(64, u8), .{
538 0xb0, 0x19, 0x5c, 0xc2, 0x3b, 0x16, 0x70, 0xad, 0x26, 0x45, 0xf2, 0xe1, 0x4f, 0x0f, 0x01, 0x72,
539 0x7f, 0x1f, 0x07, 0x9e, 0xee, 0x9b, 0xb3, 0x38, 0x50, 0xf3, 0x56, 0x73, 0xd0, 0xd1, 0xee, 0xe3,
540 0xeb, 0xf3, 0x1b, 0xe0, 0x77, 0x78, 0x75, 0xc6, 0x19, 0xe4, 0x69, 0xaa, 0x73, 0x08, 0xcd, 0x0c,
541 0xf9, 0xed, 0x94, 0xf8, 0x79, 0x86, 0x63, 0x31, 0xbf, 0xd1, 0xe3, 0x17, 0x2b, 0xb9, 0xa1, 0x72,
542 });
543 try testArgs(@Vector(128, u8), .{
544 0x2e, 0x93, 0x87, 0x09, 0x4f, 0x68, 0x14, 0xab, 0x3f, 0x04, 0x86, 0xc1, 0x95, 0xe8, 0x74, 0x11,
545 0x57, 0x25, 0xe1, 0x88, 0xc0, 0x96, 0x33, 0x99, 0x15, 0x86, 0x2c, 0x84, 0x2e, 0xd7, 0x57, 0x21,
546 0xd3, 0x18, 0xd5, 0x0e, 0xb4, 0x60, 0xe2, 0x08, 0xce, 0xbc, 0xd5, 0x4d, 0x8f, 0x59, 0x01, 0x67,
547 0x71, 0x0a, 0x74, 0x48, 0xef, 0x39, 0x49, 0x7e, 0xa8, 0x39, 0x34, 0x75, 0x95, 0x3b, 0x38, 0xea,
548 0x60, 0xd7, 0xed, 0x8f, 0xbb, 0xc0, 0x7d, 0xc2, 0x79, 0x2d, 0xbf, 0xa5, 0x64, 0xf4, 0x09, 0x86,
549 0xfb, 0x29, 0xfe, 0xc7, 0xff, 0x62, 0x1a, 0x6f, 0xf8, 0xbd, 0xfe, 0xa4, 0xac, 0x24, 0xcf, 0x56,
550 0x82, 0x69, 0x81, 0x0d, 0xc1, 0x51, 0x8d, 0x85, 0xf4, 0x00, 0xe7, 0x25, 0xab, 0xa5, 0x33, 0x45,
551 0x66, 0x2e, 0x33, 0xc8, 0xf3, 0x35, 0x16, 0x7d, 0x1f, 0xc9, 0xf7, 0x44, 0xab, 0x66, 0x28, 0x0d,
552 });
553
554 try testArgs(@Vector(3, i9), .{ -1 << 8, -1, 0 });
555 try testArgs(@Vector(3, u9), .{ 0, 1, 1 << 8 });
556
557 try testArgs(@Vector(3, i15), .{ -1 << 14, -1, 0 });
558 try testArgs(@Vector(3, u15), .{ 0, 1, 1 << 14 });
559
560 try testArgs(@Vector(3, i16), .{ -1 << 15, -1, 0 });
561 try testArgs(@Vector(1, i16), .{
562 -0x015a,
563 });
564 try testArgs(@Vector(2, i16), .{
565 -0x1c2f, 0x5ce8,
566 });
567 try testArgs(@Vector(4, i16), .{
568 0x1212, 0x5bfc, -0x20ea, 0x0993,
569 });
570 try testArgs(@Vector(8, i16), .{
571 0x4d55, -0x0dfb, -0x7921, 0x7e20, 0x74a5, -0x7371, -0x08e0, 0x7f23,
572 });
573 try testArgs(@Vector(16, i16), .{
574 0x2354, -0x048a, -0x3ef9, 0x29d4, 0x4e5e, -0x3da9, -0x0cc4, -0x0377,
575 0x4d44, 0x4384, -0x1e46, 0x0bf1, 0x3151, -0x57c6, -0x367e, -0x7ae5,
576 });
577 try testArgs(@Vector(32, i16), .{
578 0x5b5a, -0x54c4, -0x2089, -0x448d, 0x38e8, -0x36a5, -0x0a8f, 0x06e0,
579 0x09d9, 0x3877, 0x33c8, 0x5d3a, 0x018b, 0x29c9, 0x6f59, -0x4078,
580 0x6be4, -0x249e, 0x43b3, -0x0389, 0x545e, 0x6ed7, 0x6636, 0x587d,
581 0x55b0, -0x608b, 0x72e0, 0x4dfd, -0x051d, 0x7433, -0x7fc2, 0x2de3,
582 });
583 try testArgs(@Vector(64, i16), .{
584 0x7834, -0x43f9, -0x1cb3, -0x05f2, 0x25b5, 0x55f2, 0x4cfb, -0x58bb,
585 0x7292, -0x082e, -0x5a6e, 0x1fc8, -0x1f49, 0x7e3c, 0x4aa5, -0x617e,
586 0x2fab, -0x2b96, 0x7474, -0x6644, -0x5484, -0x278e, -0x6a0e, -0x5210,
587 0x1adf, -0x2799, 0x61e0, -0x733c, -0x6bcc, -0x6fe2, -0x4e91, 0x5d01,
588 0x3745, 0x24eb, 0x6c89, 0x4a94, -0x7339, 0x4907, -0x4f8f, -0x7e39,
589 0x1a32, 0x65ca, -0x6c27, -0x3269, 0x107b, 0x1c53, -0x5529, 0x5232,
590 -0x26ec, 0x4442, -0x63f5, -0x174a, 0x3033, -0x7363, 0x58be, 0x239f,
591 0x7f7b, -0x437d, -0x6df6, 0x0a7b, 0x3faa, -0x1d75, -0x7426, 0x1274,
592 });
593
594 try testArgs(@Vector(3, u16), .{ 0, 1, 1 << 15 });
595 try testArgs(@Vector(1, u16), .{
596 0x4da6,
597 });
598 try testArgs(@Vector(2, u16), .{
599 0x04d7, 0x50c6,
600 });
601 try testArgs(@Vector(4, u16), .{
602 0x4c06, 0xd71f, 0x4d8f, 0xe0a4,
603 });
604 try testArgs(@Vector(8, u16), .{
605 0xee9a, 0x881d, 0x31fb, 0xd3f7, 0x2c74, 0x6949, 0x4e04, 0x53d7,
606 });
607 try testArgs(@Vector(16, u16), .{
608 0xeafe, 0x9a7b, 0x0d6f, 0x18cb, 0xaf8f, 0x8ee4, 0xa47e, 0xd39a,
609 0x6572, 0x9c53, 0xf36e, 0x982e, 0x41c1, 0x8682, 0xf5dc, 0x7e01,
610 });
611 try testArgs(@Vector(32, u16), .{
612 0xdfb3, 0x7de6, 0xd9ed, 0xb42e, 0x95ac, 0x9b5b, 0x0422, 0xdfcd,
613 0x6196, 0x4dbe, 0x1818, 0x8816, 0x75e7, 0xc9b0, 0x92f7, 0x1f71,
614 0xe584, 0x576c, 0x043a, 0x0f31, 0xfc4c, 0x2c87, 0x6b02, 0x0229,
615 0x25b7, 0x53cd, 0x9bab, 0x866b, 0x9008, 0xf0f3, 0xeb21, 0x88e2,
616 });
617 try testArgs(@Vector(64, u16), .{
618 0x084c, 0x445f, 0xce89, 0xd3ee, 0xb399, 0x315d, 0x8ef8, 0x4f6f,
619 0xf9af, 0xcbc4, 0x0332, 0xcd55, 0xa4dc, 0xbc38, 0x6e33, 0x8ead,
620 0xd15a, 0x5057, 0x58ef, 0x657a, 0xe9f0, 0x1418, 0x2b62, 0x3387,
621 0x1c15, 0x04e1, 0x0276, 0x3783, 0xad9c, 0xea9a, 0x0e5e, 0xe803,
622 0x2ee7, 0x0cf1, 0x30f1, 0xb12a, 0x381b, 0x353d, 0xf637, 0xf853,
623 0x2ac1, 0x7ce8, 0x6a50, 0xcbb8, 0xc9b8, 0x9b25, 0xd1e9, 0xeff0,
624 0xc0a2, 0x8e51, 0xde7a, 0x4e58, 0x5685, 0xeb3f, 0xd29b, 0x66ed,
625 0x3dd5, 0xcb59, 0x6003, 0xf710, 0x943a, 0x7276, 0xe547, 0xe48f,
626 });
627
628 try testArgs(@Vector(3, i17), .{ -1 << 16, -1, 0 });
629 try testArgs(@Vector(3, u17), .{ 0, 1, 1 << 16 });
630
631 try testArgs(@Vector(3, i31), .{ -1 << 30, -1, 0 });
632 try testArgs(@Vector(3, u31), .{ 0, 1, 1 << 30 });
633
634 try testArgs(@Vector(3, i32), .{ -1 << 31, -1, 0 });
635 try testArgs(@Vector(1, i32), .{
636 -0x27f49dce,
637 });
638 try testArgs(@Vector(2, i32), .{
639 0x24641ec7, 0x436c5bd2,
640 });
641 try testArgs(@Vector(4, i32), .{
642 0x59e5eff1, -0x46b5b8db, -0x1029efa7, -0x1937fe73,
643 });
644 try testArgs(@Vector(8, i32), .{
645 0x0ca01401, -0x46b2bc0c, 0x51e5dee7, -0x74edfde8,
646 -0x0ab09a6a, -0x5a51a88b, 0x18c28bc2, 0x63d79966,
647 });
648 try testArgs(@Vector(16, i32), .{
649 0x3900e6c8, 0x2408c2bb, 0x5e01bc6e, -0x0eb8c400,
650 0x4c0dc6c2, 0x6c75e7f5, -0x66632ca8, 0x0e978daf,
651 0x61ffe725, 0x720253e4, -0x6f6c38c1, -0x3302e60a,
652 0x43f53c92, 0x5a3c1075, 0x7044a110, 0x18e41ad8,
653 });
654 try testArgs(@Vector(32, i32), .{
655 0x3a5c2b01, 0x2a52d9fa, -0x5843fc47, 0x6c493c7d,
656 -0x47937cb1, -0x3ad95ec4, 0x71cf5e7b, -0x3b6719c2,
657 0x06bace17, -0x6ccda5ed, 0x42b9ed04, 0x6be2b287,
658 -0x7cf56523, -0x3c98e2e4, 0x1e7db6c0, -0x7e668ad2,
659 -0x6c245ecf, -0x09842450, -0x403a4335, -0x7a68e9b7,
660 0x0036cf57, -0x251edb4e, -0x67ec3abf, -0x183f0333,
661 -0x4b46723c, -0x1e5383d6, 0x188c1de3, 0x400b3648,
662 -0x4b21d9d3, 0x61635257, 0x179eb187, 0x31cd8376,
663 });
664
665 try testArgs(@Vector(3, u32), .{ 0, 1, 1 << 31 });
666 try testArgs(@Vector(1, u32), .{
667 0x17e2805c,
668 });
669 try testArgs(@Vector(2, u32), .{
670 0xdb6aadc5, 0xb1ff3754,
671 });
672 try testArgs(@Vector(4, u32), .{
673 0xf7897b31, 0x342e1af9, 0x190fd76b, 0x283b5374,
674 });
675 try testArgs(@Vector(8, u32), .{
676 0x81a0bd16, 0xc55da94e, 0x910f7e7c, 0x078d5ef7,
677 0x0bdb1e4a, 0xf1a96e99, 0xcdd729b5, 0xe6966a1c,
678 });
679 try testArgs(@Vector(16, u32), .{
680 0xfee812db, 0x29eacbed, 0xaed48136, 0x3053de13,
681 0xbbda20df, 0x6faa274a, 0xe0b5ec3a, 0x1878b0dc,
682 0x98204475, 0x810d8d05, 0x1e6996b6, 0xc543826a,
683 0x53b47d8c, 0xc72c3142, 0x12f7e1f9, 0xf6782e54,
684 });
685 try testArgs(@Vector(32, u32), .{
686 0xf0cf30d3, 0xe3c587b8, 0xcee44739, 0xe4a0bd72,
687 0x41d44cce, 0x6d7c4259, 0xd85580a5, 0xec4b02d7,
688 0xa366483d, 0x2d7b59d4, 0xe9c0ace4, 0x82cb441c,
689 0xa23958ba, 0x04a70148, 0x3f0d20a3, 0xf9e21e37,
690 0x009fce8b, 0x4a34a229, 0xf09c35cf, 0xc0977d4d,
691 0xcc4d4647, 0xa30f1363, 0x27a65b14, 0xe572c785,
692 0x8f42e320, 0x2b2cdeca, 0x11205bd4, 0x739d26aa,
693 0xcbcc2df0, 0x5f7a3649, 0xbde1b7aa, 0x180a169f,
694 });
695
696 try testArgs(@Vector(3, i33), .{ -1 << 32, -1, 0 });
697 try testArgs(@Vector(3, u33), .{ 0, 1, 1 << 32 });
698
699 try testArgs(@Vector(3, i63), .{ -1 << 62, -1, 0 });
700 try testArgs(@Vector(3, u63), .{ 0, 1, 1 << 62 });
701
702 try testArgs(@Vector(3, i64), .{ -1 << 63, -1, 0 });
703 try testArgs(@Vector(1, i64), .{
704 0x29113011488d8b65,
705 });
706 try testArgs(@Vector(2, i64), .{
707 -0x3f865dcdfd831d03, -0x35512d15095445d6,
708 });
709 try testArgs(@Vector(4, i64), .{
710 0x6f37a9484440251e, 0x2757e5e2b77e6ef3,
711 0x4903a91bd2993d0b, 0x162244ba22371f62,
712 });
713 try testArgs(@Vector(8, i64), .{
714 -0x46e2340c765175c1, -0x031ee2297e6cc8b3,
715 -0x2627434d4b4fb796, 0x525e1ef31b6daa46,
716 0x72d8eaaea07fa5ea, 0x2a8c0c36da019448,
717 -0x5419ebf5cd514cde, -0x618c56a881057ac4,
718 });
719 try testArgs(@Vector(16, i64), .{
720 0x36b4a703d084c774, 0x07a500f0d603a4d5,
721 -0x27387989d2450cdd, 0x02073880984d74c8,
722 -0x18d1593e36724417, -0x79df283cc6f403d8,
723 0x36838a7c54da5f2b, -0x2bf76c1666a1b768,
724 -0x6ace0d64a2757edc, 0x41442e9979a0ab64,
725 0x002612bfdf419826, 0x1128ba5648d22fe8,
726 0x49b0f67e0abb8f3b, 0x6bf3e9ac37f73cf3,
727 -0x5c89f516258c7e77, 0x6b345f04e60d2e56,
728 });
729
730 try testArgs(@Vector(3, u64), .{ 0, 1, 1 << 63 });
731 try testArgs(@Vector(1, u64), .{
732 0x7d2e439abb0edba7,
733 });
734 try testArgs(@Vector(2, u64), .{
735 0x3749ee5a2d237b9f, 0x6d8f4c3e1378f389,
736 });
737 try testArgs(@Vector(4, u64), .{
738 0x03c127040e10d52b, 0xa86fe019072e27eb,
739 0x0a554a47b709cdba, 0xf4342cc597e196c3,
740 });
741 try testArgs(@Vector(8, u64), .{
742 0xea455c104375a055, 0x5c35d9d945edb2fa,
743 0xc11b73d9d9d546fc, 0x2a9d63aae838dd5b,
744 0xed6603f1f5d574b3, 0x2f37b354c81c1e56,
745 0xbe7f5e2476bc76bd, 0xb0c88eacfffa9a8f,
746 });
747 try testArgs(@Vector(16, u64), .{
748 0x2258fc04b31f8dbe, 0x3a2e5483003a10d8,
749 0xebf24b31c0460510, 0x15d5b4c09b53ffa5,
750 0x05abf6e744b17cc6, 0x9747b483f2d159fe,
751 0x4616d8b2c8673125, 0x8ae3f91d422447eb,
752 0x18da2f101a9e9776, 0x77a1197fb0441007,
753 0x4ba480c8ec2dd10b, 0xeb99b9c0a1725278,
754 0xd9d0acc5084ecdf0, 0xa0a23317fff4f515,
755 0x0901c59a9a6a408b, 0x7c77ca72e25df033,
756 });
757
758 try testArgs(@Vector(3, i65), .{ -1 << 64, -1, 0 });
759 try testArgs(@Vector(3, u65), .{ 0, 1, 1 << 64 });
760
761 try testArgs(@Vector(3, i127), .{ -1 << 126, -1, 0 });
762 try testArgs(@Vector(3, u127), .{ 0, 1, 1 << 126 });
763
764 try testArgs(@Vector(3, i128), .{ -1 << 127, -1, 0 });
765 try testArgs(@Vector(1, i128), .{
766 -0x2b0b1462b44785f39d1b7d763ec7bdb2,
767 });
768 try testArgs(@Vector(2, i128), .{
769 -0x2faebe898a6fe60fbc6aadc3623431b7,
770 0x5e596259e7b2588860d2b470ba751ace,
771 });
772 try testArgs(@Vector(4, i128), .{
773 -0x624cb7e74cf789c06121809a3a5b51ba,
774 0x23af4553d4d64672795c2b949635426f,
775 -0x0b598b1f94876757fb13f2198e902b13,
776 0x1daf732f50654d8211d464fda4fc030c,
777 });
778 try testArgs(@Vector(8, i128), .{
779 -0x03c7df38daee9bc9a2c659a1a124ef10,
780 0x657a590c91905c4021c28b0d6e42304a,
781 -0x3f5176206dadc974d10e6fcbd67f3d29,
782 0x066310ace384b1bc3549c71113b96b8a,
783 -0x6c0201f66583206fcea7b7fe11889644,
784 -0x5cc4d2a368002b380b25415be83f8218,
785 0x11156c91b97a6a93427009efebcb2c31,
786 -0x4221b5249ed0686c2ff2d5cab9f1c362,
787 });
788
789 try testArgs(@Vector(3, u128), .{ 0, 1, 1 << 127 });
790 try testArgs(@Vector(1, u128), .{
791 0x809f29e7fbafadc01145e1732590e7d9,
792 });
793 try testArgs(@Vector(2, u128), .{
794 0x5150ac3438aacd0d51132cc2723b2995,
795 0x151be9c47ad29cf719cf8358dd40165c,
796 });
797 try testArgs(@Vector(4, u128), .{
798 0x4bae22df929f2f7cb9bd84deaad3e7a8,
799 0x1ed46b2d6e1f3569f56b2ac33d8bc1cb,
800 0xae93ea459d2ccfd5fb794e6d5c31aabb,
801 0xb1177136acf099f550b70949ac202ec4,
802 });
803 try testArgs(@Vector(8, u128), .{
804 0x7cd78db6baed6bfdf8c5265136c4e0fd,
805 0xa41b8984c6bbde84640068194b7eba98,
806 0xd33102778f2ae1a48d1e9bf8801bbbf0,
807 0x0d59f6de003513a60055c86cbce2c200,
808 0x825579d90012afddfbf04851c0748561,
809 0xc2647c885e9d6f0ee1f5fac5da8ef7f5,
810 0xcb4bbc1f81aa8ee68aa4dc140745687b,
811 0x4ff10f914f74b46c694407f5bf7c7836,
812 });
813
814 try testArgs(@Vector(3, i129), .{ -1 << 128, -1, 0 });
815 try testArgs(@Vector(3, u129), .{ 0, 1, 1 << 128 });
816
817 try testArgs(@Vector(3, i191), .{ -1 << 190, -1, 0 });
818 try testArgs(@Vector(3, u191), .{ 0, 1, 1 << 190 });
819
820 try testArgs(@Vector(3, i192), .{ -1 << 191, -1, 0 });
821 try testArgs(@Vector(1, i192), .{
822 0x0206223e53631dfaf431066cf5ac30dd203bb8c7baa0cec7,
823 });
824 try testArgs(@Vector(2, i192), .{
825 0x187a65fa29d1981dacf927e6a8e435481cfdcba6b63b781b,
826 -0x0f53cb01d7662de0d19fa0b250e5bbc6edf7d3dd152f0dc3,
827 });
828 try testArgs(@Vector(4, i192), .{
829 -0x3a456cd0eab663b34d5b6ad15933a31623aacb913adb8e41,
830 -0x03376d57e9c495ac4ea623e1bf427ae22dcef26e4833da33,
831 -0x28a90cfee819450e3000f3f2694a7dba2c02311996e01073,
832 0x46c6cae4281780acd6a0322c3f4f8b63c3741da31b20a3cd,
833 });
834
835 try testArgs(@Vector(3, u192), .{ 0, 1, 1 << 191 });
836 try testArgs(@Vector(1, u192), .{
837 0xe7baafcb9781626a77571b0539b9471a60c97d6c02106c8b,
838 });
839 try testArgs(@Vector(2, u192), .{
840 0xbc9510913ed09e2c2aa50ffab9f1bc7b303a87f36e232a83,
841 0x1f37bee446d7712d1ad457c47a66812cb926198d052aee65,
842 });
843 try testArgs(@Vector(4, u192), .{
844 0xdca6a7cfc19c69efc34022062a8ca36f2569ab3dce001202,
845 0xd25a4529e621c9084181fdb6917c6a32eccc58b63601b35d,
846 0x0a258afd6debbaf8c158f1caa61fed63b31871d13f51b43d,
847 0x6b40a178674fcb82c623ac322f851623d5e993dac97a219a,
848 });
849
850 try testArgs(@Vector(3, i193), .{ -1 << 192, -1, 0 });
851 try testArgs(@Vector(3, u193), .{ 0, 1, 1 << 192 });
852
853 try testArgs(@Vector(3, i255), .{ -1 << 254, -1, 0 });
854 try testArgs(@Vector(3, u255), .{ 0, 1, 1 << 254 });
855
856 try testArgs(@Vector(3, i256), .{ -1 << 255, -1, 0 });
857 try testArgs(@Vector(1, i256), .{
858 0x59a12bff854679d9b3c6d1d195333d9f748dd1e2a7ad28f24f611a208bf91ed3,
859 });
860 try testArgs(@Vector(2, i256), .{
861 0x6b266e98bd5e7e66ba90f2e1cb2ff555ac755efdbe0946313660c58b46c589bb,
862 -0x4ab426d26f53253ae3b2fb412d9649fc8071db22605e528f918b9a3ee9d2a832,
863 });
864 try testArgs(@Vector(4, i256), .{
865 -0x3a64f67fddd0859c0f3b063fc12b13b1865447b87d1740de51358421f50553b5,
866 -0x7c364fc0218f1cab29425b1a4c9cbdbf0c676375bee8079b135ce40de3557c0b,
867 0x368d25dc3eab1b00decd18679b29b7f4d95314161bd3ee687f2896e8cd525311,
868 -0x6d9aacd172a363bf2d53ea497c289fd35e62c2484329c208e10a91b4cea88111,
869 });
870
871 try testArgs(@Vector(3, u256), .{ 0, 1, 1 << 255 });
872 try testArgs(@Vector(1, u256), .{
873 0x230413bb481fa3a997796acf282010c560d1942e7339fd584a0f15a90c83fbda,
874 });
875 try testArgs(@Vector(2, u256), .{
876 0x3ad569f8d91fdbc9da8ec0e933565919f2feb90b996c90c352b461aa0908e62d,
877 0x0f109696d64647983f1f757042515510729ad1350e862cbf38cb73b5cf99f0f7,
878 });
879 try testArgs(@Vector(4, u256), .{
880 0x1717c6ded4ac6de282d59f75f068da47d5a47a30f2c5053d2d59e715f9d28b97,
881 0x3087189ce7540e2e0028b80af571ebc6353a00b2917f243a869ed29ecca0adaa,
882 0x1507c6a9d104684bf503cdb08841cf91adab4644306bd67aafff5326604833ce,
883 0x857e134ff9179733c871295b25f824bd3eb562977bad30890964fa0cdc15bb07,
884 });
885
886 try testArgs(@Vector(3, i257), .{ -1 << 256, -1, 0 });
887 try testArgs(@Vector(3, u257), .{ 0, 1, 1 << 256 });
888
889 try testArgs(@Vector(3, i511), .{ -1 << 510, -1, 0 });
890 try testArgs(@Vector(3, u511), .{ 0, 1, 1 << 510 });
891
892 try testArgs(@Vector(3, i512), .{ -1 << 511, -1, 0 });
893 try testArgs(@Vector(1, i512), .{
894 -0x235b5d838cdf67b9eb6d7eeb518fb63cff402a74c687927feb363b5040556b8d32c55e565cc2fe33cb4dcc37e8fd1c92989522c11b6c186d11400d17e40d35b5,
895 });
896 try testArgs(@Vector(2, i512), .{
897 -0x5f5ff44fec38adc4c9c8bc8de00acf01fcc62bc55d07033f4e788d4f3825382e1e39f6bd69dff328eec9a89486ebaaaffd9ab69d28eb7d952be4ef250cff6de1,
898 -0x403e0fd866e1598ad928ecd234005debd527483375f5e7e79eee3a129868354acb5b74e42de9f297f81062d04ea41adc158e542ab04770dd039d527cffb81845,
899 });
900
901 try testArgs(@Vector(3, u512), .{ 0, 1, 1 << 511 });
902 try testArgs(@Vector(1, u512), .{
903 0xa3ff51a609f1370e5eeb96b05169bf7469e465cf76ac5b4ea8ffd166c1ba3cd94f2dedf0d647a1fe424f3a06e6d7940f03e257f28100970b00bd5528c52b9ae6,
904 });
905 try testArgs(@Vector(2, u512), .{
906 0xc6d43cd46ae31ab71f9468a895c83bf17516c6b2f1c9b04b9aa113bf7fe1b789eb7d95fcf951f12a9a6f2124589551efdd8c00f528b366a7bfb852faf8f3da53,
907 0xc9099d2bdf8d1a0d30485ec6db4a24cbc0d89a863de30e18313ee1d66f71dd2d26235caaa703286cf4a2b51e1a12ef96d2d944c66c0bd3f0d72dd4cf0fc8100e,
908 });
909
910 try testArgs(@Vector(3, i513), .{ -1 << 512, -1, 0 });
911 try testArgs(@Vector(3, u513), .{ 0, 1, 1 << 512 });
912
913 try testArgs(@Vector(3, i1023), .{ -1 << 1022, -1, 0 });
914 try testArgs(@Vector(3, u1023), .{ 0, 1, 1 << 1022 });
915
916 try testArgs(@Vector(3, i1024), .{ -1 << 1023, -1, 0 });
917 try testArgs(@Vector(1, i1024), .{
918 0x10eee350e115375812126750b24255ca76fdee619b64261c354af58bd4a29af6e2448ccda4d84e1b2fbf76d3710cf1b5e62b1360c3b63e104d0755fa264d6c171f8f7a3292d7859b08a5dff60e9ad8ba9dcdd7e6098eb70be7a27a0cbcc6480661330c21299b2960fac954ee4480f3a2cc1ca5a492e1e75084c079ba701cd7ab,
919 });
920
921 try testArgs(@Vector(3, u1024), .{ 0, 1, 1 << 1023 });
922 try testArgs(@Vector(1, u1024), .{
923 0xc6cfaa6571139552e1f067402dfc131d9b9a58aafda97198a78764b05138fb68cf26f085b7652f3d5ae0e56aa21732f296a581bb411d4a73795c213de793489fa49b173b9f5c089aa6295ff1fcdc14d491a05035b45d08fc35cd67a83d887a02b8db512f07518132e0ba56533c7d6fbe958255eddf5649bd8aba288c0dd84a25,
924 });
925
926 try testArgs(@Vector(3, i1025), .{ -1 << 1024, -1, 0 });
927 try testArgs(@Vector(3, u1025), .{ 0, 1, 1 << 1024 });
928 }
929 };
705930}
706931
707fn testBinary(comptime op: anytype) !void {
708 const testType = struct {
709 fn testType(comptime Type: type, comptime imm_lhs: Type, comptime imm_rhs: Type) !void {
932fn Binary(comptime op: anytype) type {
933 return struct {
934 fn testArgs(comptime Type: type, comptime imm_lhs: Type, comptime imm_rhs: Type) !void {
710935 const expected = op(Type, imm_lhs, imm_rhs);
711936 try struct {
712 fn testOne(actual: @TypeOf(expected)) !void {
937 fn checkExpected(actual: @TypeOf(expected)) !void {
713938 if (switch (@typeInfo(@TypeOf(expected))) {
714939 else => actual != expected,
715940 .vector => @reduce(.Or, actual != expected),
716941 }) return error.Unexpected;
717942 }
718 noinline fn testOps(mem_lhs: Type, mem_rhs: Type) !void {
943 noinline fn testArgKinds(mem_lhs: Type, mem_rhs: Type) !void {
719944 var reg_lhs = mem_lhs;
720945 var reg_rhs = mem_rhs;
721946 _ = .{ &reg_lhs, &reg_rhs };
722 try testOne(op(Type, reg_lhs, reg_rhs));
723 try testOne(op(Type, reg_lhs, mem_rhs));
724 try testOne(op(Type, reg_lhs, imm_rhs));
725 try testOne(op(Type, mem_lhs, reg_rhs));
726 try testOne(op(Type, mem_lhs, mem_rhs));
727 try testOne(op(Type, mem_lhs, imm_rhs));
728 try testOne(op(Type, imm_lhs, reg_rhs));
729 try testOne(op(Type, imm_lhs, mem_rhs));
947 try checkExpected(op(Type, reg_lhs, reg_rhs));
948 try checkExpected(op(Type, reg_lhs, mem_rhs));
949 try checkExpected(op(Type, reg_lhs, imm_rhs));
950 try checkExpected(op(Type, mem_lhs, reg_rhs));
951 try checkExpected(op(Type, mem_lhs, mem_rhs));
952 try checkExpected(op(Type, mem_lhs, imm_rhs));
953 try checkExpected(op(Type, imm_lhs, reg_rhs));
954 try checkExpected(op(Type, imm_lhs, mem_rhs));
730955 }
731 }.testOps(imm_lhs, imm_rhs);
956 }.testArgKinds(imm_lhs, imm_rhs);
957 }
958 fn testIntTypes() !void {
959 try testArgs(u8, 0xbb, 0x43);
960 try testArgs(u16, 0xb8bf, 0x626d);
961 try testArgs(u32, 0x80d7a2c6, 0xbff6a402);
962 try testArgs(u64, 0x71138bc6b4a38898, 0x1bc4043de9438c7b);
963 try testArgs(u128, 0xe05fc132ef2cd8affee00a907f0a851f, 0x29f912a72cfc6a7c6973426a9636da9a);
964 try testArgs(
965 u256,
966 0xb7935f5c2f3b1ae7a422c0a7c446884294b7d5370bada307d2fe5a4c4284a999,
967 0x310e6e196ba4f143b8d285ca6addf7f3bb3344224aff221b27607a31e148be08,
968 );
969 try testArgs(
970 u258,
971 0x186d5ddaab8cb8cb04e5b41e36f812e039d008baf49f12894c39e29a07796d800,
972 0x2072daba6ffad168826163eb136f6d28ca4360c8e7e5e41e29755e19e4753a4f5,
973 );
974 try testArgs(
975 u495,
976 0x6eaf4e252b3bf74b75bac59e0b43ca5326bad2a25b3fdb74a67ef132ac5e47d72eebc3316fb2351ee66c50dc5afb92a75cea9b0e35160652c7db39eeb158,
977 0x49fbed744a92b549d8c05bb3512c617d24dd824f3f69bdf3923bc326a75674b85f5b828d2566fab9c86f571d12c2a63c9164feb0d191d27905533d09622a,
978 );
979 try testArgs(
980 u512,
981 0xe5b1fedca3c77db765e517aabd05ffc524a3a8aff1784bbf67c45b894447ede32b65b9940e78173c591e56e078932d465f235aece7ad47b7f229df7ba8f12295,
982 0x8b4bb7c2969e3b121cc1082c442f8b4330f0a50058438fed56447175bb10178607ecfe425cb54dacc25ef26810f3e04681de1844f1aa8d029aca75d658634806,
983 );
984 }
985 fn testIntVectorTypes() !void {
986 try testArgs(@Vector(1, u8), .{
987 0x1f,
988 }, .{
989 0x06,
990 });
991 try testArgs(@Vector(2, u8), .{
992 0x80, 0x63,
993 }, .{
994 0xe4, 0x28,
995 });
996 try testArgs(@Vector(4, u8), .{
997 0x83, 0x9e, 0x1e, 0xc1,
998 }, .{
999 0xf0, 0x5c, 0x46, 0x85,
1000 });
1001 try testArgs(@Vector(8, u8), .{
1002 0x1e, 0x4d, 0x9d, 0x2a, 0x4c, 0x74, 0x0a, 0x83,
1003 }, .{
1004 0x28, 0x60, 0xa9, 0xb5, 0xd9, 0xa6, 0xf1, 0xb6,
1005 });
1006 try testArgs(@Vector(16, u8), .{
1007 0xea, 0x80, 0xbb, 0xe8, 0x74, 0x81, 0xc8, 0x66, 0x7b, 0x41, 0x90, 0xcb, 0x30, 0x70, 0x4b, 0x0f,
1008 }, .{
1009 0x61, 0x26, 0xbe, 0x47, 0x00, 0x9c, 0x55, 0xa5, 0x59, 0xf0, 0xb2, 0x20, 0x30, 0xaf, 0x82, 0x3e,
1010 });
1011 try testArgs(@Vector(32, u8), .{
1012 0xa1, 0x88, 0xc4, 0xf4, 0x77, 0x0b, 0xf5, 0xbb, 0x09, 0x03, 0xbf, 0xf5, 0xcc, 0x7f, 0x6b, 0x2a,
1013 0x4c, 0x05, 0x37, 0xc9, 0x8a, 0xcb, 0x91, 0x23, 0x09, 0x5f, 0xb8, 0x99, 0x4a, 0x75, 0x26, 0xe4,
1014 }, .{
1015 0xff, 0x0f, 0x99, 0x49, 0xa6, 0x25, 0xa7, 0xd4, 0xc9, 0x2f, 0x97, 0x6a, 0x01, 0xd6, 0x6e, 0x41,
1016 0xa4, 0xb5, 0x3c, 0x03, 0xea, 0x82, 0x9c, 0x5f, 0xac, 0x07, 0x16, 0x15, 0x1c, 0x64, 0x25, 0x2f,
1017 });
1018 try testArgs(@Vector(64, u8), .{
1019 0xaa, 0x08, 0xeb, 0xb2, 0xd7, 0x89, 0x0f, 0x98, 0xda, 0x9f, 0xa6, 0x4e, 0x3c, 0xce, 0x1b, 0x1b,
1020 0x9e, 0x5f, 0x2b, 0xd6, 0x59, 0x26, 0x47, 0x05, 0x2a, 0xb7, 0xd1, 0x10, 0xde, 0xd9, 0x84, 0x00,
1021 0x07, 0xc0, 0xaa, 0x6e, 0xfa, 0x3b, 0x97, 0x85, 0xa8, 0x42, 0xd7, 0xa5, 0x90, 0xe6, 0x10, 0x1a,
1022 0x47, 0x84, 0xe1, 0x3e, 0xb0, 0x70, 0x26, 0x3f, 0xea, 0x24, 0xb8, 0x5f, 0xe3, 0xe3, 0x4c, 0xed,
1023 }, .{
1024 0x3b, 0xc5, 0xe0, 0x3d, 0x4f, 0x2e, 0x1d, 0xa9, 0xf7, 0x7b, 0xc7, 0xc1, 0x48, 0xc6, 0xe5, 0x9e,
1025 0x4d, 0xa8, 0x21, 0x37, 0xa1, 0x1a, 0x95, 0x69, 0x89, 0x2f, 0x15, 0x07, 0x3d, 0x7b, 0x69, 0x89,
1026 0xea, 0x87, 0xf0, 0x94, 0x67, 0xf2, 0x3d, 0x04, 0x96, 0x8a, 0xd6, 0x70, 0x7c, 0x16, 0xe7, 0x62,
1027 0xf0, 0x8d, 0x96, 0x65, 0xd1, 0x4a, 0x35, 0x3e, 0x7a, 0x67, 0xa6, 0x1f, 0x37, 0x66, 0xe3, 0x45,
1028 });
1029 try testArgs(@Vector(128, u8), .{
1030 0xa1, 0xd0, 0x7b, 0xf9, 0x7b, 0x77, 0x7b, 0x3d, 0x2d, 0x68, 0xc2, 0x7b, 0xb0, 0xb8, 0xd4, 0x7c,
1031 0x1a, 0x1f, 0xd2, 0x92, 0x3e, 0xcb, 0xc1, 0x6b, 0xb9, 0x4d, 0xf1, 0x67, 0x58, 0x8e, 0x77, 0xa6,
1032 0xb9, 0xdf, 0x10, 0x6f, 0xbe, 0xe3, 0x33, 0xb6, 0x93, 0x77, 0x80, 0xef, 0x09, 0x9d, 0x61, 0x40,
1033 0xa2, 0xf4, 0x52, 0x18, 0x9d, 0xe4, 0xb0, 0xaf, 0x0a, 0xa7, 0x0b, 0x09, 0x67, 0x38, 0x71, 0x04,
1034 0x72, 0xa1, 0xd2, 0xfd, 0xf8, 0xf0, 0xa7, 0x23, 0x24, 0x5b, 0x7d, 0xfb, 0x43, 0xba, 0x6c, 0xc4,
1035 0x83, 0x46, 0x0e, 0x4d, 0x6c, 0x92, 0xab, 0x4f, 0xd2, 0x70, 0x9d, 0xfe, 0xce, 0xf8, 0x05, 0x9f,
1036 0x98, 0x36, 0x9c, 0x90, 0x9a, 0xd0, 0xb5, 0x76, 0x16, 0xe8, 0x25, 0xc2, 0xbd, 0x91, 0xab, 0xf9,
1037 0x6f, 0x6c, 0xc5, 0x60, 0xe5, 0x30, 0xf2, 0xb7, 0x59, 0xc4, 0x9c, 0xdd, 0xdf, 0x04, 0x65, 0xd9,
1038 }, .{
1039 0xed, 0xe1, 0x8a, 0xf6, 0xf3, 0x8b, 0xfd, 0x1d, 0x3c, 0x87, 0xbf, 0xfe, 0x04, 0x52, 0x15, 0x82,
1040 0x0b, 0xb0, 0xcf, 0xcf, 0xf8, 0x03, 0x9c, 0xef, 0xc1, 0x76, 0x7e, 0xe3, 0xe9, 0xa8, 0x18, 0x90,
1041 0xd4, 0xc4, 0x91, 0x15, 0x68, 0x7f, 0x65, 0xd8, 0xe1, 0xb3, 0x23, 0xc2, 0x7d, 0x84, 0x3b, 0xaf,
1042 0x74, 0x69, 0x07, 0x2a, 0x1b, 0x5f, 0x0e, 0x44, 0x0d, 0x2b, 0x9c, 0x82, 0x41, 0xf9, 0x7f, 0xb5,
1043 0xc4, 0xd9, 0xcb, 0xd3, 0xc5, 0x31, 0x8b, 0x5f, 0xda, 0x09, 0x9b, 0x29, 0xa3, 0xb7, 0x13, 0x0d,
1044 0x55, 0x9b, 0x59, 0x33, 0x2a, 0x59, 0x3a, 0x44, 0x1f, 0xd3, 0x40, 0x4e, 0xde, 0x2c, 0xe4, 0x16,
1045 0xfd, 0xc3, 0x02, 0x74, 0xaa, 0x65, 0xfd, 0xc8, 0x2a, 0x8a, 0xdb, 0xae, 0x44, 0x28, 0x62, 0xa4,
1046 0x56, 0x4f, 0xf1, 0xaa, 0x0a, 0x0f, 0xdb, 0x1b, 0xc8, 0x45, 0x9b, 0x12, 0xb4, 0x1a, 0xe4, 0xa3,
1047 });
1048
1049 try testArgs(@Vector(1, u16), .{
1050 0x9d6f,
1051 }, .{
1052 0x44b1,
1053 });
1054 try testArgs(@Vector(2, u16), .{
1055 0xa0fa, 0xc365,
1056 }, .{
1057 0xe736, 0xc394,
1058 });
1059 try testArgs(@Vector(4, u16), .{
1060 0x9608, 0xa558, 0x161b, 0x206f,
1061 }, .{
1062 0x3088, 0xf25c, 0x7837, 0x9b3f,
1063 });
1064 try testArgs(@Vector(8, u16), .{
1065 0xcf61, 0xb121, 0x3cf1, 0x3e9f, 0x43a7, 0x8d69, 0x96f5, 0xc11e,
1066 }, .{
1067 0xee30, 0x82f0, 0x270b, 0x1498, 0x4c60, 0x6e72, 0x0b64, 0x02d4,
1068 });
1069 try testArgs(@Vector(16, u16), .{
1070 0x9191, 0xd23e, 0xf844, 0xd84a, 0xe907, 0xf1e8, 0x712d, 0x90af,
1071 0x6541, 0x3fa6, 0x92eb, 0xe35a, 0xc0c9, 0xcb47, 0xb790, 0x4453,
1072 }, .{
1073 0x21c3, 0x4039, 0x9b71, 0x60bd, 0xcd7f, 0x2ec8, 0x50ba, 0xe810,
1074 0xebd4, 0x06e5, 0xed18, 0x2f66, 0x7e31, 0xe282, 0xad63, 0xb25e,
1075 });
1076 try testArgs(@Vector(32, u16), .{
1077 0x6b6a, 0x30a9, 0xc267, 0x2231, 0xbf4c, 0x00bc, 0x9c2c, 0x2928,
1078 0xecad, 0x82df, 0xcfb0, 0xa4e5, 0x909b, 0x1b05, 0xaf40, 0x1fd9,
1079 0xcec6, 0xd8dc, 0xd4b5, 0x6d59, 0x8e3f, 0x4d8a, 0xb83a, 0x808e,
1080 0x47e2, 0x5782, 0x59bf, 0xcefc, 0x5179, 0x3f48, 0x93dc, 0x66d2,
1081 }, .{
1082 0x1be8, 0xe98c, 0xf9b3, 0xb008, 0x2f8d, 0xf087, 0xc9b9, 0x75aa,
1083 0xbd16, 0x9540, 0xc5bd, 0x2b2c, 0xd43f, 0x9394, 0x3e1d, 0xf695,
1084 0x167d, 0xff7a, 0xf09d, 0xdff8, 0xdfa2, 0xc779, 0x70b7, 0x01bd,
1085 0x46b3, 0x995a, 0xb7bc, 0xa79d, 0x5542, 0x961e, 0x37cd, 0x9c2a,
1086 });
1087 try testArgs(@Vector(64, u16), .{
1088 0x6b87, 0xfd84, 0x436b, 0xe345, 0xfb82, 0x81fc, 0x0992, 0x45f9,
1089 0x5527, 0x1f6d, 0xda46, 0x6a16, 0xf6e1, 0x8fb7, 0x3619, 0xdfe3,
1090 0x64ce, 0x8ac6, 0x3ae8, 0x30e3, 0xec3b, 0x4ba7, 0x02a4, 0xa694,
1091 0x8e68, 0x8f0c, 0x5e30, 0x0e55, 0x6538, 0x9852, 0xea35, 0x7be2,
1092 0xdabd, 0x57e6, 0x5b38, 0x0fb2, 0x2604, 0x85e7, 0x6595, 0x8de9,
1093 0x49b1, 0xe9a2, 0x3758, 0xa4d9, 0x505b, 0xc9d3, 0xddc5, 0x9a43,
1094 0xfd44, 0x50f5, 0x379e, 0x03b6, 0x6375, 0x692f, 0x5586, 0xc717,
1095 0x94dd, 0xee06, 0xb32d, 0x0bb9, 0x0e35, 0x5f8f, 0x0ba4, 0x19a8,
1096 }, .{
1097 0xbeeb, 0x3e54, 0x6486, 0x5167, 0xe432, 0x57cf, 0x9cac, 0x922e,
1098 0xd2f8, 0x5614, 0x2e7f, 0x19cf, 0x9a07, 0x0524, 0x168f, 0x4464,
1099 0x4def, 0x83ce, 0x97b4, 0xf269, 0xda5f, 0x28c1, 0x9cc3, 0xfa7c,
1100 0x25a0, 0x912d, 0x25b2, 0xd60d, 0xcd82, 0x0e03, 0x40cc, 0xc9dc,
1101 0x18eb, 0xc609, 0xb06d, 0x29e0, 0xf3c7, 0x997b, 0x8ca2, 0xa750,
1102 0xc9bc, 0x8f0e, 0x3916, 0xd905, 0x94f8, 0x397f, 0x98b5, 0xc61d,
1103 0x05db, 0x3e7a, 0xf750, 0xe8de, 0x3225, 0x81d9, 0x612e, 0x0a7e,
1104 0x2c02, 0xff5b, 0x19ca, 0xbbf5, 0x870e, 0xc9ca, 0x47bb, 0xcfcc,
1105 });
1106
1107 try testArgs(@Vector(1, u32), .{
1108 0x1d0d9cc4,
1109 }, .{
1110 0xce2d0ab6,
1111 });
1112 try testArgs(@Vector(2, u32), .{
1113 0x5ab78c03, 0xd21bb513,
1114 }, .{
1115 0x8a6664eb, 0x79eac37d,
1116 });
1117 try testArgs(@Vector(4, u32), .{
1118 0x234d576e, 0x4151cc9c, 0x39f558e4, 0xba935a32,
1119 }, .{
1120 0x398f2a9d, 0x4540f093, 0x9225551c, 0x3bac865b,
1121 });
1122 try testArgs(@Vector(8, u32), .{
1123 0xb8336635, 0x2fc3182c, 0x27a00123, 0x71587fbe,
1124 0x9cbc65d2, 0x6f4bb0e6, 0x362594ce, 0x9971df38,
1125 }, .{
1126 0x5727e734, 0x972b0313, 0xff25f5dc, 0x924f8e55,
1127 0x04920a61, 0xa1c3b334, 0xf52df4b6, 0x5ef72ecc,
1128 });
1129 try testArgs(@Vector(16, u32), .{
1130 0xfb566f9e, 0x9ad4691a, 0x5b5f9ec0, 0x5a572d2a,
1131 0x8f2f226b, 0x2dfc7e33, 0x9fb07e32, 0x9d672a2e,
1132 0xbedc3cee, 0x6872428d, 0xbc73a9fd, 0xd4d5f055,
1133 0x69c1e9ee, 0x65038deb, 0x1449061a, 0x48412ec2,
1134 }, .{
1135 0x96cbe946, 0x3f24f60b, 0xaeacdc53, 0x7611a8b4,
1136 0x031a67a8, 0x52a26828, 0x75646f4b, 0xb75902c3,
1137 0x1f881f08, 0x834e02a4, 0x5e5b40eb, 0xc75c264d,
1138 0xa8251e09, 0x28e46bbd, 0x12cb1f31, 0x9a2af615,
1139 });
1140 try testArgs(@Vector(32, u32), .{
1141 0x131bbb7b, 0xa7311026, 0x9d5e59a0, 0x99b090d6,
1142 0xfe969e2e, 0x04547697, 0x357d3250, 0x43be6d7a,
1143 0x16ecf5c5, 0xf60febcc, 0x1d1e2602, 0x138a96d2,
1144 0x9117ba72, 0x9f185b32, 0xc10e23fd, 0x3e6b7fd8,
1145 0x4dc9be70, 0x2ee30047, 0xaffeab60, 0x7172d362,
1146 0x6154bfcf, 0x5388dc3e, 0xd6e5a76e, 0x8b782f2d,
1147 0xacbef4a2, 0x843aca71, 0x25d8ab5c, 0xe1a63a39,
1148 0xc26212e5, 0x0847b84b, 0xb53541e5, 0x0c8e44db,
1149 }, .{
1150 0x4ad92822, 0x715b623f, 0xa5bed8a7, 0x937447a9,
1151 0x7ecb38eb, 0x0a2f3dfc, 0x96f467a2, 0xec882793,
1152 0x41a8707f, 0xf7310656, 0x76217b80, 0x2058e5fc,
1153 0x26682154, 0x87313e31, 0x4bdc480a, 0x193572ff,
1154 0x60b03c75, 0x0fe45908, 0x56c73703, 0xdb86554c,
1155 0xdda2dd7d, 0x34371b27, 0xe4e6ad50, 0x422d1828,
1156 0x1de3801b, 0xdce268d3, 0x20af9ec8, 0x188a591f,
1157 0xf080e943, 0xc8718d14, 0x3f920382, 0x18d101b5,
1158 });
1159
1160 try testArgs(@Vector(1, u64), .{
1161 0x333f593bf9d08546,
1162 }, .{
1163 0x6918bd767e730778,
1164 });
1165 try testArgs(@Vector(2, u64), .{
1166 0x4cd89a317b03d430, 0x28998f61842f63a9,
1167 }, .{
1168 0x6c34db64af0e217e, 0x57aa5d02cd45dceb,
1169 });
1170 try testArgs(@Vector(4, u64), .{
1171 0x946cf7e7484691c9, 0xf4fc5be2a762fcbf,
1172 0x71cc83bc25abaf14, 0xc69cef44c6f833a1,
1173 }, .{
1174 0x9f90cbd6c3ce1d4e, 0x182f65295dff4e84,
1175 0x4dfe62c59fed0040, 0x18402347c1db1999,
1176 });
1177 try testArgs(@Vector(8, u64), .{
1178 0x92c6281333943e2c, 0xa97750504668efb5,
1179 0x234be51057c0181f, 0xefbc1f407f3df4fb,
1180 0x8da6cc7c39cebb94, 0xb408f7e56feee497,
1181 0x2363f1f8821592ed, 0x01716e800c0619e1,
1182 }, .{
1183 0xa617426684147e7e, 0x7542da7ebe093a7b,
1184 0x3f21d99ac57606b7, 0x65cd36d697d22de4,
1185 0xed23d6bdf176c844, 0x2d4573f100ff7b58,
1186 0x4968f4d21b49f8ab, 0xf5d9a205d453e933,
1187 });
1188 try testArgs(@Vector(16, u64), .{
1189 0x2f61a4ee66177b4a, 0xf13b286b279f6a93,
1190 0x36b46beb63665318, 0x74294dbde0da98d2,
1191 0x3aa872ba60b936eb, 0xe8f698b36e62600b,
1192 0x9e8930c21a6a1a76, 0x876998b09b8eb03c,
1193 0xa0244771a2ec0adb, 0xb4c72bff3d3ac1a2,
1194 0xd70677210830eced, 0x6622abc1734dd72d,
1195 0x157e2bb0d57d6596, 0x2aac8192fb7ef973,
1196 0xc4a0ca92f34d7b13, 0x04300f8ad1845246,
1197 }, .{
1198 0xeaf71dcf0eb76f5d, 0x0e84b1b63dc97139,
1199 0x0f64cc38d23c94a1, 0x12775cf0816349b7,
1200 0xfdcf13387ba48d54, 0xf8d3c672cacd8779,
1201 0xe728c1f5eb56ab1e, 0x05931a34877f7a69,
1202 0x1861a763c8dafd1f, 0x4ac97573ecd5739f,
1203 0x3384414c9bf77b8c, 0x32c15bbd04a5ddc4,
1204 0xbfd88aee1d82ed32, 0x20e91c15b701059a,
1205 0xed533d18f8657f3f, 0x1ddd7cd7f6bab957,
1206 });
1207
1208 try testArgs(@Vector(1, u128), .{
1209 0x5f11e16b0ca3392f907a857881455d2e,
1210 }, .{
1211 0xf9142d73b408fd6955922f9fc147f7d7,
1212 });
1213 try testArgs(@Vector(2, u128), .{
1214 0xee0fb41fabd805923fb21b5c658e3a87,
1215 0x2352e74aad6c58b3255ff0bba5aa6552,
1216 }, .{
1217 0x8d822f9fdd9cb9a5b43513b14419b224,
1218 0x1aef2a02704379e38ead4d53d69e4cc4,
1219 });
1220 try testArgs(@Vector(4, u128), .{
1221 0xc74437a4ea3bbbb193dbf0ea2f0c5281,
1222 0x039e4b1640868248780db1834a0027eb,
1223 0xb9e8bb34155b2b238da20331d08ff85b,
1224 0x863802d34a54c2e6aa71dd0f067c4904,
1225 }, .{
1226 0x7471bae24ff7b84ab107f86ba2b7d1e7,
1227 0x8f34c449d0576e682c20bda74aa6b6c9,
1228 0x1f34c3efa167b61c48c9d5ec01a1a93f,
1229 0x71c8318fcf3ddc7be058c73a52dce9e3,
1230 });
1231 try testArgs(@Vector(8, u128), .{
1232 0xbf2db71463037f55ee338431f902a906,
1233 0xb7ad317626655f38ab25ae30d8a1aa67,
1234 0x7d3c5a3ffaa607b5560d69ae3fcf7863,
1235 0x009a39a8badf8b628c686dc176aa1273,
1236 0x49dba3744c91304cc7bbbdab61b6c969,
1237 0x6ec664b624f7acf79ce69d80ed7bc85c,
1238 0xe02d7a303c0f00c39010f3b815547f1c,
1239 0xb13e1ee914616f58cffe6acd33d9b5c8,
1240 }, .{
1241 0x2f2d355a071942a7384f82ba72a945b8,
1242 0x61f151b3afec8cb7664f813cecf581d1,
1243 0x5bfbf5484f3a07f0eacc4739ff48af80,
1244 0x59c0abbf8d829cf525a87d5c9c41a38a,
1245 0xdad8b18eb680f0520ca49ebfb5842e22,
1246 0xa05adcaedd9057480b3ba0413d003cec,
1247 0x8b0b4a27fc94a0e90652d19bc755b63d,
1248 0xa858bce5ad0e48c13588a4e170e8667c,
1249 });
1250
1251 try testArgs(@Vector(1, u256), .{
1252 0x28df37e1f57a56133ba3f5b5b2164ce24eb6c29a8973a597fd91fbee8ab4bafb,
1253 }, .{
1254 0x63f725028cab082b5b1e6cb474428c8c3655cf438f3bb05c7a87f8270198f357,
1255 });
1256 try testArgs(@Vector(2, u256), .{
1257 0xcc79740b85597ef411e6d7e92049dfaa2328781ea4911540a3dcb512b71c7f3c,
1258 0x51ae46d2f93cbecff1578481f6ddc633dacee94ecaf81597c752c5c5db0ae766,
1259 }, .{
1260 0x257f0107305cb71cef582a9a58612a019f335e390d7998f51f5898f245874a6e,
1261 0x0a95a17323a4d16a715720f122b752785e9877e3dd3d3f9b72cdac3d1139a81f,
1262 });
1263 try testArgs(@Vector(4, u256), .{
1264 0x19667a6e269342cba437a8904c7ba42a762358d32723723ae2637b01124e63c5,
1265 0x14f7d3599a7edc7bcc46874f68d4291793e6ef72bd1f3763bc5e923f54f2f781,
1266 0x1c939de0ae980b80de773a04088ba45813441336cdfdc281ee356c98d71f653b,
1267 0x39f5d755965382fe13d1b1d6690b8e3827f153f8166768c4ad8a28a963b781f2,
1268 }, .{
1269 0xbe03de37cdcb8126083b4e86cd8a9803121d31b186fd5ce555ad77ce624dd6c7,
1270 0xa0c0730f0d7f141cc959849d09730b049f00693361539f1bc4758270554a60c1,
1271 0x2664bdba8de4eaa36ecee72f6bfec5b4daa6b4e00272d8116f2cc532c29490cc,
1272 0xe47a122bd45d5e7d69722d864a6b795ddee965a0993094f8791dd309d692de8b,
1273 });
1274
1275 try testArgs(@Vector(1, u512), .{
1276 0x651058c1d89a8f34cfc5e66b6d25294eecfcc4a7e1e4a356eb51ee7d7b2db25378e4afee51b7d18d16e520772a60c50a02d7966f40ced1870b32c658e5821397,
1277 }, .{
1278 0xd726e265ec80cb99510ba4f480ca64e959de5c528a7f54c386ecad22eeeefa845f0fd44b1bd64258a5f868197ee2d8fed59df9c9f0b72e74051a7ff20230880e,
1279 });
1280 try testArgs(@Vector(2, u512), .{
1281 0x22c8183c95cca8b09fdf541e431b73e9e4a1a5a00dff12381937fab52681d09d38ea25727d7025a2be08942cfa01535759e1644792e347c7901ec94b343c6337,
1282 0x292fdf644e75927e1aea9465ae2f60fb27550cd095f1afdea2cf7855286d26fbeed1c0b9c0474b73cb6b75621f7eadaa2f94ec358179ce2aaa0766df20da1ef3,
1283 }, .{
1284 0xe1cd8c0ca244c6626d4415e10b4ac43fa69e454c529c24fec4b13e6b945684d4ea833709c16c636ca78cffa5c5bf0fe945cd714a9ad695184a6bdad31dec9e31,
1285 0x8fa3d86099e9e2789d72f8e792290356d659ab20ac0414ff94745984c6ae7d986082197bb849889f912e896670aa2c1a11bd7e66e3f650710b0f0a18a1533f90,
1286 });
1287
1288 try testArgs(@Vector(1, u1024), .{
1289 0x0ca1a0dfaf8bb1da714b457d23c71aef948e66c7cd45c0aa941498a796fb18502ec32f34e885d0a107d44ae81595f8b52c2f0fb38e584b7139903a0e8a823ae20d01ca0662722dd474e7efc40f32d74cc065d97d8a09d0447f1ab6107fa0a57f3f8c866ae872506627ce82f18add79cee8dc69837f4ead3ca770c4d622d7e544,
1290 }, .{
1291 0xf1e3bbe031d59351770a7a501b6e969b2c00d144f17648db3f944b69dfeb7be72e5ff933a061eba4eaa422f8ca09e5a97d0b0dd740fd4076eba8c72d7a278523f399202dc2d043c4e0eb58a2bcd4066e2146e321810b1ee4d3afdddb4f026bcc7905ce17e033a7727b4e08f33b53c63d8c9f763fc6c31d0523eb38c30d5e40bc,
1292 });
7321293 }
733 }.testType;
734
735 try testType(u8, 0xbb, 0x43);
736 try testType(u16, 0xb8bf, 0x626d);
737 try testType(u32, 0x80d7a2c6, 0xbff6a402);
738 try testType(u64, 0x71138bc6b4a38898, 0x1bc4043de9438c7b);
739 try testType(u128, 0xe05fc132ef2cd8affee00a907f0a851f, 0x29f912a72cfc6a7c6973426a9636da9a);
740 try testType(
741 u256,
742 0xb7935f5c2f3b1ae7a422c0a7c446884294b7d5370bada307d2fe5a4c4284a999,
743 0x310e6e196ba4f143b8d285ca6addf7f3bb3344224aff221b27607a31e148be08,
744 );
745 try testType(
746 u258,
747 0x186d5ddaab8cb8cb04e5b41e36f812e039d008baf49f12894c39e29a07796d800,
748 0x2072daba6ffad168826163eb136f6d28ca4360c8e7e5e41e29755e19e4753a4f5,
749 );
750 try testType(
751 u495,
752 0x6eaf4e252b3bf74b75bac59e0b43ca5326bad2a25b3fdb74a67ef132ac5e47d72eebc3316fb2351ee66c50dc5afb92a75cea9b0e35160652c7db39eeb158,
753 0x49fbed744a92b549d8c05bb3512c617d24dd824f3f69bdf3923bc326a75674b85f5b828d2566fab9c86f571d12c2a63c9164feb0d191d27905533d09622a,
754 );
755 try testType(
756 u512,
757 0xe5b1fedca3c77db765e517aabd05ffc524a3a8aff1784bbf67c45b894447ede32b65b9940e78173c591e56e078932d465f235aece7ad47b7f229df7ba8f12295,
758 0x8b4bb7c2969e3b121cc1082c442f8b4330f0a50058438fed56447175bb10178607ecfe425cb54dacc25ef26810f3e04681de1844f1aa8d029aca75d658634806,
759 );
760
761 try testType(@Vector(1, u8), .{
762 0x1f,
763 }, .{
764 0x06,
765 });
766 try testType(@Vector(2, u8), .{
767 0x80, 0x63,
768 }, .{
769 0xe4, 0x28,
770 });
771 try testType(@Vector(4, u8), .{
772 0x83, 0x9e, 0x1e, 0xc1,
773 }, .{
774 0xf0, 0x5c, 0x46, 0x85,
775 });
776 try testType(@Vector(8, u8), .{
777 0x1e, 0x4d, 0x9d, 0x2a, 0x4c, 0x74, 0x0a, 0x83,
778 }, .{
779 0x28, 0x60, 0xa9, 0xb5, 0xd9, 0xa6, 0xf1, 0xb6,
780 });
781 try testType(@Vector(16, u8), .{
782 0xea, 0x80, 0xbb, 0xe8, 0x74, 0x81, 0xc8, 0x66, 0x7b, 0x41, 0x90, 0xcb, 0x30, 0x70, 0x4b, 0x0f,
783 }, .{
784 0x61, 0x26, 0xbe, 0x47, 0x00, 0x9c, 0x55, 0xa5, 0x59, 0xf0, 0xb2, 0x20, 0x30, 0xaf, 0x82, 0x3e,
785 });
786 try testType(@Vector(32, u8), .{
787 0xa1, 0x88, 0xc4, 0xf4, 0x77, 0x0b, 0xf5, 0xbb, 0x09, 0x03, 0xbf, 0xf5, 0xcc, 0x7f, 0x6b, 0x2a,
788 0x4c, 0x05, 0x37, 0xc9, 0x8a, 0xcb, 0x91, 0x23, 0x09, 0x5f, 0xb8, 0x99, 0x4a, 0x75, 0x26, 0xe4,
789 }, .{
790 0xff, 0x0f, 0x99, 0x49, 0xa6, 0x25, 0xa7, 0xd4, 0xc9, 0x2f, 0x97, 0x6a, 0x01, 0xd6, 0x6e, 0x41,
791 0xa4, 0xb5, 0x3c, 0x03, 0xea, 0x82, 0x9c, 0x5f, 0xac, 0x07, 0x16, 0x15, 0x1c, 0x64, 0x25, 0x2f,
792 });
793 try testType(@Vector(64, u8), .{
794 0xaa, 0x08, 0xeb, 0xb2, 0xd7, 0x89, 0x0f, 0x98, 0xda, 0x9f, 0xa6, 0x4e, 0x3c, 0xce, 0x1b, 0x1b,
795 0x9e, 0x5f, 0x2b, 0xd6, 0x59, 0x26, 0x47, 0x05, 0x2a, 0xb7, 0xd1, 0x10, 0xde, 0xd9, 0x84, 0x00,
796 0x07, 0xc0, 0xaa, 0x6e, 0xfa, 0x3b, 0x97, 0x85, 0xa8, 0x42, 0xd7, 0xa5, 0x90, 0xe6, 0x10, 0x1a,
797 0x47, 0x84, 0xe1, 0x3e, 0xb0, 0x70, 0x26, 0x3f, 0xea, 0x24, 0xb8, 0x5f, 0xe3, 0xe3, 0x4c, 0xed,
798 }, .{
799 0x3b, 0xc5, 0xe0, 0x3d, 0x4f, 0x2e, 0x1d, 0xa9, 0xf7, 0x7b, 0xc7, 0xc1, 0x48, 0xc6, 0xe5, 0x9e,
800 0x4d, 0xa8, 0x21, 0x37, 0xa1, 0x1a, 0x95, 0x69, 0x89, 0x2f, 0x15, 0x07, 0x3d, 0x7b, 0x69, 0x89,
801 0xea, 0x87, 0xf0, 0x94, 0x67, 0xf2, 0x3d, 0x04, 0x96, 0x8a, 0xd6, 0x70, 0x7c, 0x16, 0xe7, 0x62,
802 0xf0, 0x8d, 0x96, 0x65, 0xd1, 0x4a, 0x35, 0x3e, 0x7a, 0x67, 0xa6, 0x1f, 0x37, 0x66, 0xe3, 0x45,
803 });
804 try testType(@Vector(128, u8), .{
805 0xa1, 0xd0, 0x7b, 0xf9, 0x7b, 0x77, 0x7b, 0x3d, 0x2d, 0x68, 0xc2, 0x7b, 0xb0, 0xb8, 0xd4, 0x7c,
806 0x1a, 0x1f, 0xd2, 0x92, 0x3e, 0xcb, 0xc1, 0x6b, 0xb9, 0x4d, 0xf1, 0x67, 0x58, 0x8e, 0x77, 0xa6,
807 0xb9, 0xdf, 0x10, 0x6f, 0xbe, 0xe3, 0x33, 0xb6, 0x93, 0x77, 0x80, 0xef, 0x09, 0x9d, 0x61, 0x40,
808 0xa2, 0xf4, 0x52, 0x18, 0x9d, 0xe4, 0xb0, 0xaf, 0x0a, 0xa7, 0x0b, 0x09, 0x67, 0x38, 0x71, 0x04,
809 0x72, 0xa1, 0xd2, 0xfd, 0xf8, 0xf0, 0xa7, 0x23, 0x24, 0x5b, 0x7d, 0xfb, 0x43, 0xba, 0x6c, 0xc4,
810 0x83, 0x46, 0x0e, 0x4d, 0x6c, 0x92, 0xab, 0x4f, 0xd2, 0x70, 0x9d, 0xfe, 0xce, 0xf8, 0x05, 0x9f,
811 0x98, 0x36, 0x9c, 0x90, 0x9a, 0xd0, 0xb5, 0x76, 0x16, 0xe8, 0x25, 0xc2, 0xbd, 0x91, 0xab, 0xf9,
812 0x6f, 0x6c, 0xc5, 0x60, 0xe5, 0x30, 0xf2, 0xb7, 0x59, 0xc4, 0x9c, 0xdd, 0xdf, 0x04, 0x65, 0xd9,
813 }, .{
814 0xed, 0xe1, 0x8a, 0xf6, 0xf3, 0x8b, 0xfd, 0x1d, 0x3c, 0x87, 0xbf, 0xfe, 0x04, 0x52, 0x15, 0x82,
815 0x0b, 0xb0, 0xcf, 0xcf, 0xf8, 0x03, 0x9c, 0xef, 0xc1, 0x76, 0x7e, 0xe3, 0xe9, 0xa8, 0x18, 0x90,
816 0xd4, 0xc4, 0x91, 0x15, 0x68, 0x7f, 0x65, 0xd8, 0xe1, 0xb3, 0x23, 0xc2, 0x7d, 0x84, 0x3b, 0xaf,
817 0x74, 0x69, 0x07, 0x2a, 0x1b, 0x5f, 0x0e, 0x44, 0x0d, 0x2b, 0x9c, 0x82, 0x41, 0xf9, 0x7f, 0xb5,
818 0xc4, 0xd9, 0xcb, 0xd3, 0xc5, 0x31, 0x8b, 0x5f, 0xda, 0x09, 0x9b, 0x29, 0xa3, 0xb7, 0x13, 0x0d,
819 0x55, 0x9b, 0x59, 0x33, 0x2a, 0x59, 0x3a, 0x44, 0x1f, 0xd3, 0x40, 0x4e, 0xde, 0x2c, 0xe4, 0x16,
820 0xfd, 0xc3, 0x02, 0x74, 0xaa, 0x65, 0xfd, 0xc8, 0x2a, 0x8a, 0xdb, 0xae, 0x44, 0x28, 0x62, 0xa4,
821 0x56, 0x4f, 0xf1, 0xaa, 0x0a, 0x0f, 0xdb, 0x1b, 0xc8, 0x45, 0x9b, 0x12, 0xb4, 0x1a, 0xe4, 0xa3,
822 });
823
824 try testType(@Vector(1, u16), .{
825 0x9d6f,
826 }, .{
827 0x44b1,
828 });
829 try testType(@Vector(2, u16), .{
830 0xa0fa, 0xc365,
831 }, .{
832 0xe736, 0xc394,
833 });
834 try testType(@Vector(4, u16), .{
835 0x9608, 0xa558, 0x161b, 0x206f,
836 }, .{
837 0x3088, 0xf25c, 0x7837, 0x9b3f,
838 });
839 try testType(@Vector(8, u16), .{
840 0xcf61, 0xb121, 0x3cf1, 0x3e9f, 0x43a7, 0x8d69, 0x96f5, 0xc11e,
841 }, .{
842 0xee30, 0x82f0, 0x270b, 0x1498, 0x4c60, 0x6e72, 0x0b64, 0x02d4,
843 });
844 try testType(@Vector(16, u16), .{
845 0x9191, 0xd23e, 0xf844, 0xd84a, 0xe907, 0xf1e8, 0x712d, 0x90af,
846 0x6541, 0x3fa6, 0x92eb, 0xe35a, 0xc0c9, 0xcb47, 0xb790, 0x4453,
847 }, .{
848 0x21c3, 0x4039, 0x9b71, 0x60bd, 0xcd7f, 0x2ec8, 0x50ba, 0xe810,
849 0xebd4, 0x06e5, 0xed18, 0x2f66, 0x7e31, 0xe282, 0xad63, 0xb25e,
850 });
851 try testType(@Vector(32, u16), .{
852 0x6b6a, 0x30a9, 0xc267, 0x2231, 0xbf4c, 0x00bc, 0x9c2c, 0x2928,
853 0xecad, 0x82df, 0xcfb0, 0xa4e5, 0x909b, 0x1b05, 0xaf40, 0x1fd9,
854 0xcec6, 0xd8dc, 0xd4b5, 0x6d59, 0x8e3f, 0x4d8a, 0xb83a, 0x808e,
855 0x47e2, 0x5782, 0x59bf, 0xcefc, 0x5179, 0x3f48, 0x93dc, 0x66d2,
856 }, .{
857 0x1be8, 0xe98c, 0xf9b3, 0xb008, 0x2f8d, 0xf087, 0xc9b9, 0x75aa,
858 0xbd16, 0x9540, 0xc5bd, 0x2b2c, 0xd43f, 0x9394, 0x3e1d, 0xf695,
859 0x167d, 0xff7a, 0xf09d, 0xdff8, 0xdfa2, 0xc779, 0x70b7, 0x01bd,
860 0x46b3, 0x995a, 0xb7bc, 0xa79d, 0x5542, 0x961e, 0x37cd, 0x9c2a,
861 });
862 try testType(@Vector(64, u16), .{
863 0x6b87, 0xfd84, 0x436b, 0xe345, 0xfb82, 0x81fc, 0x0992, 0x45f9,
864 0x5527, 0x1f6d, 0xda46, 0x6a16, 0xf6e1, 0x8fb7, 0x3619, 0xdfe3,
865 0x64ce, 0x8ac6, 0x3ae8, 0x30e3, 0xec3b, 0x4ba7, 0x02a4, 0xa694,
866 0x8e68, 0x8f0c, 0x5e30, 0x0e55, 0x6538, 0x9852, 0xea35, 0x7be2,
867 0xdabd, 0x57e6, 0x5b38, 0x0fb2, 0x2604, 0x85e7, 0x6595, 0x8de9,
868 0x49b1, 0xe9a2, 0x3758, 0xa4d9, 0x505b, 0xc9d3, 0xddc5, 0x9a43,
869 0xfd44, 0x50f5, 0x379e, 0x03b6, 0x6375, 0x692f, 0x5586, 0xc717,
870 0x94dd, 0xee06, 0xb32d, 0x0bb9, 0x0e35, 0x5f8f, 0x0ba4, 0x19a8,
871 }, .{
872 0xbeeb, 0x3e54, 0x6486, 0x5167, 0xe432, 0x57cf, 0x9cac, 0x922e,
873 0xd2f8, 0x5614, 0x2e7f, 0x19cf, 0x9a07, 0x0524, 0x168f, 0x4464,
874 0x4def, 0x83ce, 0x97b4, 0xf269, 0xda5f, 0x28c1, 0x9cc3, 0xfa7c,
875 0x25a0, 0x912d, 0x25b2, 0xd60d, 0xcd82, 0x0e03, 0x40cc, 0xc9dc,
876 0x18eb, 0xc609, 0xb06d, 0x29e0, 0xf3c7, 0x997b, 0x8ca2, 0xa750,
877 0xc9bc, 0x8f0e, 0x3916, 0xd905, 0x94f8, 0x397f, 0x98b5, 0xc61d,
878 0x05db, 0x3e7a, 0xf750, 0xe8de, 0x3225, 0x81d9, 0x612e, 0x0a7e,
879 0x2c02, 0xff5b, 0x19ca, 0xbbf5, 0x870e, 0xc9ca, 0x47bb, 0xcfcc,
880 });
881
882 try testType(@Vector(1, u32), .{
883 0x1d0d9cc4,
884 }, .{
885 0xce2d0ab6,
886 });
887 try testType(@Vector(2, u32), .{
888 0x5ab78c03, 0xd21bb513,
889 }, .{
890 0x8a6664eb, 0x79eac37d,
891 });
892 try testType(@Vector(4, u32), .{
893 0x234d576e, 0x4151cc9c, 0x39f558e4, 0xba935a32,
894 }, .{
895 0x398f2a9d, 0x4540f093, 0x9225551c, 0x3bac865b,
896 });
897 try testType(@Vector(8, u32), .{
898 0xb8336635, 0x2fc3182c, 0x27a00123, 0x71587fbe,
899 0x9cbc65d2, 0x6f4bb0e6, 0x362594ce, 0x9971df38,
900 }, .{
901 0x5727e734, 0x972b0313, 0xff25f5dc, 0x924f8e55,
902 0x04920a61, 0xa1c3b334, 0xf52df4b6, 0x5ef72ecc,
903 });
904 try testType(@Vector(16, u32), .{
905 0xfb566f9e, 0x9ad4691a, 0x5b5f9ec0, 0x5a572d2a,
906 0x8f2f226b, 0x2dfc7e33, 0x9fb07e32, 0x9d672a2e,
907 0xbedc3cee, 0x6872428d, 0xbc73a9fd, 0xd4d5f055,
908 0x69c1e9ee, 0x65038deb, 0x1449061a, 0x48412ec2,
909 }, .{
910 0x96cbe946, 0x3f24f60b, 0xaeacdc53, 0x7611a8b4,
911 0x031a67a8, 0x52a26828, 0x75646f4b, 0xb75902c3,
912 0x1f881f08, 0x834e02a4, 0x5e5b40eb, 0xc75c264d,
913 0xa8251e09, 0x28e46bbd, 0x12cb1f31, 0x9a2af615,
914 });
915 try testType(@Vector(32, u32), .{
916 0x131bbb7b, 0xa7311026, 0x9d5e59a0, 0x99b090d6,
917 0xfe969e2e, 0x04547697, 0x357d3250, 0x43be6d7a,
918 0x16ecf5c5, 0xf60febcc, 0x1d1e2602, 0x138a96d2,
919 0x9117ba72, 0x9f185b32, 0xc10e23fd, 0x3e6b7fd8,
920 0x4dc9be70, 0x2ee30047, 0xaffeab60, 0x7172d362,
921 0x6154bfcf, 0x5388dc3e, 0xd6e5a76e, 0x8b782f2d,
922 0xacbef4a2, 0x843aca71, 0x25d8ab5c, 0xe1a63a39,
923 0xc26212e5, 0x0847b84b, 0xb53541e5, 0x0c8e44db,
924 }, .{
925 0x4ad92822, 0x715b623f, 0xa5bed8a7, 0x937447a9,
926 0x7ecb38eb, 0x0a2f3dfc, 0x96f467a2, 0xec882793,
927 0x41a8707f, 0xf7310656, 0x76217b80, 0x2058e5fc,
928 0x26682154, 0x87313e31, 0x4bdc480a, 0x193572ff,
929 0x60b03c75, 0x0fe45908, 0x56c73703, 0xdb86554c,
930 0xdda2dd7d, 0x34371b27, 0xe4e6ad50, 0x422d1828,
931 0x1de3801b, 0xdce268d3, 0x20af9ec8, 0x188a591f,
932 0xf080e943, 0xc8718d14, 0x3f920382, 0x18d101b5,
933 });
934
935 try testType(@Vector(1, u64), .{
936 0x333f593bf9d08546,
937 }, .{
938 0x6918bd767e730778,
939 });
940 try testType(@Vector(2, u64), .{
941 0x4cd89a317b03d430, 0x28998f61842f63a9,
942 }, .{
943 0x6c34db64af0e217e, 0x57aa5d02cd45dceb,
944 });
945 try testType(@Vector(4, u64), .{
946 0x946cf7e7484691c9, 0xf4fc5be2a762fcbf,
947 0x71cc83bc25abaf14, 0xc69cef44c6f833a1,
948 }, .{
949 0x9f90cbd6c3ce1d4e, 0x182f65295dff4e84,
950 0x4dfe62c59fed0040, 0x18402347c1db1999,
951 });
952 try testType(@Vector(8, u64), .{
953 0x92c6281333943e2c, 0xa97750504668efb5,
954 0x234be51057c0181f, 0xefbc1f407f3df4fb,
955 0x8da6cc7c39cebb94, 0xb408f7e56feee497,
956 0x2363f1f8821592ed, 0x01716e800c0619e1,
957 }, .{
958 0xa617426684147e7e, 0x7542da7ebe093a7b,
959 0x3f21d99ac57606b7, 0x65cd36d697d22de4,
960 0xed23d6bdf176c844, 0x2d4573f100ff7b58,
961 0x4968f4d21b49f8ab, 0xf5d9a205d453e933,
962 });
963 try testType(@Vector(16, u64), .{
964 0x2f61a4ee66177b4a, 0xf13b286b279f6a93,
965 0x36b46beb63665318, 0x74294dbde0da98d2,
966 0x3aa872ba60b936eb, 0xe8f698b36e62600b,
967 0x9e8930c21a6a1a76, 0x876998b09b8eb03c,
968 0xa0244771a2ec0adb, 0xb4c72bff3d3ac1a2,
969 0xd70677210830eced, 0x6622abc1734dd72d,
970 0x157e2bb0d57d6596, 0x2aac8192fb7ef973,
971 0xc4a0ca92f34d7b13, 0x04300f8ad1845246,
972 }, .{
973 0xeaf71dcf0eb76f5d, 0x0e84b1b63dc97139,
974 0x0f64cc38d23c94a1, 0x12775cf0816349b7,
975 0xfdcf13387ba48d54, 0xf8d3c672cacd8779,
976 0xe728c1f5eb56ab1e, 0x05931a34877f7a69,
977 0x1861a763c8dafd1f, 0x4ac97573ecd5739f,
978 0x3384414c9bf77b8c, 0x32c15bbd04a5ddc4,
979 0xbfd88aee1d82ed32, 0x20e91c15b701059a,
980 0xed533d18f8657f3f, 0x1ddd7cd7f6bab957,
981 });
982
983 try testType(@Vector(1, u128), .{
984 0x5f11e16b0ca3392f907a857881455d2e,
985 }, .{
986 0xf9142d73b408fd6955922f9fc147f7d7,
987 });
988 try testType(@Vector(2, u128), .{
989 0xee0fb41fabd805923fb21b5c658e3a87,
990 0x2352e74aad6c58b3255ff0bba5aa6552,
991 }, .{
992 0x8d822f9fdd9cb9a5b43513b14419b224,
993 0x1aef2a02704379e38ead4d53d69e4cc4,
994 });
995 try testType(@Vector(4, u128), .{
996 0xc74437a4ea3bbbb193dbf0ea2f0c5281,
997 0x039e4b1640868248780db1834a0027eb,
998 0xb9e8bb34155b2b238da20331d08ff85b,
999 0x863802d34a54c2e6aa71dd0f067c4904,
1000 }, .{
1001 0x7471bae24ff7b84ab107f86ba2b7d1e7,
1002 0x8f34c449d0576e682c20bda74aa6b6c9,
1003 0x1f34c3efa167b61c48c9d5ec01a1a93f,
1004 0x71c8318fcf3ddc7be058c73a52dce9e3,
1005 });
1006 try testType(@Vector(8, u128), .{
1007 0xbf2db71463037f55ee338431f902a906,
1008 0xb7ad317626655f38ab25ae30d8a1aa67,
1009 0x7d3c5a3ffaa607b5560d69ae3fcf7863,
1010 0x009a39a8badf8b628c686dc176aa1273,
1011 0x49dba3744c91304cc7bbbdab61b6c969,
1012 0x6ec664b624f7acf79ce69d80ed7bc85c,
1013 0xe02d7a303c0f00c39010f3b815547f1c,
1014 0xb13e1ee914616f58cffe6acd33d9b5c8,
1015 }, .{
1016 0x2f2d355a071942a7384f82ba72a945b8,
1017 0x61f151b3afec8cb7664f813cecf581d1,
1018 0x5bfbf5484f3a07f0eacc4739ff48af80,
1019 0x59c0abbf8d829cf525a87d5c9c41a38a,
1020 0xdad8b18eb680f0520ca49ebfb5842e22,
1021 0xa05adcaedd9057480b3ba0413d003cec,
1022 0x8b0b4a27fc94a0e90652d19bc755b63d,
1023 0xa858bce5ad0e48c13588a4e170e8667c,
1024 });
1025
1026 try testType(@Vector(1, u256), .{
1027 0x28df37e1f57a56133ba3f5b5b2164ce24eb6c29a8973a597fd91fbee8ab4bafb,
1028 }, .{
1029 0x63f725028cab082b5b1e6cb474428c8c3655cf438f3bb05c7a87f8270198f357,
1030 });
1031 try testType(@Vector(2, u256), .{
1032 0xcc79740b85597ef411e6d7e92049dfaa2328781ea4911540a3dcb512b71c7f3c,
1033 0x51ae46d2f93cbecff1578481f6ddc633dacee94ecaf81597c752c5c5db0ae766,
1034 }, .{
1035 0x257f0107305cb71cef582a9a58612a019f335e390d7998f51f5898f245874a6e,
1036 0x0a95a17323a4d16a715720f122b752785e9877e3dd3d3f9b72cdac3d1139a81f,
1037 });
1038 try testType(@Vector(4, u256), .{
1039 0x19667a6e269342cba437a8904c7ba42a762358d32723723ae2637b01124e63c5,
1040 0x14f7d3599a7edc7bcc46874f68d4291793e6ef72bd1f3763bc5e923f54f2f781,
1041 0x1c939de0ae980b80de773a04088ba45813441336cdfdc281ee356c98d71f653b,
1042 0x39f5d755965382fe13d1b1d6690b8e3827f153f8166768c4ad8a28a963b781f2,
1043 }, .{
1044 0xbe03de37cdcb8126083b4e86cd8a9803121d31b186fd5ce555ad77ce624dd6c7,
1045 0xa0c0730f0d7f141cc959849d09730b049f00693361539f1bc4758270554a60c1,
1046 0x2664bdba8de4eaa36ecee72f6bfec5b4daa6b4e00272d8116f2cc532c29490cc,
1047 0xe47a122bd45d5e7d69722d864a6b795ddee965a0993094f8791dd309d692de8b,
1048 });
1049
1050 try testType(@Vector(1, u512), .{
1051 0x651058c1d89a8f34cfc5e66b6d25294eecfcc4a7e1e4a356eb51ee7d7b2db25378e4afee51b7d18d16e520772a60c50a02d7966f40ced1870b32c658e5821397,
1052 }, .{
1053 0xd726e265ec80cb99510ba4f480ca64e959de5c528a7f54c386ecad22eeeefa845f0fd44b1bd64258a5f868197ee2d8fed59df9c9f0b72e74051a7ff20230880e,
1054 });
1055 try testType(@Vector(2, u512), .{
1056 0x22c8183c95cca8b09fdf541e431b73e9e4a1a5a00dff12381937fab52681d09d38ea25727d7025a2be08942cfa01535759e1644792e347c7901ec94b343c6337,
1057 0x292fdf644e75927e1aea9465ae2f60fb27550cd095f1afdea2cf7855286d26fbeed1c0b9c0474b73cb6b75621f7eadaa2f94ec358179ce2aaa0766df20da1ef3,
1058 }, .{
1059 0xe1cd8c0ca244c6626d4415e10b4ac43fa69e454c529c24fec4b13e6b945684d4ea833709c16c636ca78cffa5c5bf0fe945cd714a9ad695184a6bdad31dec9e31,
1060 0x8fa3d86099e9e2789d72f8e792290356d659ab20ac0414ff94745984c6ae7d986082197bb849889f912e896670aa2c1a11bd7e66e3f650710b0f0a18a1533f90,
1061 });
1062
1063 try testType(@Vector(1, u1024), .{
1064 0x0ca1a0dfaf8bb1da714b457d23c71aef948e66c7cd45c0aa941498a796fb18502ec32f34e885d0a107d44ae81595f8b52c2f0fb38e584b7139903a0e8a823ae20d01ca0662722dd474e7efc40f32d74cc065d97d8a09d0447f1ab6107fa0a57f3f8c866ae872506627ce82f18add79cee8dc69837f4ead3ca770c4d622d7e544,
1065 }, .{
1066 0xf1e3bbe031d59351770a7a501b6e969b2c00d144f17648db3f944b69dfeb7be72e5ff933a061eba4eaa422f8ca09e5a97d0b0dd740fd4076eba8c72d7a278523f399202dc2d043c4e0eb58a2bcd4066e2146e321810b1ee4d3afdddb4f026bcc7905ce17e033a7727b4e08f33b53c63d8c9f763fc6c31d0523eb38c30d5e40bc,
1067 });
1294 };
10681295}
10691296
10701297inline fn bitNot(comptime Type: type, rhs: Type) @TypeOf(~rhs) {
10711298 return ~rhs;
10721299}
10731300test bitNot {
1074 try testUnary(bitNot);
1301 try Unary(bitNot).testIntTypes();
1302 try Unary(bitNot).testIntVectorTypes();
1303}
1304
1305inline fn abs(comptime Type: type, rhs: Type) @TypeOf(@abs(rhs)) {
1306 return @abs(rhs);
1307}
1308test abs {
1309 try Unary(abs).testIntTypes();
1310 try Unary(abs).testIntVectorTypes();
10751311}
10761312
10771313inline fn clz(comptime Type: type, rhs: Type) @TypeOf(@clz(rhs)) {
10781314 return @clz(rhs);
10791315}
10801316test clz {
1081 try testUnary(clz);
1317 try Unary(clz).testIntTypes();
1318 try Unary(clz).testIntVectorTypes();
10821319}
10831320
10841321inline fn bitAnd(comptime Type: type, lhs: Type, rhs: Type) @TypeOf(lhs & rhs) {
10851322 return lhs & rhs;
10861323}
10871324test bitAnd {
1088 try testBinary(bitAnd);
1325 try Binary(bitAnd).testIntTypes();
1326 try Binary(bitAnd).testIntVectorTypes();
10891327}
10901328
10911329inline fn bitOr(comptime Type: type, lhs: Type, rhs: Type) @TypeOf(lhs | rhs) {
10921330 return lhs | rhs;
10931331}
10941332test bitOr {
1095 try testBinary(bitOr);
1333 try Binary(bitOr).testIntTypes();
1334 try Binary(bitOr).testIntVectorTypes();
10961335}
10971336
10981337inline fn bitXor(comptime Type: type, lhs: Type, rhs: Type) @TypeOf(lhs ^ rhs) {
10991338 return lhs ^ rhs;
11001339}
11011340test bitXor {
1102 try testBinary(bitXor);
1341 try Binary(bitXor).testIntTypes();
1342 try Binary(bitXor).testIntVectorTypes();
11031343}