-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc] Include additional baremetal entrypoints #85020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These functions are usable on embedded platforms and are sometimes used in various baremetal projects.
@llvm/pr-subscribers-libc Author: Petr Hosek (petrhosek) ChangesThese functions are usable on embedded platforms and are sometimes used in various baremetal projects. Full diff: https://github.com/llvm/llvm-project/pull/85020.diff 3 Files Affected:
diff --git a/libc/config/baremetal/api.td b/libc/config/baremetal/api.td
index 33b3a03828e9c7..759f8f26156c86 100644
--- a/libc/config/baremetal/api.td
+++ b/libc/config/baremetal/api.td
@@ -2,6 +2,7 @@ include "config/public_api.td"
include "spec/stdc.td"
include "spec/stdc_ext.td"
+include "spec/bsd_ext.td"
include "spec/llvm_libc_stdfix_ext.td"
def AssertMacro : MacroDef<"assert"> {
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index 6e4fdb03626436..589ec5237e98da 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -30,6 +30,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.bcmp
libc.src.string.bcopy
libc.src.string.bzero
+ libc.src.string.index
libc.src.string.memccpy
libc.src.string.memchr
libc.src.string.memcmp
@@ -39,6 +40,8 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.mempcpy
libc.src.string.memrchr
libc.src.string.memset
+ libc.src.string.memset_explicit
+ libc.src.string.rindex
libc.src.string.stpcpy
libc.src.string.stpncpy
libc.src.string.strcasecmp
@@ -47,8 +50,11 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strchr
libc.src.string.strchrnul
libc.src.string.strcmp
+ libc.src.string.strcoll
libc.src.string.strcpy
libc.src.string.strcspn
+ libc.src.string.strerror
+ libc.src.string.strerror_r
libc.src.string.strlcat
libc.src.string.strlcpy
libc.src.string.strlen
@@ -59,10 +65,12 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strnlen
libc.src.string.strpbrk
libc.src.string.strrchr
+ libc.src.string.strsep
libc.src.string.strspn
libc.src.string.strstr
libc.src.string.strtok
libc.src.string.strtok_r
+ libc.src.string.strxfrm
# inttypes.h entrypoints
libc.src.inttypes.imaxabs
@@ -117,6 +125,36 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdbit.stdc_first_trailing_one_ui
libc.src.stdbit.stdc_first_trailing_one_ul
libc.src.stdbit.stdc_first_trailing_one_ull
+ libc.src.stdbit.stdc_count_zeros_uc
+ libc.src.stdbit.stdc_count_zeros_us
+ libc.src.stdbit.stdc_count_zeros_ui
+ libc.src.stdbit.stdc_count_zeros_ul
+ libc.src.stdbit.stdc_count_zeros_ull
+ libc.src.stdbit.stdc_count_ones_uc
+ libc.src.stdbit.stdc_count_ones_us
+ libc.src.stdbit.stdc_count_ones_ui
+ libc.src.stdbit.stdc_count_ones_ul
+ libc.src.stdbit.stdc_count_ones_ull
+ libc.src.stdbit.stdc_has_single_bit_uc
+ libc.src.stdbit.stdc_has_single_bit_us
+ libc.src.stdbit.stdc_has_single_bit_ui
+ libc.src.stdbit.stdc_has_single_bit_ul
+ libc.src.stdbit.stdc_has_single_bit_ull
+ libc.src.stdbit.stdc_bit_width_uc
+ libc.src.stdbit.stdc_bit_width_us
+ libc.src.stdbit.stdc_bit_width_ui
+ libc.src.stdbit.stdc_bit_width_ul
+ libc.src.stdbit.stdc_bit_width_ull
+ libc.src.stdbit.stdc_bit_floor_uc
+ libc.src.stdbit.stdc_bit_floor_us
+ libc.src.stdbit.stdc_bit_floor_ui
+ libc.src.stdbit.stdc_bit_floor_ul
+ libc.src.stdbit.stdc_bit_floor_ull
+ libc.src.stdbit.stdc_bit_ceil_uc
+ libc.src.stdbit.stdc_bit_ceil_us
+ libc.src.stdbit.stdc_bit_ceil_ui
+ libc.src.stdbit.stdc_bit_ceil_ul
+ libc.src.stdbit.stdc_bit_ceil_ull
# stdlib.h entrypoints
libc.src.stdlib.abort
@@ -132,6 +170,9 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.llabs
libc.src.stdlib.lldiv
libc.src.stdlib.qsort
+ libc.src.stdlib.qsort_r
+ libc.src.stdlib.rand
+ libc.src.stdlib.srand
libc.src.stdlib.strtod
libc.src.stdlib.strtof
libc.src.stdlib.strtol
@@ -201,6 +242,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fminl
libc.src.math.fmod
libc.src.math.fmodf
+ libc.src.math.fmodl
libc.src.math.frexp
libc.src.math.frexpf
libc.src.math.frexpl
@@ -212,6 +254,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.ldexp
libc.src.math.ldexpf
libc.src.math.ldexpl
+ libc.src.math.llogb
+ libc.src.math.llogbf
+ libc.src.math.llogbl
libc.src.math.llrint
libc.src.math.llrintf
libc.src.math.llrintl
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 6e4fdb03626436..09de1b416e0e94 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -30,6 +30,7 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.bcmp
libc.src.string.bcopy
libc.src.string.bzero
+ libc.src.string.index
libc.src.string.memccpy
libc.src.string.memchr
libc.src.string.memcmp
@@ -39,6 +40,8 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.mempcpy
libc.src.string.memrchr
libc.src.string.memset
+ libc.src.string.memset_explicit
+ libc.src.string.rindex
libc.src.string.stpcpy
libc.src.string.stpncpy
libc.src.string.strcasecmp
@@ -47,8 +50,11 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strchr
libc.src.string.strchrnul
libc.src.string.strcmp
+ libc.src.string.strcoll
libc.src.string.strcpy
libc.src.string.strcspn
+ libc.src.string.strerror
+ libc.src.string.strerror_r
libc.src.string.strlcat
libc.src.string.strlcpy
libc.src.string.strlen
@@ -59,10 +65,12 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strnlen
libc.src.string.strpbrk
libc.src.string.strrchr
+ libc.src.string.strsep
libc.src.string.strspn
libc.src.string.strstr
libc.src.string.strtok
libc.src.string.strtok_r
+ libc.src.string.strxfrm
# inttypes.h entrypoints
libc.src.inttypes.imaxabs
@@ -117,6 +125,36 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdbit.stdc_first_trailing_one_ui
libc.src.stdbit.stdc_first_trailing_one_ul
libc.src.stdbit.stdc_first_trailing_one_ull
+ libc.src.stdbit.stdc_count_zeros_uc
+ libc.src.stdbit.stdc_count_zeros_us
+ libc.src.stdbit.stdc_count_zeros_ui
+ libc.src.stdbit.stdc_count_zeros_ul
+ libc.src.stdbit.stdc_count_zeros_ull
+ libc.src.stdbit.stdc_count_ones_uc
+ libc.src.stdbit.stdc_count_ones_us
+ libc.src.stdbit.stdc_count_ones_ui
+ libc.src.stdbit.stdc_count_ones_ul
+ libc.src.stdbit.stdc_count_ones_ull
+ libc.src.stdbit.stdc_has_single_bit_uc
+ libc.src.stdbit.stdc_has_single_bit_us
+ libc.src.stdbit.stdc_has_single_bit_ui
+ libc.src.stdbit.stdc_has_single_bit_ul
+ libc.src.stdbit.stdc_has_single_bit_ull
+ libc.src.stdbit.stdc_bit_width_uc
+ libc.src.stdbit.stdc_bit_width_us
+ libc.src.stdbit.stdc_bit_width_ui
+ libc.src.stdbit.stdc_bit_width_ul
+ libc.src.stdbit.stdc_bit_width_ull
+ libc.src.stdbit.stdc_bit_floor_uc
+ libc.src.stdbit.stdc_bit_floor_us
+ libc.src.stdbit.stdc_bit_floor_ui
+ libc.src.stdbit.stdc_bit_floor_ul
+ libc.src.stdbit.stdc_bit_floor_ull
+ libc.src.stdbit.stdc_bit_ceil_uc
+ libc.src.stdbit.stdc_bit_ceil_us
+ libc.src.stdbit.stdc_bit_ceil_ui
+ libc.src.stdbit.stdc_bit_ceil_ul
+ libc.src.stdbit.stdc_bit_ceil_ull
# stdlib.h entrypoints
libc.src.stdlib.abort
@@ -132,6 +170,9 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.stdlib.llabs
libc.src.stdlib.lldiv
libc.src.stdlib.qsort
+ libc.src.stdlib.qsort_r
+ libc.src.stdlib.rand
+ libc.src.stdlib.srand
libc.src.stdlib.strtod
libc.src.stdlib.strtof
libc.src.stdlib.strtol
@@ -212,6 +253,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.ldexp
libc.src.math.ldexpf
libc.src.math.ldexpl
+ libc.src.math.llogb
+ libc.src.math.llogbf
+ libc.src.math.llogbl
libc.src.math.llrint
libc.src.math.llrintf
libc.src.math.llrintl
|
SchrodingerZhu
approved these changes
Mar 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These functions are usable on embedded platforms and are sometimes used in various baremetal projects.