@zigc/lib 0.17.0-dev.340 → 0.17.0-dev.387

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3370,6 +3370,103 @@ pub const cpu = struct {
3370
3370
  .zvl1024b,
3371
3371
  }),
3372
3372
  };
3373
+ pub const spacemit_a100: CpuModel = .{
3374
+ .name = "spacemit_a100",
3375
+ .llvm_name = null,
3376
+ .features = featureSet(&[_]Feature{
3377
+ .@"64bit",
3378
+ .a,
3379
+ .b,
3380
+ .c,
3381
+ .dlen_factor_2,
3382
+ .i,
3383
+ .m,
3384
+ .optimized_nf2_segment_load_store,
3385
+ .optimized_nf3_segment_load_store,
3386
+ .optimized_nf4_segment_load_store,
3387
+ .smepmp,
3388
+ .smnpm,
3389
+ .smstateen,
3390
+ .ssccptr,
3391
+ .sscofpmf,
3392
+ .sscounterenw,
3393
+ .ssnpm,
3394
+ .sspm,
3395
+ .sstc,
3396
+ .sstvala,
3397
+ .sstvecd,
3398
+ .ssu64xl,
3399
+ .supm,
3400
+ .svade,
3401
+ .svbare,
3402
+ .svinval,
3403
+ .svnapot,
3404
+ .svpbmt,
3405
+ .unaligned_scalar_mem,
3406
+ .v,
3407
+ .vxrm_pipeline_flush,
3408
+ .za64rs,
3409
+ .zawrs,
3410
+ .zbc,
3411
+ .zbkc,
3412
+ .zcb,
3413
+ .zcmop,
3414
+ .zfa,
3415
+ .zfh,
3416
+ .zic64b,
3417
+ .zicbom,
3418
+ .zicbop,
3419
+ .zicboz,
3420
+ .ziccamoa,
3421
+ .ziccif,
3422
+ .zicclsm,
3423
+ .ziccrse,
3424
+ .zicntr,
3425
+ .zicond,
3426
+ .zifencei,
3427
+ .zihintntl,
3428
+ .zihintpause,
3429
+ .zihpm,
3430
+ .zimop,
3431
+ .zkt,
3432
+ .zvbb,
3433
+ .zvfbfwma,
3434
+ .zvfh,
3435
+ .zvkng,
3436
+ .zvknha,
3437
+ .zvksc,
3438
+ .zvksg,
3439
+ .zvl1024b,
3440
+ }),
3441
+ };
3442
+ pub const spacemit_x100: CpuModel = .{
3443
+ .name = "spacemit_x100",
3444
+ .llvm_name = null,
3445
+ .features = featureSet(&[_]Feature{
3446
+ .dlen_factor_2,
3447
+ .optimized_nf2_segment_load_store,
3448
+ .optimized_nf3_segment_load_store,
3449
+ .optimized_nf4_segment_load_store,
3450
+ .rva23s64,
3451
+ .smepmp,
3452
+ .smnpm,
3453
+ .smstateen,
3454
+ .sspm,
3455
+ .unaligned_scalar_mem,
3456
+ .vxrm_pipeline_flush,
3457
+ .xsmtvdot,
3458
+ .zbc,
3459
+ .zbkc,
3460
+ .zfh,
3461
+ .zvfbfwma,
3462
+ .zvfh,
3463
+ .zvkng,
3464
+ .zvknha,
3465
+ .zvksc,
3466
+ .zvksg,
3467
+ .zvl256b,
3468
+ }),
3469
+ };
3373
3470
  pub const spacemit_x60: CpuModel = .{
3374
3471
  .name = "spacemit_x60",
3375
3472
  .llvm_name = "spacemit-x60",
package/std/Target.zig CHANGED
@@ -250,10 +250,12 @@ pub const Os = struct {
250
250
  win11_ga = 0x0A00000F, //aka win11_22h2
251
251
  win11_ge = 0x0A000010, //aka win11_23h2
252
252
  win11_dt = 0x0A000011, //aka win11_24h2
253
+ win11_br = 0x0A000012, //aka win11_25h2
254
+ win11_kr = 0x0A000013, //aka win11_26h1
253
255
  _,
254
256
 
255
257
  /// Latest Windows version that the Zig Standard Library is aware of
256
- pub const latest = WindowsVersion.win11_dt;
258
+ pub const latest = WindowsVersion.win11_kr;
257
259
 
258
260
  /// Compared against build numbers reported by the runtime to distinguish win10 versions,
259
261
  /// where 0x0A000000 + index corresponds to the WindowsVersion u32 value.
@@ -276,6 +278,8 @@ pub const Os = struct {
276
278
  22621, //win11_ga aka win11_22h2
277
279
  22631, //win11_ge aka win11_23h2
278
280
  26100, //win11_dt aka win11_24h2
281
+ 26200, //win11_br aka win11_25h2
282
+ 28000, //win11_kr aka win11_26h1
279
283
  };
280
284
 
281
285
  /// Returns whether the first version `ver` is newer (greater) than or equal to the second version `ver`.
@@ -407,20 +411,20 @@ pub const Os = struct {
407
411
 
408
412
  .contiki => .{
409
413
  .semver = .{
410
- .min = .{ .major = 4, .minor = 0, .patch = 0 },
414
+ .min = .{ .major = 5, .minor = 0, .patch = 0 },
411
415
  .max = .{ .major = 5, .minor = 1, .patch = 0 },
412
416
  },
413
417
  },
414
418
  .fuchsia => .{
415
419
  .semver = .{
416
- .min = .{ .major = 1, .minor = 0, .patch = 0 },
417
- .max = .{ .major = 28, .minor = 0, .patch = 0 },
420
+ .min = .{ .major = 27, .minor = 0, .patch = 0 },
421
+ .max = .{ .major = 30, .minor = 0, .patch = 0 },
418
422
  },
419
423
  },
420
424
  .hermit => .{
421
425
  .semver = .{
422
- .min = .{ .major = 0, .minor = 5, .patch = 0 },
423
- .max = .{ .major = 0, .minor = 11, .patch = 0 },
426
+ .min = .{ .major = 0, .minor = 8, .patch = 0 },
427
+ .max = .{ .major = 0, .minor = 13, .patch = 2 },
424
428
  },
425
429
  },
426
430
 
@@ -430,7 +434,7 @@ pub const Os = struct {
430
434
  .min = .{ .major = 0, .minor = 9, .patch = 0 },
431
435
  .max = .{ .major = 0, .minor = 9, .patch = 0 },
432
436
  },
433
- .glibc = .{ .major = 2, .minor = 28, .patch = 0 },
437
+ .glibc = .{ .major = 2, .minor = 31, .patch = 0 },
434
438
  },
435
439
  },
436
440
  .linux => .{
@@ -449,7 +453,7 @@ pub const Os = struct {
449
453
 
450
454
  break :blk default_min;
451
455
  },
452
- .max = .{ .major = 6, .minor = 19, .patch = 0 },
456
+ .max = .{ .major = 7, .minor = 0, .patch = 9 },
453
457
  },
454
458
  .glibc = blk: {
455
459
  // For 32-bit targets that traditionally used 32-bit time, we require
@@ -490,14 +494,14 @@ pub const Os = struct {
490
494
  },
491
495
  .rtems => .{
492
496
  .semver = .{
493
- .min = .{ .major = 5, .minor = 1, .patch = 0 },
494
- .max = .{ .major = 6, .minor = 1, .patch = 0 },
497
+ .min = .{ .major = 5, .minor = 3, .patch = 0 },
498
+ .max = .{ .major = 6, .minor = 2, .patch = 0 },
495
499
  },
496
500
  },
497
501
 
498
502
  .dragonfly => .{
499
503
  .semver = .{
500
- .min = .{ .major = 6, .minor = 0, .patch = 0 },
504
+ .min = .{ .major = 6, .minor = 4, .patch = 0 },
501
505
  .max = .{ .major = 6, .minor = 4, .patch = 2 },
502
506
  },
503
507
  },
@@ -516,7 +520,7 @@ pub const Os = struct {
516
520
 
517
521
  break :blk default_min;
518
522
  },
519
- .max = .{ .major = 15, .minor = 0, .patch = 0 },
523
+ .max = .{ .major = 15, .minor = 1, .patch = 0 },
520
524
  },
521
525
  },
522
526
  .netbsd => .{
@@ -559,37 +563,37 @@ pub const Os = struct {
559
563
  .driverkit => .{
560
564
  .semver = .{
561
565
  .min = .{ .major = 20, .minor = 0, .patch = 0 },
562
- .max = .{ .major = 25, .minor = 0, .patch = 0 },
566
+ .max = .{ .major = 25, .minor = 5, .patch = 0 },
563
567
  },
564
568
  },
565
569
  .macos => .{
566
570
  .semver = .{
567
- .min = .{ .major = 13, .minor = 0, .patch = 0 },
568
- .max = .{ .major = 15, .minor = 6, .patch = 0 },
571
+ .min = .{ .major = 14, .minor = 0, .patch = 0 },
572
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
569
573
  },
570
574
  },
571
575
  .ios, .maccatalyst => .{
572
576
  .semver = .{
573
577
  .min = .{ .major = 15, .minor = 0, .patch = 0 },
574
- .max = .{ .major = 18, .minor = 6, .patch = 0 },
578
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
575
579
  },
576
580
  },
577
581
  .tvos => .{
578
582
  .semver = .{
579
- .min = .{ .major = 15, .minor = 0, .patch = 0 },
580
- .max = .{ .major = 18, .minor = 5, .patch = 0 },
583
+ .min = .{ .major = 26, .minor = 0, .patch = 0 },
584
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
581
585
  },
582
586
  },
583
587
  .visionos => .{
584
588
  .semver = .{
585
- .min = .{ .major = 1, .minor = 0, .patch = 0 },
586
- .max = .{ .major = 2, .minor = 5, .patch = 0 },
589
+ .min = .{ .major = 26, .minor = 0, .patch = 0 },
590
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
587
591
  },
588
592
  },
589
593
  .watchos => .{
590
594
  .semver = .{
591
- .min = .{ .major = 8, .minor = 0, .patch = 0 },
592
- .max = .{ .major = 11, .minor = 6, .patch = 0 },
595
+ .min = .{ .major = 11, .minor = 0, .patch = 0 },
596
+ .max = .{ .major = 26, .minor = 5, .patch = 0 },
593
597
  },
594
598
  },
595
599
 
@@ -644,8 +648,8 @@ pub const Os = struct {
644
648
 
645
649
  .amdhsa => .{
646
650
  .semver = .{
647
- .min = .{ .major = 5, .minor = 0, .patch = 0 },
648
- .max = .{ .major = 7, .minor = 1, .patch = 0 },
651
+ .min = .{ .major = 6, .minor = 1, .patch = 0 },
652
+ .max = .{ .major = 7, .minor = 2, .patch = 3 },
649
653
  },
650
654
  },
651
655
  .amdpal => .{
@@ -656,8 +660,8 @@ pub const Os = struct {
656
660
  },
657
661
  .cuda => .{
658
662
  .semver = .{
659
- .min = .{ .major = 11, .minor = 0, .patch = 1 },
660
- .max = .{ .major = 13, .minor = 0, .patch = 2 },
663
+ .min = .{ .major = 12, .minor = 5, .patch = 0 },
664
+ .max = .{ .major = 13, .minor = 2, .patch = 0 },
661
665
  },
662
666
  },
663
667
  .nvcl,
@@ -683,7 +687,7 @@ pub const Os = struct {
683
687
  .vulkan => .{
684
688
  .semver = .{
685
689
  .min = .{ .major = 1, .minor = 2, .patch = 0 },
686
- .max = .{ .major = 1, .minor = 4, .patch = 331 },
690
+ .max = .{ .major = 1, .minor = 4, .patch = 352 },
687
691
  },
688
692
  },
689
693
  };
@@ -751,6 +755,7 @@ pub const kvx = @import("Target/kvx.zig");
751
755
  pub const lanai = @import("Target/lanai.zig");
752
756
  pub const loongarch = @import("Target/loongarch.zig");
753
757
  pub const m68k = @import("Target/m68k.zig");
758
+ pub const m88k = @import("Target/generic.zig");
754
759
  pub const microblaze = @import("Target/generic.zig");
755
760
  pub const mips = @import("Target/mips.zig");
756
761
  pub const msp430 = @import("Target/msp430.zig");
@@ -798,6 +803,7 @@ pub const Abi = enum {
798
803
  simulator,
799
804
  ohos,
800
805
  ohoseabi,
806
+ call0,
801
807
 
802
808
  // LLVM tags deliberately omitted:
803
809
  // - amplification
@@ -1091,6 +1097,7 @@ pub fn toElfMachine(target: *const Target) std.elf.EM {
1091
1097
  .kvx => .KVX,
1092
1098
  .lanai => .LANAI,
1093
1099
  .loongarch32, .loongarch64 => .LOONGARCH,
1100
+ .m88k => .@"88K",
1094
1101
  .m68k => .@"68K",
1095
1102
  .microblaze, .microblazeel => .MICROBLAZE,
1096
1103
  .mips, .mips64, .mipsel, .mips64el => .MIPS,
@@ -1154,6 +1161,7 @@ pub fn toCoffMachine(target: *const Target) std.coff.IMAGE.FILE.MACHINE {
1154
1161
  .kalimba,
1155
1162
  .kvx,
1156
1163
  .lanai,
1164
+ .m88k,
1157
1165
  .m68k,
1158
1166
  .microblaze,
1159
1167
  .microblazeel,
@@ -1364,6 +1372,7 @@ pub const Cpu = struct {
1364
1372
  loongarch32,
1365
1373
  loongarch64,
1366
1374
  m68k,
1375
+ m88k,
1367
1376
  microblaze,
1368
1377
  microblazeel,
1369
1378
  mips,
@@ -1439,6 +1448,7 @@ pub const Cpu = struct {
1439
1448
  lanai,
1440
1449
  loongarch,
1441
1450
  m68k,
1451
+ m88k,
1442
1452
  microblaze,
1443
1453
  mips,
1444
1454
  msp430,
@@ -1477,6 +1487,7 @@ pub const Cpu = struct {
1477
1487
  .lanai => .lanai,
1478
1488
  .loongarch32, .loongarch64 => .loongarch,
1479
1489
  .m68k => .m68k,
1490
+ .m88k => .m88k,
1480
1491
  .microblaze, .microblazeel => .microblaze,
1481
1492
  .mips, .mipsel, .mips64, .mips64el => .mips,
1482
1493
  .msp430 => .msp430,
@@ -1710,6 +1721,7 @@ pub const Cpu = struct {
1710
1721
  .hppa64,
1711
1722
  .lanai,
1712
1723
  .m68k,
1724
+ .m88k,
1713
1725
  .microblaze,
1714
1726
  .mips,
1715
1727
  .mips64,
@@ -1922,6 +1934,9 @@ pub const Cpu = struct {
1922
1934
  .m68k_interrupt,
1923
1935
  => &.{.m68k},
1924
1936
 
1937
+ .m88k_sysv,
1938
+ => &.{.m88k},
1939
+
1925
1940
  .microblaze_std,
1926
1941
  .microblaze_interrupt,
1927
1942
  => &.{ .microblaze, .microblazeel },
@@ -2046,6 +2061,7 @@ pub const Cpu = struct {
2046
2061
  },
2047
2062
  .armeb, .thumbeb => &arm.cpu.baseline,
2048
2063
  .aarch64 => switch (os.tag) {
2064
+ .haiku => &aarch64.cpu.cortex_a55,
2049
2065
  .driverkit, .maccatalyst, .macos => &aarch64.cpu.apple_m1,
2050
2066
  .ios, .tvos => &aarch64.cpu.apple_a7,
2051
2067
  .visionos => &aarch64.cpu.apple_m2,
@@ -2061,21 +2077,36 @@ pub const Cpu = struct {
2061
2077
  .lanai => &lanai.cpu.v11, // clang does not have a generic lanai model.
2062
2078
  .loongarch32 => &loongarch.cpu.la32v1_0,
2063
2079
  .loongarch64 => &loongarch.cpu.la64v1_0,
2064
- .m68k => &m68k.cpu.M68000,
2080
+ .m68k => &m68k.cpu.M68030,
2065
2081
  .mips => &mips.cpu.mips32r2,
2066
2082
  .mipsel => switch (os.tag) {
2067
2083
  .psp => &mips.cpu.allegrex,
2068
2084
  else => &mips.cpu.mips32r2,
2069
2085
  },
2070
- .mips64, .mips64el => &mips.cpu.mips64r2,
2086
+ .mips64 => switch (os.tag) {
2087
+ .openbsd => &mips.cpu.octeon,
2088
+ else => &mips.cpu.mips64r2,
2089
+ },
2090
+ .mips64el => &mips.cpu.mips64r2,
2071
2091
  .msp430 => &msp430.cpu.msp430,
2072
2092
  .nvptx, .nvptx64 => &nvptx.cpu.sm_52,
2093
+ .powerpc => switch (os.tag) {
2094
+ .openbsd => &powerpc.cpu.@"750",
2095
+ else => generic(arch),
2096
+ },
2097
+ .powerpc64 => switch (os.tag) {
2098
+ .openbsd => &powerpc.cpu.pwr9,
2099
+ else => generic(arch),
2100
+ },
2073
2101
  .powerpc64le => &powerpc.cpu.ppc64le,
2074
2102
  .riscv32, .riscv32be => &riscv.cpu.baseline_rv32,
2075
2103
  .riscv64, .riscv64be => &riscv.cpu.baseline_rv64,
2076
- // gcc/clang do not have a generic s390x model.
2077
- .s390x => &s390x.cpu.arch8,
2078
- .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
2104
+ .s390x => &s390x.cpu.arch11,
2105
+ .sparc => switch (os.tag) {
2106
+ .linux => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
2107
+ else => generic(arch),
2108
+ },
2109
+ .sparc64 => &sparc.cpu.ultrasparc,
2079
2110
  .x86 => &x86.cpu.pentium4,
2080
2111
  .x86_64 => switch (os.tag) {
2081
2112
  .driverkit, .maccatalyst => &x86.cpu.nehalem,
@@ -2085,6 +2116,7 @@ pub const Cpu = struct {
2085
2116
  else => generic(arch),
2086
2117
  },
2087
2118
  .xcore => &xcore.cpu.xs1b_generic,
2119
+ .xtensa => &xtensa.cpu.esp32,
2088
2120
  .wasm32, .wasm64 => &wasm.cpu.lime1,
2089
2121
 
2090
2122
  else => generic(arch),
@@ -2537,6 +2569,7 @@ pub const DynamicLinker = struct {
2537
2569
  .m68k,
2538
2570
  .microblaze,
2539
2571
  .microblazeel,
2572
+ .or1k,
2540
2573
  .powerpc64,
2541
2574
  .powerpc64le,
2542
2575
  .s390x,
@@ -2614,8 +2647,6 @@ pub const DynamicLinker = struct {
2614
2647
 
2615
2648
  .arm,
2616
2649
  .armeb,
2617
- .thumb,
2618
- .thumbeb,
2619
2650
  => initFmt("/lib/ld-linux{s}.so.3", .{switch (abi) {
2620
2651
  .gnueabi => "",
2621
2652
  .gnueabihf => "-armhf",
@@ -2624,6 +2655,7 @@ pub const DynamicLinker = struct {
2624
2655
 
2625
2656
  .aarch64,
2626
2657
  .aarch64_be,
2658
+ .or1k,
2627
2659
  => |arch| if (abi == .gnu) initFmt("/lib/ld-linux-{s}.so.1", .{@tagName(arch)}) else none,
2628
2660
 
2629
2661
  // TODO: `-be` architecture support.
@@ -2786,6 +2818,7 @@ pub const DynamicLinker = struct {
2786
2818
  .arm,
2787
2819
  .aarch64,
2788
2820
  .hppa,
2821
+ .m88k,
2789
2822
  .mips64,
2790
2823
  .mips64el,
2791
2824
  .powerpc,
@@ -2893,6 +2926,7 @@ pub fn ptrBitWidth_arch_abi(cpu_arch: Cpu.Arch, abi: Abi) u16 {
2893
2926
  .lanai,
2894
2927
  .loongarch32,
2895
2928
  .m68k,
2929
+ .m88k,
2896
2930
  .microblaze,
2897
2931
  .microblazeel,
2898
2932
  .mips,
@@ -3478,6 +3512,7 @@ pub fn cTypeAlignment(target: *const Target, c_type: CType) u16 {
3478
3512
  .hppa,
3479
3513
  .lanai,
3480
3514
  .m68k,
3515
+ .m88k,
3481
3516
  .mips,
3482
3517
  .mipsel,
3483
3518
  .nvptx,
@@ -3587,6 +3622,7 @@ pub fn cTypePreferredAlignment(target: *const Target, c_type: CType) u16 {
3587
3622
  .hppa,
3588
3623
  .lanai,
3589
3624
  .m68k,
3625
+ .m88k,
3590
3626
  .mips,
3591
3627
  .mipsel,
3592
3628
  .nvptx,
@@ -3658,6 +3694,7 @@ pub fn cMaxIntAlignment(target: *const Target) u16 {
3658
3694
  .lanai,
3659
3695
  .loongarch32,
3660
3696
  .m68k,
3697
+ .m88k,
3661
3698
  .mips,
3662
3699
  .mipsel,
3663
3700
  .powerpc,
@@ -3706,7 +3743,7 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention
3706
3743
  .x86_64 => switch (target.os.tag) {
3707
3744
  .windows, .uefi => .{ .x86_64_win = .{} },
3708
3745
  else => switch (target.abi) {
3709
- .gnuabin32, .muslabin32 => .{ .x86_64_x32 = .{} },
3746
+ .gnux32, .muslx32 => .{ .x86_64_x32 = .{} },
3710
3747
  else => .{ .x86_64_sysv = .{} },
3711
3748
  },
3712
3749
  },
@@ -3735,7 +3772,7 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention
3735
3772
  .riscv32, .riscv32be => .{ .riscv32_ilp32 = .{} },
3736
3773
  .sparc64 => .{ .sparc64_sysv = .{} },
3737
3774
  .sparc => .{ .sparc_sysv = .{} },
3738
- .powerpc64 => if (target.abi.isGnu())
3775
+ .powerpc64 => if (target.os.tag == .ps3 or target.abi.isGnu())
3739
3776
  .{ .powerpc64_elf = .{} }
3740
3777
  else
3741
3778
  .{ .powerpc64_elf_v2 = .{} },
@@ -3757,10 +3794,8 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention
3757
3794
  .lanai => .{ .lanai_sysv = .{} },
3758
3795
  .loongarch64 => .{ .loongarch64_lp64 = .{} },
3759
3796
  .loongarch32 => .{ .loongarch32_ilp32 = .{} },
3760
- .m68k => if (target.abi.isGnu() or target.abi.isMusl())
3761
- .{ .m68k_gnu = .{} }
3762
- else
3763
- .{ .m68k_sysv = .{} },
3797
+ .m68k => .{ .m68k_gnu = .{} },
3798
+ .m88k => .{ .m88k_sysv = .{} },
3764
3799
  .microblaze, .microblazeel => .{ .microblaze_std = .{} },
3765
3800
  .msp430 => .{ .msp430_eabi = .{} },
3766
3801
  .or1k => .{ .or1k_sysv = .{} },
package/std/Thread.zig CHANGED
@@ -1217,8 +1217,8 @@ const LinuxThreadImpl = struct {
1217
1217
  \\ ldi $16, 0
1218
1218
  \\ callsys
1219
1219
  :
1220
- : [ptr] "{r16}" (@intFromPtr(self.mapped.ptr)),
1221
- [len] "{r17}" (self.mapped.len),
1220
+ : [ptr] "{$16}" (@intFromPtr(self.mapped.ptr)),
1221
+ [len] "{$17}" (self.mapped.len),
1222
1222
  ),
1223
1223
  .hexagon => asm volatile (
1224
1224
  \\ r6 = #215 // SYS_munmap
@@ -1152,14 +1152,14 @@ pub fn Aligned(comptime T: type, comptime alignment: ?mem.Alignment) type {
1152
1152
 
1153
1153
  /// Shrinks capacity to match length.
1154
1154
  /// May invalidate element pointers.
1155
- /// If succeds it is safe to call toOwnedSliceAssert().
1155
+ /// If succeds it is safe to call `toOwnedSliceAssert`.
1156
1156
  pub fn shrinkToLen(self: *Self, gpa: Allocator) Allocator.Error!void {
1157
1157
  try self.shrinkAndFreePrecise(gpa, self.items.len);
1158
1158
  }
1159
1159
 
1160
1160
  /// Shrinks or expands capacity to match length + 1.
1161
1161
  /// May invalidate element pointers.
1162
- /// If succeds it is safe to call toOwnedSliceSentinelAssert().
1162
+ /// If succeds it is safe to call `toOwnedSliceSentinelAssert`.
1163
1163
  pub fn shrinkToLenSentinel(self: *Self, gpa: Allocator) Allocator.Error!void {
1164
1164
  std.debug.assert(self.items.len <= self.capacity);
1165
1165
  const required_len = self.items.len + 1;
package/std/atomic.zig CHANGED
@@ -442,10 +442,12 @@ pub fn cacheLineForCpu(cpu: std.Target.Cpu) u16 {
442
442
  // - https://github.com/torvalds/linux/blob/3a7e02c040b130b5545e4b115aada7bacd80a2b6/arch/sparc/include/asm/cache.h#L14
443
443
  // - https://github.com/torvalds/linux/blob/3a7e02c040b130b5545e4b115aada7bacd80a2b6/arch/microblaze/include/asm/cache.h#L15
444
444
  // - https://github.com/torvalds/linux/blob/3a7e02c040b130b5545e4b115aada7bacd80a2b6/arch/sh/include/cpu-sh4/cpu/cache.h#L10
445
+ // - https://github.com/openbsd/src/blob/1957873d2063db11dab780eca75b5e629d1e838d/sys/arch/m88k/m88k/atomic.S#L22
445
446
  .arm,
446
447
  .armeb,
447
448
  .thumb,
448
449
  .thumbeb,
450
+ .m88k,
449
451
  .microblaze,
450
452
  .microblazeel,
451
453
  .mips,
@@ -1436,6 +1436,7 @@ pub fn compactUnwindToDwarfRegNumber(unwind_reg_number: u3) !u16 {
1436
1436
  pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 {
1437
1437
  return switch (arch) {
1438
1438
  .aarch64, .aarch64_be => 32,
1439
+ .alpha => 64,
1439
1440
  .arc, .arceb => 160,
1440
1441
  .arm, .armeb, .thumb, .thumbeb => 15,
1441
1442
  .csky => 64,
@@ -1444,6 +1445,7 @@ pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 {
1444
1445
  .lanai => 2,
1445
1446
  .loongarch32, .loongarch64 => 64,
1446
1447
  .m68k => 26,
1448
+ .m88k => 64,
1447
1449
  .mips, .mipsel, .mips64, .mips64el => 66,
1448
1450
  .or1k => 35,
1449
1451
  .powerpc, .powerpcle, .powerpc64, .powerpc64le => 67,
@@ -1460,6 +1462,7 @@ pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 {
1460
1462
  pub fn fpRegNum(arch: std.Target.Cpu.Arch) u16 {
1461
1463
  return switch (arch) {
1462
1464
  .aarch64, .aarch64_be => 29,
1465
+ .alpha => 15,
1463
1466
  .arc, .arceb => 27,
1464
1467
  .arm, .armeb, .thumb, .thumbeb => 11,
1465
1468
  .csky => 14,
@@ -1468,6 +1471,7 @@ pub fn fpRegNum(arch: std.Target.Cpu.Arch) u16 {
1468
1471
  .lanai => 5,
1469
1472
  .loongarch32, .loongarch64 => 22,
1470
1473
  .m68k => 14,
1474
+ .m88k => 30,
1471
1475
  .mips, .mipsel, .mips64, .mips64el => 30,
1472
1476
  .or1k => 2,
1473
1477
  .powerpc, .powerpcle, .powerpc64, .powerpc64le => 1,
@@ -1484,6 +1488,7 @@ pub fn fpRegNum(arch: std.Target.Cpu.Arch) u16 {
1484
1488
  pub fn spRegNum(arch: std.Target.Cpu.Arch) u16 {
1485
1489
  return switch (arch) {
1486
1490
  .aarch64, .aarch64_be => 31,
1491
+ .alpha => 30,
1487
1492
  .arc, .arceb => 28,
1488
1493
  .arm, .armeb, .thumb, .thumbeb => 13,
1489
1494
  .csky => 14,
@@ -1492,6 +1497,7 @@ pub fn spRegNum(arch: std.Target.Cpu.Arch) u16 {
1492
1497
  .lanai => 4,
1493
1498
  .loongarch32, .loongarch64 => 3,
1494
1499
  .m68k => 15,
1500
+ .m88k => 31,
1495
1501
  .mips, .mipsel, .mips64, .mips64el => 29,
1496
1502
  .or1k => 1,
1497
1503
  .powerpc, .powerpcle, .powerpc64, .powerpc64le => 1,
@@ -161,6 +161,7 @@ pub const can_unwind: bool = s: {
161
161
  // Not supported yet: arm
162
162
  .openbsd => &.{
163
163
  .aarch64,
164
+ .m88k,
164
165
  .mips64,
165
166
  .mips64el,
166
167
  .riscv64,