Skip to content

[libc] Add definitions for totalordermag(,f, l, f128), dsqrt(l, f128), fsqrt(, l, f128) to math.yaml. #103494

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 3 commits into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions libc/newhdrgen/yaml/math.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,20 @@ functions:
arguments:
- type: long double
- type: long double
- name: dsqrtl
standards:
- stdc
return_type: double
arguments:
- type: long double
- name: dsqrtf128
standards:
- llvm_libc_ext
return_type: double
arguments:
- type: float128
- type: float128
guard: LIBC_TYPES_HAS_FLOAT128
- name: erff
standards:
- stdc
Expand Down Expand Up @@ -1195,6 +1209,25 @@ functions:
- type: long double
- type: int
- type: unsigned int
- name: fsqrt
standards:
- stdc
return_type: float type
arguments:
- type: double
- name: fsqrtl
standards:
- stdc
return_type: float
arguments:
- type: long double
- name: fsqrtf128
standards:
- llvm_libc_ext
return_type: float
arguments:
- type: float128
guard: LIBC_TYPES_HAS_FLOAT128
- name: fsub
standards:
- stdc
Expand Down Expand Up @@ -2323,6 +2356,35 @@ functions:
arguments:
- type: const long double *
- type: const long double *
- name: totalordermag
standards:
- stdc
return_type: int
arguments:
- type: double *
- type: double *
- name: totalordermagf
standards:
- stdc
return_type: int
arguments:
- type: float *
- type: float *
- name: totalordermagl
standards:
- stdc
return_type: int
arguments:
- type: long double *
- type: long double *
- name: totalordermagf128
standards:
- stdc
return_type: int
arguments:
- type: float128 *
- type: float128 *
guard: LIBC_TYPES_HAS_FLOAT128
Comment on lines +2359 to +2387
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

totalordermag* functions take pointers to const values. See section F.10.12.2 of https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #103935.

- name: totalordermagf16
standards:
- stdc
Expand Down
Loading