6 Commits

Author SHA1 Message Date
Guillaume Chatelet
75fb825bcc
[libc][NFC] Rename LIBC_COMPILER_HAS_FLOAT128 to LIBC_TYPES_HAS_FLOAT128 (#83395)
Umbrella bug #83182
2024-02-29 21:59:58 +01:00
Joseph Huber
69c0b2febe
[libc][NFC] Remove all trailing spaces from libc (#82831)
Summary:
There are a lot of random training spaces on various lines. This patch
just got rid of all of them with `sed 's/\ \+$//g'.
2024-02-23 16:34:00 -06:00
lntue
84277fe90f
[libc][stdfix] Generate stdfix.h header with fixed point precision macros according to ISO/IEC TR 18037:2008 standard, and add fixed point type support detection. (#81255)
Fixed point extension standard:
https://standards.iso.org/ittf/PubliclyAvailableStandards/c051126_ISO_IEC_TR_18037_2008.zip
2024-02-13 16:48:14 -05:00
lntue
029bfd6329
[libc] Replace -nostdlib++ flag when building with gcc and add placement new operator to HermeticTestUtils.cpp. (#78906)
`-nostdlib++` is a clang-only flag. Replacing it with `-nostdlib` when
building with gcc.
2024-01-22 19:27:27 -05:00
Nick Desaulniers
1d5c16d780
[libc] default enable -ftrivial-auto-var-init=pattern (#78776)
Usage of uninitialized memory is a top memory safety issue in C++ codebases.
Help mitigate this somewhat by default initialize stack allocations to a
pattern (0xAA repeating).

Clang has received optimizations to sink these into control flow paths that
access such values to minimize the overhead of these added initializations.

If there's a measurable slowdown, we can add
-ftrivial-auto-var-init-max-size=<N> for some value N bytes if we have any
large stack allocations, or add attribute uninitialized to any variable
declarations.

Unsupported until GCC 12.1 / Clang 8.

Increases file size of libc.a from a full build by +8.79Ki (+0.2%).
2024-01-22 14:55:51 -08:00
lntue
3f906f513e
[libc][math] Add initial support for C23 float128 math functions, starting with copysignf128. (#71731) 2023-11-10 14:32:59 -05:00