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

compilerRtFloatAbi

Public Function
std.zig.target.compilerRtFloatAbi
pub fn compilerRtFloatAbi(target: *const std.Target, bits: u16) std.Target.Abi.Float

Params

File

zig/target.zig:538
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
pub fn compilerRtFloatAbi(target: *const std.Target, bits: u16) std.Target.Abi.Float {
    if (target.cpu.has(.x86, .soft_float)) return .soft;
    // Marks targets where clang does not even provide a usable C type.
    const no_c_type_available = .soft;
    switch (bits) {
        else => unreachable,
        16 => if (target.cpu.arch.isMIPS() or target.cpu.arch.isPowerPC()) return no_c_type_available,
        32, 64 => {},
        80 => if (target.cTypeBitSize(.longdouble) != 80) return no_c_type_available,
        128 => {
            if (target.cpu.arch.isX86()) return .hard; // if (target.abi == .msvc) __m128i else __float128
            if (target.cTypeBitSize(.longdouble) != 128) return no_c_type_available;
        },
    }
    return .hard;
}