Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 12 additions & 1 deletion libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,18 @@ add_header_macro(
stdfix.h
DEPENDS
.llvm-libc-macros.stdfix_macros
.llvm-libc-types.stdfix-types
.llvm-libc-types.int_hk_t
.llvm-libc-types.int_hr_t
.llvm-libc-types.int_k_t
.llvm-libc-types.int_lk_t
.llvm-libc-types.int_lr_t
.llvm-libc-types.int_r_t
.llvm-libc-types.uint_uhk_t
.llvm-libc-types.uint_uhr_t
.llvm-libc-types.uint_uk_t
.llvm-libc-types.uint_ulk_t
.llvm-libc-types.uint_ulr_t
.llvm-libc-types.uint_ur_t
)


Expand Down
13 changes: 12 additions & 1 deletion libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,18 @@ DEPENDS
)
add_header(locale_t HDR locale_t.h)
add_header(struct_lconv HDR struct_lconv.h)
add_header(stdfix-types HDR stdfix-types.h)
add_header(int_hk_t HDR int_hk_t.h)
add_header(int_hr_t HDR int_hr_t.h)
add_header(int_k_t HDR int_k_t.h)
add_header(int_lk_t HDR int_lk_t.h)
add_header(int_lr_t HDR int_lr_t.h)
add_header(int_r_t HDR int_r_t.h)
add_header(uint_uhk_t HDR uint_uhk_t.h)
add_header(uint_uhr_t HDR uint_uhr_t.h)
add_header(uint_uk_t HDR uint_uk_t.h)
add_header(uint_ulk_t HDR uint_ulk_t.h)
add_header(uint_ulr_t HDR uint_ulr_t.h)
add_header(uint_ur_t HDR uint_ur_t.h)

# UEFI
add_header(EFI_GUID HDR EFI_GUID.h DEPENDS libc.include.llvm-libc-macros.stdint_macros)
Expand Down
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/int_hk_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_INT_HK_T_H
#define LLVM_LIBC_TYPES_INT_HK_T_H

typedef signed short int_hk_t;

#endif // LLVM_LIBC_TYPES_INT_HK_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/int_hr_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_INT_HR_T_H
#define LLVM_LIBC_TYPES_INT_HR_T_H

typedef signed char int_hr_t;

#endif // LLVM_LIBC_TYPES_INT_HR_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/int_k_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_INT_K_T_H
#define LLVM_LIBC_TYPES_INT_K_T_H

typedef signed int int_k_t;

#endif // LLVM_LIBC_TYPES_INT_K_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/int_lk_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_INT_LK_T_H
#define LLVM_LIBC_TYPES_INT_LK_T_H

typedef signed long long int_lk_t;

#endif // LLVM_LIBC_TYPES_INT_LK_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/int_lr_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_INT_LR_T_H
#define LLVM_LIBC_TYPES_INT_LR_T_H

typedef signed int int_lr_t;

#endif // LLVM_LIBC_TYPES_INT_LR_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/int_r_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_INT_R_T_H
#define LLVM_LIBC_TYPES_INT_R_T_H

typedef signed short int int_r_t;

#endif // LLVM_LIBC_TYPES_INT_R_T_H
25 changes: 0 additions & 25 deletions libc/include/llvm-libc-types/stdfix-types.h

This file was deleted.

14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/uint_uhk_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_UINT_UHK_T_H
#define LLVM_LIBC_TYPES_UINT_UHK_T_H

typedef unsigned short int uint_uhk_t;

#endif // LLVM_LIBC_TYPES_UINT_UHK_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/uint_uhr_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_UINT_UHR_T_H
#define LLVM_LIBC_TYPES_UINT_UHR_T_H

typedef unsigned char uint_uhr_t;

#endif // LLVM_LIBC_TYPES_UINT_UHR_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/uint_uk_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_UINT_UK_T_H
#define LLVM_LIBC_TYPES_UINT_UK_T_H

typedef unsigned int uint_uk_t;

#endif // LLVM_LIBC_TYPES_UINT_UK_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/uint_ulk_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_UINT_ULK_T_H
#define LLVM_LIBC_TYPES_UINT_ULK_T_H

typedef unsigned long long uint_ulk_t;

#endif // LLVM_LIBC_TYPES_UINT_ULK_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/uint_ulr_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_UINT_ULR_T_H
#define LLVM_LIBC_TYPES_UINT_ULR_T_H

typedef unsigned int uint_ulr_t;

#endif // LLVM_LIBC_TYPES_UINT_ULR_T_H
14 changes: 14 additions & 0 deletions libc/include/llvm-libc-types/uint_ur_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//===-- LLVM LIBC TYPES --------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_TYPES_UINT_UR_T_H
#define LLVM_LIBC_TYPES_UINT_UR_T_H

typedef unsigned short int uint_ur_t;

#endif // LLVM_LIBC_TYPES_UINT_UR_T_H
14 changes: 13 additions & 1 deletion libc/include/stdfix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,19 @@ macros:
- macro_name: roundfx
macro_header: stdfix-macros.h
types:
- type_name: stdfix-types
- type_name: int_hk_t
- type_name: int_hr_t
- type_name: int_k_t
- type_name: int_lk_t
- type_name: int_lr_t
- type_name: int_r_t
- type_name: uint_uhk_t
- type_name: uint_uhr_t
- type_name: uint_uk_t
- type_name: uint_ulk_t
- type_name: uint_ulr_t
- type_name: uint_ur_t

enums: []
objects: []
functions:
Expand Down
1 change: 0 additions & 1 deletion libc/src/stdfix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ foreach(suffix IN ITEMS hr r lr hk k lk uhr ur ulr uhk uk ulk)
${libc_opt_high_flag}
DEPENDS
libc.src.__support.fixed_point.fx_bits
libc.include.llvm-libc-types.stdfix-types
libc.include.llvm-libc-macros.stdfix_macros
)

Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitshk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitshk.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // short accum
#include "include/llvm-libc-types/stdfix-types.h" // int_hk_t
#include "include/llvm-libc-types/int_hk_t.h"
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitshk.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STDFIX_BITSHK_H

#include "include/llvm-libc-macros/stdfix-macros.h" // short accum
#include "include/llvm-libc-types/stdfix-types.h" // int_hk_t
#include "include/llvm-libc-types/int_hk_t.h" // int_hk_t
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL

namespace LIBC_NAMESPACE_DECL {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitshr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitshr.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // short fract
#include "include/llvm-libc-types/stdfix-types.h" // int_hr_t
#include "include/llvm-libc-types/int_hr_t.h"
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitshr.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STDFIX_BITSHR_H

#include "include/llvm-libc-macros/stdfix-macros.h" // short fract
#include "include/llvm-libc-types/stdfix-types.h" // int_hr_t
#include "include/llvm-libc-types/int_hr_t.h"
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL

namespace LIBC_NAMESPACE_DECL {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitsk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitsk.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // accum
#include "include/llvm-libc-types/stdfix-types.h" // int_k_t
#include "include/llvm-libc-types/int_k_t.h"
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitsk.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STDFIX_BITSK_H

#include "include/llvm-libc-macros/stdfix-macros.h" // accum
#include "include/llvm-libc-types/stdfix-types.h" // int_k_t
#include "include/llvm-libc-types/int_k_t.h"
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL

namespace LIBC_NAMESPACE_DECL {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitslk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitslk.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // long accum
#include "include/llvm-libc-types/stdfix-types.h" // int_lk_t
#include "include/llvm-libc-types/int_lk_t.h" // int_lk_t
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitslk.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STDFIX_BITSLK_H

#include "include/llvm-libc-macros/stdfix-macros.h" // long accum
#include "include/llvm-libc-types/stdfix-types.h" // int_lk_t
#include "include/llvm-libc-types/int_lk_t.h"
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL

namespace LIBC_NAMESPACE_DECL {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitslr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitslr.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // long fract
#include "include/llvm-libc-types/stdfix-types.h" // int_lr_t
#include "include/llvm-libc-types/int_lr_t.h" // int_lr_t
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitslr.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STDFIX_BITSLR_H

#include "include/llvm-libc-macros/stdfix-macros.h" // long fract
#include "include/llvm-libc-types/stdfix-types.h" // int_lr_t
#include "include/llvm-libc-types/int_lr_t.h" // int_lr_t
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL

namespace LIBC_NAMESPACE_DECL {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitsr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitsr.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // fract
#include "include/llvm-libc-types/stdfix-types.h" // int_r_t
#include "include/llvm-libc-types/int_r_t.h" // int_r_t
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitsr.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define LLVM_LIBC_SRC_STDFIX_BITSR_H

#include "include/llvm-libc-macros/stdfix-macros.h" // fract
#include "include/llvm-libc-types/stdfix-types.h" // int_r_t
#include "include/llvm-libc-types/int_r_t.h"
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL

namespace LIBC_NAMESPACE_DECL {
Expand Down
2 changes: 1 addition & 1 deletion libc/src/stdfix/bitsuhk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "bitsuhk.h"
#include "include/llvm-libc-macros/stdfix-macros.h" // unsigned short accum
#include "include/llvm-libc-types/stdfix-types.h" // uint_uhk_t
#include "include/llvm-libc-types/uint_uhk_t.h" // uint_uhk_t
#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
#include "src/__support/fixed_point/fx_bits.h" // fixed_point
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
Expand Down
Loading
Loading