[libc-commits] [libc] scalbln (PR #102219)
via libc-commits
libc-commits at lists.llvm.org
Tue Aug 6 13:45:25 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (aaryanshukla)
<details>
<summary>Changes</summary>
- **1/5**
- **added to config**
- **[libc][c23][math] scalbln**
---
Patch is 70.83 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/102219.diff
28 Files Affected:
- (modified) libc/config/baremetal/arm/entrypoints.txt (+3)
- (modified) libc/config/baremetal/riscv/entrypoints.txt (+3)
- (modified) libc/config/darwin/arm/entrypoints.txt (+3)
- (modified) libc/config/gpu/entrypoints.txt (+2)
- (modified) libc/config/linux/aarch64/entrypoints.txt (+4)
- (modified) libc/config/linux/arm/entrypoints.txt (+3)
- (modified) libc/config/linux/riscv/entrypoints.txt (+4)
- (modified) libc/config/linux/x86_64/entrypoints.txt (+4)
- (modified) libc/config/windows/entrypoints.txt (+3)
- (modified) libc/docs/math/index.rst (+2-2)
- (modified) libc/newhdrgen/yaml/math.yaml (+325-288)
- (modified) libc/spec/llvm_libc_ext.td (+3)
- (modified) libc/spec/stdc.td (+4-1)
- (modified) libc/src/math/CMakeLists.txt (+4)
- (modified) libc/src/math/generic/CMakeLists.txt (+55)
- (added) libc/src/math/generic/scalbln.cpp (+25)
- (added) libc/src/math/generic/scalblnf.cpp (+25)
- (added) libc/src/math/generic/scalblnf128.cpp (+25)
- (added) libc/src/math/generic/scalblnl.cpp (+25)
- (added) libc/src/math/scalbln.h (+20)
- (added) libc/src/math/scalblnf.h (+20)
- (added) libc/src/math/scalblnf128.h (+21)
- (added) libc/src/math/scalblnl.h (+21)
- (modified) libc/test/src/math/smoke/CMakeLists.txt (+52)
- (added) libc/test/src/math/smoke/scalbln_test.cpp (+13)
- (added) libc/test/src/math/smoke/scalblnf128_test.cpp (+13)
- (added) libc/test/src/math/smoke/scalblnf_test.cpp (+13)
- (added) libc/test/src/math/smoke/scalblnl_test.cpp (+13)
``````````diff
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index ef145e994a3d1..78dd334c87f90 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -387,6 +387,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.roundevenl
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index be41f9a13aac2..ad1c0b1288725 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -382,6 +382,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.roundevenl
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
diff --git a/libc/config/darwin/arm/entrypoints.txt b/libc/config/darwin/arm/entrypoints.txt
index 3e4cb3cebce9b..18e6dbcd96cb7 100644
--- a/libc/config/darwin/arm/entrypoints.txt
+++ b/libc/config/darwin/arm/entrypoints.txt
@@ -240,6 +240,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.round
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt
index 8d29e7e2e253b..48554df2200b8 100644
--- a/libc/config/gpu/entrypoints.txt
+++ b/libc/config/gpu/entrypoints.txt
@@ -333,6 +333,8 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.rintf
libc.src.math.round
libc.src.math.roundf
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.sin
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index ebdaa0f6de7fd..ffb6a12b5635a 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -513,6 +513,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.roundevenl
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnl
+ libc.src.math.scalblnf
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
@@ -661,6 +664,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
libc.src.math.rintf128
libc.src.math.roundf128
libc.src.math.roundevenf128
+ libc.src.math.scalblnf128
libc.src.math.scalbnf128
libc.src.math.setpayloadf128
libc.src.math.sqrtf128
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 90aae962080cd..31b4a2c7bf913 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -363,6 +363,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.round
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 29969fce6adf8..61835b06bdb79 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -536,6 +536,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.roundevenl
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
@@ -615,6 +618,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
libc.src.math.rintf128
libc.src.math.roundevenf128
libc.src.math.roundf128
+ libc.src.math.scalblnf128
libc.src.math.scalbnf128
libc.src.math.sqrtf128
libc.src.math.totalorderf128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 2ed287dc8542e..4d21d6d0bc8c8 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -536,6 +536,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.roundevenl
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
@@ -706,6 +709,7 @@ if(LIBC_TYPES_HAS_FLOAT128)
libc.src.math.rintf128
libc.src.math.roundevenf128
libc.src.math.roundf128
+ libc.src.math.scalblnf128
libc.src.math.scalbnf128
libc.src.math.setpayloadf128
libc.src.math.sqrtf128
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index b7aac225ee055..814b2c628b20f 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -253,6 +253,9 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.round
libc.src.math.roundf
libc.src.math.roundl
+ libc.src.math.scalbln
+ libc.src.math.scalblnf
+ libc.src.math.scalblnl
libc.src.math.scalbn
libc.src.math.scalbnf
libc.src.math.scalbnl
diff --git a/libc/docs/math/index.rst b/libc/docs/math/index.rst
index defd075d10997..e3524bdb1688f 100644
--- a/libc/docs/math/index.rst
+++ b/libc/docs/math/index.rst
@@ -210,7 +210,7 @@ Basic Operations
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| nextup | |check| | |check| | |check| | |check| | |check| | 7.12.11.5 | F.10.8.5 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
-| remainder | |check| | |check| | |check| | |check| | | 7.12.10.2 | F.10.7.2 |
+| remainder | |check| | |check| | |check| | |check| | |check| | 7.12.10.2 | F.10.7.2 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| remquo | |check| | |check| | |check| | |check| | |check| | 7.12.10.3 | F.10.7.3 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
@@ -220,7 +220,7 @@ Basic Operations
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| roundeven | |check| | |check| | |check| | |check| | |check| | 7.12.9.8 | F.10.6.8 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
-| scalbln | | | | |check| | | 7.12.6.19 | F.10.3.19 |
+| scalbln | |check| | |check| | |check| | |check| | |check| | 7.12.6.19 | F.10.3.19 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| scalbn | |check| | |check| | |check| | |check| | |check| | 7.12.6.19 | F.10.3.19 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
diff --git a/libc/newhdrgen/yaml/math.yaml b/libc/newhdrgen/yaml/math.yaml
index ce562c653a6d2..aa5467ba6c266 100644
--- a/libc/newhdrgen/yaml/math.yaml
+++ b/libc/newhdrgen/yaml/math.yaml
@@ -20,306 +20,306 @@ functions:
arguments:
- type: float
- name: copysign
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: copysignf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: copysignl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: ceil
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- name: ceilf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- name: ceill
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- name: fabs
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- name: fabsf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- name: fabsl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- name: fdim
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fdimf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fdiml
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: floor
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- name: floorf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- name: floorl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- name: fmin
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fminf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fminl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fmax
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fmaxf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fmaxl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fmaximum
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fmaximumf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fmaximuml
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fmaximum_num
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fmaximum_numf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fmaximum_numl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fmaximum_mag
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fmaximum_magf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fmaximum_magl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fmaximum_mag_num
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fmaximum_mag_numf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fmaximum_mag_numl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fminimum
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fminimumf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fminimuml
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fminimum_num
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fminimum_numf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fminimum_mag
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fminimum_magf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fminimum_magl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fminimum_mag_num
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fminimum_mag_numf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fminimum_mag_numl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: long double
- name: fma
- standards:
+ standards:
- stdc
return_type: double
arguments:
@@ -327,7 +327,7 @@ functions:
- type: double
- type: double
- name: fmaf
- standards:
+ standards:
- stdc
return_type: float
arguments:
@@ -335,21 +335,21 @@ functions:
- type: float
- type: float
- name: fmod
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: fmodf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: fmodl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
@@ -377,28 +377,28 @@ functions:
- type: long double
- type: long double
- name: frexp
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: int *
- name: frexpf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: int *
- name: frexpl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
- type: long double
- type: int *
- name: fromfp
- standards:
+ standards:
- stdc
return_type: double
arguments:
@@ -406,7 +406,7 @@ functions:
- type: int
- type: unsigned int
- name: fromfpf
- standards:
+ standards:
- stdc
return_type: float
arguments:
@@ -414,7 +414,7 @@ functions:
- type: int
- type: unsigned int
- name: fromfpl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
@@ -422,7 +422,7 @@ functions:
- type: int
- type: unsigned int
- name: fromfpx
- standards:
+ standards:
- stdc
return_type: double
arguments:
@@ -430,7 +430,7 @@ functions:
- type: int
- type: unsigned int
- name: fromfpxf
- standards:
+ standards:
- stdc
return_type: float
arguments:
@@ -438,7 +438,7 @@ functions:
- type: int
- type: unsigned int
- name: fromfpxl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
@@ -446,7 +446,7 @@ functions:
- type: int
- type: unsigned int
- name: ufromfp
- standards:
+ standards:
- stdc
return_type: double
arguments:
@@ -454,7 +454,7 @@ functions:
- type: int
- type: unsigned int
- name: ufromfpf
- standards:
+ standards:
- stdc
return_type: float
arguments:
@@ -462,7 +462,7 @@ functions:
- type: int
- type: unsigned int
- name: ufromfpl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
@@ -470,7 +470,7 @@ functions:
- type: int
- type: unsigned int
- name: ufromfpx
- standards:
+ standards:
- stdc
return_type: double
arguments:
@@ -478,7 +478,7 @@ functions:
- type: int
- type: unsigned int
- name: ufromfpxf
- standards:
+ standards:
- stdc
return_type: float
arguments:
@@ -486,7 +486,7 @@ functions:
- type: int
- type: unsigned int
- name: ufromfpxl
- standards:
+ standards:
- stdc
return_type: long double
arguments:
@@ -494,33 +494,33 @@ functions:
- type: int
- type: unsigned int
- name: hypot
- standards:
+ standards:
- stdc
return_type: double
arguments:
- type: double
- type: double
- name: hypotf
- standards:
+ standards:
- stdc
return_type: float
arguments:
- type: float
- type: float
- name: ilogb
- standards:
+ standards:
- stdc
return_type: int
arguments:
- type: double
- name: ilogbf
- standards:
+ standards:
- stdc
return_type: int
arguments:
- type: float
- name: ilogbl
- standards:
+ standards:
- stdc
return_type: int
arguments:
@@ -529,7 +529,7 @@ functions:
standards:
- BSDExtensions
return_type: int
- arguments:
+ arguments:
- type: double
- name: isnanf
standards:
@@ -544,151 +544,151 @@ functions:
arguments:
- type: long double
- name: llogb
- standards:
+ standards:
- stdc
return_type: long
arguments:
- type: double
- name: llogbf
- standards:
+ standards:
- stdc
return_type: long
arguments:
- type: float
- name: llogbl
- standards:
+ standards:
- stdc
return_type: long
arguments:
- type: long double
- name: ldexp
- standards:
+ standards:
- stdc
...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/102219
More information about the libc-commits
mailing list