Function cMaxIntAlignment [src]

Prototype

pub fn cMaxIntAlignment(target: *const Target) u16

Parameters

target: *const Target

Source

pub fn cMaxIntAlignment(target: *const Target) u16 { return switch (target.cpu.arch) { .avr => 1, .msp430 => 2, .xcore, .propeller, => 4, .amdgcn, .arm, .armeb, .thumb, .thumbeb, .lanai, .hexagon, .mips, .mipsel, .or1k, .powerpc, .powerpcle, .riscv32, .riscv32be, .s390x, => 8, // Even LLVMABIAlignmentOfType(i128) agrees on these targets. .aarch64, .aarch64_be, .bpfel, .bpfeb, .mips64, .mips64el, .nvptx, .nvptx64, .powerpc64, .powerpc64le, .riscv64, .riscv64be, .sparc, .sparc64, .wasm32, .wasm64, .x86, .x86_64, => 16, // Below this comment are unverified but based on the fact that C requires // int128_t to be 16 bytes aligned, it's a safe default. .arc, .csky, .kalimba, .loongarch32, .loongarch64, .m68k, .spirv32, .spirv64, .ve, .xtensa, => 16, }; }