aboutsummaryrefslogtreecommitdiff
path: root/std/special/c.zig
AgeCommit message (Collapse)Author
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221
2019-09-25Correct some RISCV64 bitsLemonBoy
2019-09-19Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-09-16update clone on arm32 to latest musl implementationAndrew Kelley
See musl commit 05870abeaac0588fb9115cfd11f96880a0af2108 by Rich Felker. Commit message from musl reproduced here: fix code path where child function returns in arm __clone built as thumb mov lr,pc is not a valid way to save the return address in thumb mode since it omits the thumb bit. use a chain of bl and bx to emulate blx. this could be avoided by converting to a .S file with preprocessor conditions to use blx if available, but the time cost here is dominated by the syscall anyway. while making this change, also remove the remnants of support for pre-bx ISA levels. commit 9f290a49bf9ee247d540d3c83875288a7991699c removed the hack from the parent code paths, but left the unnecessary code in the child. keeping it would require rewriting two code paths rather than one, and is useless for reasons described in that commit.
2019-09-10Merge remote-tracking branch 'origin/master' into llvm9Andrew Kelley
2019-08-29add __aeabi_read_tpRobin Voetter
2019-08-29TLS initialization, clone definition and _start functionalityRobin Voetter
2019-07-18riscv workarounds for llvm not having good asm integrationAndrew Kelley
2019-07-17msvc libc: provide _fltused symbolAndrew Kelley
2019-06-29fix formattingemekoi
2019-06-22stage1: add @sin @cos @exp @exp2 @ln @log2 @log10 @fabs @floor @ceil @trunc ↵Shawn Landden
@round and expand @sqrt This revealed that the accuracy of ln is not as good as the current algorithm in musl and glibc, and should be ported again. v2: actually include tests v3: fix reversal of in and out arguments on f128M_sqrt() add test for @sqrt on comptime_float do not include @nearbyInt() until it works on all targets.
2019-06-19c: add fma and fmafShawn Landden
2019-06-08add bcmp implementation as LLVM 9 now emits thoseShawn Landden
The optimizer will now convert calls to memcmp into a calls to bcmp in some circumstances. Users who are building freestanding code (not depending on the platform’s libc) without specifying -ffreestanding may need to either pass -fno-builtin-bcmp, or provide a bcmp function. http://llvm.org/docs/ReleaseNotes.html#non-comprehensive-list-of-changes-in-this-release
2019-05-29improve the libc of wasm32-freestanding targetAndrew Kelley
* introduce wasm32-freestanding-musl .h files to fix conflicts with stddef.h and errno.h * fix an issue with zig build system regarding installation of webassembly libraries * add implementations to zig's libc: - strcmp - strncmp - strerror - strlen See #514
2019-05-19ran zig fmt on stdlibemekoi
2019-05-16the wasm freestanding _start function is return value voidAndrew Kelley
2019-05-16improvements to build-lib use case of WebAssemblyAndrew Kelley
* build-exe does include the startup code that supplies _start for the wasm32-freestanding target. Previously this did not occur because of logic excluding "freestanding". * build-lib for wasm32-freestanding target gets linked by LLD. To avoid infinite recursion, compiler_rt and zig libc are built as objects rather than libraries. - no "lib" prefix and ".wasm" extension instead of ".a". Rather than build-lib foo.zig producing "libfoo.a", now it produces "foo.wasm". * go back to using `.o` extension for webassembly objects * zig libc only provides _start symbol for wasm when linking libc.
2019-05-15improvements to zig's implementation of libc and WebAssemblyAndrew Kelley
* rename std/special/builtin.zig to std/special/c.zig not to be confused with @import("builtin") which is entirely different, this is zig's multi-target libc implementation. * WebAssembly: build-exe is for executables which have a main(). build-lib is for building libraries of functions to use from, for example, a web browser environment. - for now pass --export-all for libraries when there are any C objects because we have no way to detect the list of exports when compiling C code. - stop passing --no-entry for executables. if you want --no-entry then use build-lib. * make the "musl" ABI the default ABI for wasm32-freestanding. * zig provides libc for wasm32-freestanding-musl.