Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

cMaxIntAlignment

Public Function
std.Target.cMaxIntAlignment
pub fn cMaxIntAlignment(target: *const Target) u16

Params

File

Target.zig:3683
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
pub fn cMaxIntAlignment(target: *const Target) u16 {
    return switch (target.cpu.arch) {
        .avr,
        .ez80,
        .spork8,
        => 1,

        .msp430,
        .x86_16,
        => 2,

        .arc,
        .arceb,
        .csky,
        .kalimba,
        .microblaze,
        .microblazeel,
        .or1k,
        .propeller,
        .sh,
        .sheb,
        .xcore,
        => 4,

        .x86 => switch (target.os.tag) {
            else => 4,
            .uefi, .windows => 8,
        },

        .arm,
        .armeb,
        .hexagon,
        .hppa,
        .lanai,
        .loongarch32,
        .m68k,
        .m88k,
        .mips,
        .mipsel,
        .powerpc,
        .powerpcle,
        .riscv32,
        .riscv32be,
        .s390x,
        .sparc,
        .thumb,
        .thumbeb,
        .xtensa,
        .xtensaeb,
        => 8,

        .aarch64,
        .aarch64_be,
        .alpha,
        .amdgcn,
        .bpfel,
        .bpfeb,
        .hppa64,
        .kvx,
        .loongarch64,
        .mips64,
        .mips64el,
        .nvptx,
        .nvptx64,
        .powerpc64,
        .powerpc64le,
        .riscv64,
        .riscv64be,
        .sparc64,
        .spirv32,
        .spirv64,
        .ve,
        .wasm32,
        .wasm64,
        .x86_64,
        => 16,
    };
}