Skip to content

Commit d078833

Browse files
authored
merge main into amd-staging (llvm#1309)
2 parents 1c2506e + 2090416 commit d078833

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+872
-268
lines changed

compiler-rt/cmake/base-config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
109109
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" lib)
110110
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
111111
"Path where built compiler-rt libraries should be installed.")
112-
else()
112+
else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
113113
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
114114
${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
115115
extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "lib/${COMPILER_RT_OS_DIR}")

libc/config/gpu/amdgpu/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
548548
libc.src.math.fabsf16
549549
libc.src.math.fdimf16
550550
libc.src.math.floorf16
551+
libc.src.math.fmaf16
551552
libc.src.math.fmaxf16
552553
libc.src.math.fmaximum_mag_numf16
553554
libc.src.math.fmaximum_magf16

libc/config/gpu/nvptx/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
550550
libc.src.math.fabsf16
551551
libc.src.math.fdimf16
552552
libc.src.math.floorf16
553+
libc.src.math.fmaf16
553554
libc.src.math.fmaxf16
554555
libc.src.math.fmaximum_mag_numf16
555556
libc.src.math.fmaximum_magf16

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ endif()
645645
if(LIBC_TYPES_HAS_FLOAT16)
646646
list(APPEND TARGET_LIBM_ENTRYPOINTS
647647
# math.h C23 _Float16 entrypoints
648+
libc.src.math.acoshf16
648649
libc.src.math.canonicalizef16
649650
libc.src.math.ceilf16
650651
libc.src.math.copysignf16
@@ -677,6 +678,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
677678
libc.src.math.ffma
678679
libc.src.math.ffmal
679680
libc.src.math.floorf16
681+
libc.src.math.fmaf16
680682
libc.src.math.fmaxf16
681683
libc.src.math.fmaximum_mag_numf16
682684
libc.src.math.fmaximum_magf16

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
654654
# math.h C23 _Float16 entrypoints
655655
libc.src.math.asinf16
656656
libc.src.math.acosf16
657+
libc.src.math.acoshf16
657658
libc.src.math.canonicalizef16
658659
libc.src.math.ceilf16
659660
libc.src.math.copysignf16
@@ -687,6 +688,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
687688
libc.src.math.fabsf16
688689
libc.src.math.fdimf16
689690
libc.src.math.floorf16
691+
libc.src.math.fmaf16
690692
libc.src.math.fmaxf16
691693
libc.src.math.fmaximum_mag_numf16
692694
libc.src.math.fmaximum_magf16

libc/docs/headers/math/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Higher Math Functions
251251
+===========+==================+=================+========================+======================+========================+========================+============================+
252252
| acos | |check| | | | |check| | | 7.12.4.1 | F.10.1.1 |
253253
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
254-
| acosh | |check| | | | | | 7.12.5.1 | F.10.2.1 |
254+
| acosh | |check| | | | |check| | | 7.12.5.1 | F.10.2.1 |
255255
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
256256
| acospi | | | | | | 7.12.4.8 | F.10.1.8 |
257257
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
@@ -299,7 +299,7 @@ Higher Math Functions
299299
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
300300
| expm1 | |check| | |check| | | |check| | | 7.12.6.6 | F.10.3.6 |
301301
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
302-
| fma | |check| | |check| | | | | 7.12.13.1 | F.10.10.1 |
302+
| fma | |check| | |check| | | |check| | | 7.12.13.1 | F.10.10.1 |
303303
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
304304
| f16sqrt | |check|\* | |check|\* | |check|\* | N/A | |check| | 7.12.14.6 | F.10.11 |
305305
+-----------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+

libc/include/math.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ functions:
2727
return_type: float
2828
arguments:
2929
- type: float
30+
name: acoshf16
31+
standards:
32+
- stdc
33+
return_type: _Float16
34+
arguments:
35+
- type: _Float16
36+
guard: LIBC_TYPES_HAS_FLOAT16
3037
- name: asin
3138
standards:
3239
- stdc
@@ -742,6 +749,15 @@ functions:
742749
- type: float
743750
- type: float
744751
- type: float
752+
- name: fmaf16
753+
standards:
754+
- stdc
755+
return_type: _Float16
756+
arguments:
757+
- type: _Float16
758+
- type: _Float16
759+
- type: _Float16
760+
guard: LIBC_TYPES_HAS_FLOAT16
745761
- name: fmax
746762
standards:
747763
- stdc

libc/src/math/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ add_math_entrypoint_object(acosf16)
4646

4747
add_math_entrypoint_object(acosh)
4848
add_math_entrypoint_object(acoshf)
49+
add_math_entrypoint_object(acoshf16)
4950

5051
add_math_entrypoint_object(asin)
5152
add_math_entrypoint_object(asinf)
@@ -209,6 +210,7 @@ add_math_entrypoint_object(floorf128)
209210

210211
add_math_entrypoint_object(fma)
211212
add_math_entrypoint_object(fmaf)
213+
add_math_entrypoint_object(fmaf16)
212214

213215
add_math_entrypoint_object(fmax)
214216
add_math_entrypoint_object(fmaxf)

libc/src/math/acoshf16.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===-- Implementation header for acoshf16 ----------------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_ACOSHF16_H
10+
#define LLVM_LIBC_SRC_MATH_ACOSHF16_H
11+
12+
#include "src/__support/macros/config.h"
13+
#include "src/__support/macros/properties/types.h"
14+
15+
namespace LIBC_NAMESPACE_DECL {
16+
17+
float16 acoshf16(float16 x);
18+
19+
} // namespace LIBC_NAMESPACE_DECL
20+
21+
#endif // LLVM_LIBC_SRC_MATH_ACOSHF16_H

libc/src/math/fmaf16.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===-- Implementation header for fmaf16 ------------------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SRC_MATH_FMAF16_H
10+
#define LLVM_LIBC_SRC_MATH_FMAF16_H
11+
12+
#include "src/__support/macros/config.h"
13+
#include "src/__support/macros/properties/types.h"
14+
15+
namespace LIBC_NAMESPACE_DECL {
16+
17+
float16 fmaf16(float16 x, float16 y, float16 z);
18+
19+
} // namespace LIBC_NAMESPACE_DECL
20+
21+
#endif // LLVM_LIBC_SRC_MATH_FMAF16_H

0 commit comments

Comments
 (0)