[libc-commits] [libc] [libc] Removed __LIBC_CONST_ATTR attribute and updated math.yaml with the new math functions (PR #99571)

via libc-commits libc-commits at lists.llvm.org
Thu Jul 18 14:22:43 PDT 2024


https://github.com/RoseZhang03 created https://github.com/llvm/llvm-project/pull/99571

- deleted attribute from fabs function
- added math functions from #98972


>From ca905a9f1cb72cb492521e365d66b72b283b40f3 Mon Sep 17 00:00:00 2001
From: Rose Zhang <rosezhang at google.com>
Date: Thu, 18 Jul 2024 21:18:20 +0000
Subject: [PATCH] [libc] Removed __LIBC_CONST_ATTR attribute and updated
 math.yaml with the new math functions

- deleted attribute from fabs function
- added math functions from #98972
---
 libc/newhdrgen/yaml/math.yaml | 64 +++++++++++++++++++++++++++++++++--
 1 file changed, 62 insertions(+), 2 deletions(-)

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



More information about the libc-commits mailing list