summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* [libc] Add a convenience CMake rule to add testsuites.Siva Chandra Reddy2020-01-078-15/+13
| | | | | | | | | | | | | | Summary: This rule helps avoid repeated setting of check-libc's dependency on the various testsuites. Reviewers: abrachet Subscribers: mgorny, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72353
* [libc] Move implementations of strcat and strcpy to the string directory.Siva Chandra Reddy2020-01-069-26/+25
| | | | | | | | | | | | | | | | | | Summary: Now that tests live in separate top-level directory, keeping the implementations of individual functions in a directory of their own is not meaningful. Hence, this change moves them into the higher level string directory. NFC intended. Reviewers: MaskRay Subscribers: mgorny, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72295
* [libc] Add __attribute__((always_inline)) to x86_64 syscall functions.Siva Chandra Reddy2020-01-061-10/+14
| | | | | | | | | | | | | | | | Summary: Some syscalls like SYS_clone do not tolerate a return instruction after the syscall instruction. Marking the syscall functions with the `always_inline` attribute accommodates such syscalls as inlining eliminates the return instruction. Reviewers: abrachet, phosek Subscribers: MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72102
* [libc] Move all tests to a top level `test` directory.Siva Chandra Reddy2020-01-0622-60/+89
| | | | | | | | | | A toplevel target, `check-libc` has also been added. Reviewers: abrachet, phosek Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72177
* [llvm-libc] Fix missing virtual destructorGuillaume Chatelet2020-01-063-0/+18
| | | | | | | | | | | | Summary: This patch adds a virtual destructor to the Command class. Reviewers: sivachandra Subscribers: mgorny, MaskRay, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D72253
* Add implementations of POSIX mmap and munmap functions.Siva Chandra Reddy2019-12-2331-35/+2916
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: A set of of linux x86_64 internal syscall helpers have also been added. This change does not try to be perfect with respect to OS and machine abstractions. A TODO note has been added at places where such abstractions would help and make the arrangement scalable and cleaner. Addressing the TODOs and building such abstractions is not in the scope of this change. It is hoped that follow up changes cleaning up the problem areas and addressing the TODOs will better illustrate the need for the changes. This change also does not try to imitate mmap and munmap implementations of other libcs. The idea here is to put in the bare minimum required to obtain a working mmap and munmap, and then add the rest of the functionality on an as needed basis. Reviewers: abrachet, phosek, stanshebs, theraven Subscribers: mgorny, MaskRay, jfb, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D71634
* [libc] Add implementation of errno and define the other macros of errno.h.Siva Chandra Reddy2019-12-0914-2/+332
| | | | | | | | | | Reviewers: stanshebs, alexbrachet Subscribers: mgorny, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D71094
* [libc] Add a TableGen based header generator.Siva Chandra Reddy2019-11-2224-262/+1107
| | | | | | | | | | | | | | | Summary: * The Python header generator has been removed. * Docs giving a highlevel overview of the header gen scheme have been added. Reviewers: phosek, abrachet Subscribers: mgorny, MaskRay, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D70197
* Illustrate a redirector using the example of round function from math.h.Siva Chandra Reddy2019-11-0111-5/+247
| | | | | | | | | | | | | | | | | | | | | Setup demonstrated in this patch is only for ELF-ish platforms. Also note: 1. Use of redirectors is a temporary scheme. They will be removed once LLVM-libc has implementations for the redirected functions. 2. Redirectors are optional. One can choose to not include them in the LLVM-libc build for their platform. 3. Even with redirectors used, we want to link to the system libc dynamically. Reviewers: dlj, hfinkel, jakehehrlich, phosek, stanshebs, theraven, alexshap Subscribers: mgorny, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D69020
* [libc] Do not add unittests if LLVM_INCLUDE_TESTS is OFF.Siva Chandra2019-10-151-0/+4
| | | | | | | | | | | | Reviewers: nathanchance Subscribers: mgorny, tschuett, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D68726 llvm-svn: 374925
* Use arrays on stack and avoid use of new and delete operators.Siva Chandra2019-10-102-12/+4
| | | | | | | | | | | | | | Summary: Also fix an error found with LLVM_USE_SANITIZER=Address. Reviewers: nelhage Subscribers: libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D68761 llvm-svn: 374374
* Add few docs and implementation of strcpy and strcat.Siva Chandra2019-10-0427-0/+1586
| | | | | | | | | | | | | | | | | Summary: This patch illustrates some of the features like modularity we want in the new libc. Few other ideas like different kinds of testing, redirectors etc are not yet present. Reviewers: dlj, hfinkel, theraven, jfb, alexshap, jdoerfert Subscribers: mgorny, dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67867 llvm-svn: 373764
* Add a director, along with README.txt and LICENSE.txt, for libc.David L. Jones2019-09-162-0/+286
llvm-svn: 372036
OpenPOWER on IntegriCloud