2019-10-05 01:30:54 +08:00
|
|
|
|
|
|
|
add_entrypoint_library(
|
|
|
|
llvmlibc
|
|
|
|
DEPENDS
|
2020-03-12 11:45:58 +08:00
|
|
|
# assert.h entrypoints
|
|
|
|
__assert_fail
|
|
|
|
|
2019-12-06 04:09:24 +08:00
|
|
|
# errno.h entrypoints
|
|
|
|
__errno_location
|
|
|
|
|
2019-10-05 01:30:54 +08:00
|
|
|
# string.h entrypoints
|
|
|
|
strcpy
|
|
|
|
strcat
|
[libc] Adding memcpy implementation for x86_64
Summary:
The patch is not ready yet and is here to discuss a few options:
- How do we customize the implementation? (i.e. how to define `kRepMovsBSize`),
- How do we specify custom compilation flags? (We'd need `-fno-builtin-memcpy` to be passed in),
- How do we build? We may want to test in debug but build the libc with `-march=native` for instance,
- Clang has a brand new builtin `__builtin_memcpy_inline` which makes the implementation easy and efficient, but:
- If we compile with `gcc` or `msvc` we can't use it, resorting on less efficient code generation,
- With gcc we can use `__builtin_memcpy` but then we'd need a postprocess step to check that the final assembly do not contain call to `memcpy` (unlikely but allowed),
- For msvc we'd need to resort on the compiler optimization passes.
Reviewers: sivachandra, abrachet
Subscribers: mgorny, MaskRay, tschuett, libc-commits, courbet
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D74397
2020-02-11 20:37:02 +08:00
|
|
|
memcpy
|
2019-12-05 15:17:14 +08:00
|
|
|
|
|
|
|
# sys/mman.h entrypoints
|
|
|
|
mmap
|
|
|
|
munmap
|
2020-02-21 03:05:34 +08:00
|
|
|
|
|
|
|
# signal.h entrypoints
|
|
|
|
raise
|
2020-03-18 13:08:59 +08:00
|
|
|
sigaction
|
2020-03-02 16:47:21 +08:00
|
|
|
sigaddset
|
|
|
|
sigemptyset
|
|
|
|
sigprocmask
|
2020-03-23 02:15:47 +08:00
|
|
|
signal
|
2020-03-06 03:21:18 +08:00
|
|
|
|
|
|
|
# stdlib.h entrypoints
|
|
|
|
_Exit
|
|
|
|
abort
|
2020-03-07 07:05:50 +08:00
|
|
|
|
|
|
|
# threads.h entrypoints
|
2020-02-10 15:33:38 +08:00
|
|
|
mtx_init
|
|
|
|
mtx_lock
|
|
|
|
mtx_unlock
|
2020-03-07 07:05:50 +08:00
|
|
|
thrd_create
|
|
|
|
thrd_join
|
2019-10-05 01:30:54 +08:00
|
|
|
)
|
2019-10-16 04:25:36 +08:00
|
|
|
|
|
|
|
add_entrypoint_library(
|
|
|
|
llvmlibm
|
|
|
|
DEPENDS
|
|
|
|
# math.h entrypoints
|
|
|
|
round
|
|
|
|
)
|
|
|
|
|
|
|
|
add_redirector_library(
|
|
|
|
llvmlibc_redirectors
|
|
|
|
DEPENDS
|
|
|
|
round_redirector
|
|
|
|
)
|