-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[libc] Removed __LIBC_CONST_ATTR attribute and updated math.yaml with the new math functions #99571
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
Conversation
RoseZhang03
commented
Jul 18, 2024
•
edited
Loading
edited
- deleted attribute from fabs function
- added math functions from [libc][math][c23] Add {f,d}mul{l,f128} and f16mul{,f,l,f128} C23 math functions #98972
- also updated statvfs files so that it can be generated
@llvm/pr-subscribers-libc Author: None (RoseZhang03) Changes
Full diff: https://github.com/llvm/llvm-project/pull/99571.diff 1 Files Affected:
diff --git a/libc/newhdrgen/yaml/math.yaml b/libc/newhdrgen/yaml/math.yaml
index 8588389bca4d2..ce562c653a6d2 100644
--- a/libc/newhdrgen/yaml/math.yaml
+++ b/libc/newhdrgen/yaml/math.yaml
@@ -64,8 +64,6 @@ functions:
return_type: double
arguments:
- type: double
- attributes:
- - __LIBC_CONST_ATTR
- name: fabsf
standards:
- stdc
@@ -364,6 +362,20 @@ functions:
arguments:
- type: double
- type: double
+ - name: fmull
+ standards:
+ - stdc
+ return_type: float
+ arguments:
+ - type: long double
+ - type: long double
+ - name: dmull
+ standards:
+ - stdc
+ return_type: double
+ arguments:
+ - type: long double
+ - type: long double
- name: frexp
standards:
- stdc
@@ -1323,6 +1335,30 @@ functions:
- type: long double
- type: long double
guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16mul
+ standards:
+ - llvm_libc_ext
+ return_type: _Float16
+ arguments:
+ - type: double
+ - type: double
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16mulf
+ standards:
+ - llvm_libc_ext
+ return_type: _Float16
+ arguments:
+ - type: float
+ - type: float
+ guard: LIBC_TYPES_HAS_FLOAT16
+ - name: f16mull
+ standards:
+ - llvm_libc_ext
+ return_type: _Float16
+ arguments:
+ - type: long double
+ - type: long double
+ guard: LIBC_TYPES_HAS_FLOAT16
- name: f16sqrt
standards:
- llvm_libc_ext
@@ -1756,6 +1792,14 @@ functions:
- type: float128
- type: float128
guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
+ - name: f16mulf128
+ standards:
+ - stdc
+ return_type: _Float16
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT16_AND_FLOAT128
- name: f16sqrtf128
standards:
- llvm_libc_ext
@@ -1896,6 +1940,22 @@ functions:
- type: float128
- type: float128
guard: LIBC_TYPES_HAS_FLOAT128
+ - name: fmulf128
+ standards:
+ - llvm_libc_ext
+ return_type: float
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
+ - name: dmulf128
+ standards:
+ - llvm_libc_ext
+ return_type: double
+ arguments:
+ - type: float128
+ - type: float128
+ guard: LIBC_TYPES_HAS_FLOAT128
- name: frexpf128
standards:
- stdc
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… the new math functions - deleted attribute from fabs function - added math functions from llvm#98972
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/3477 Here is the relevant piece of the build log for the reference:
|