Masa Nakura has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/86632?usp=email )
Change subject: payloads/libpayload/include: Add fast data types to types.h ......................................................................
payloads/libpayload/include: Add fast data types to types.h
libpayload stdint.h only supports typedefs for datatypes of exact bits. This makes libpayload less flexible to support libraries that reference different data types.
Add fast data types in types.h.
BUG=b:386913035
Change-Id: Ie9197866ae9b6c27d3f26c11d8409ecb90321c74 Signed-off-by: Masa Nakura nakura@google.com --- M payloads/libpayload/include/arm/arch/types.h M payloads/libpayload/include/arm64/arch/types.h M payloads/libpayload/include/mock/arch/types.h M payloads/libpayload/include/x86/arch/types.h 4 files changed, 32 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/86632/1
diff --git a/payloads/libpayload/include/arm/arch/types.h b/payloads/libpayload/include/arm/arch/types.h index 3f2eeaa..43ba84e 100644 --- a/payloads/libpayload/include/arm/arch/types.h +++ b/payloads/libpayload/include/arm/arch/types.h @@ -30,23 +30,31 @@ #define _ARCH_TYPES_H
typedef unsigned char uint8_t; +typedef unsigned char uint_fast8_t; typedef unsigned char u8; typedef signed char int8_t; +typedef signed char int_fast8_t; typedef signed char s8;
typedef unsigned short uint16_t; typedef unsigned short u16; +typedef unsigned short uint_fast16_t; typedef signed short int16_t; +typedef signed short int_fast16_t; typedef signed short s16;
typedef unsigned int uint32_t; +typedef unsigned int uint_fast32_t; typedef unsigned int u32; typedef signed int int32_t; +typedef signed int int_fast32_t; typedef signed int s32;
typedef unsigned long long uint64_t; +typedef unsigned long long uint_fast64_t; typedef unsigned long long u64; typedef signed long long int64_t; +typedef signed long long int_fast64_t; typedef signed long long s64;
typedef long time_t; diff --git a/payloads/libpayload/include/arm64/arch/types.h b/payloads/libpayload/include/arm64/arch/types.h index 3f2eeaa..43ba84e 100644 --- a/payloads/libpayload/include/arm64/arch/types.h +++ b/payloads/libpayload/include/arm64/arch/types.h @@ -30,23 +30,31 @@ #define _ARCH_TYPES_H
typedef unsigned char uint8_t; +typedef unsigned char uint_fast8_t; typedef unsigned char u8; typedef signed char int8_t; +typedef signed char int_fast8_t; typedef signed char s8;
typedef unsigned short uint16_t; typedef unsigned short u16; +typedef unsigned short uint_fast16_t; typedef signed short int16_t; +typedef signed short int_fast16_t; typedef signed short s16;
typedef unsigned int uint32_t; +typedef unsigned int uint_fast32_t; typedef unsigned int u32; typedef signed int int32_t; +typedef signed int int_fast32_t; typedef signed int s32;
typedef unsigned long long uint64_t; +typedef unsigned long long uint_fast64_t; typedef unsigned long long u64; typedef signed long long int64_t; +typedef signed long long int_fast64_t; typedef signed long long s64;
typedef long time_t; diff --git a/payloads/libpayload/include/mock/arch/types.h b/payloads/libpayload/include/mock/arch/types.h index 8f090ca..63b0e86 100644 --- a/payloads/libpayload/include/mock/arch/types.h +++ b/payloads/libpayload/include/mock/arch/types.h @@ -4,23 +4,31 @@ #define _ARCH_TYPES_H
typedef unsigned char uint8_t; +typedef unsigned char uint_fast8_t; typedef unsigned char u8; typedef signed char int8_t; +typedef signed char int_fast8_t; typedef signed char s8;
typedef unsigned short uint16_t; typedef unsigned short u16; +typedef unsigned short uint_fast16_t; typedef signed short int16_t; +typedef signed short int_fast16_t; typedef signed short s16;
typedef unsigned int uint32_t; +typedef unsigned int uint_fast32_t; typedef unsigned int u32; typedef signed int int32_t; +typedef signed int int_fast32_t; typedef signed int s32;
typedef unsigned long long uint64_t; +typedef unsigned long long uint_fast64_t; typedef unsigned long long u64; typedef signed long long int64_t; +typedef signed long long int_fast64_t; typedef signed long long s64;
typedef long time_t; diff --git a/payloads/libpayload/include/x86/arch/types.h b/payloads/libpayload/include/x86/arch/types.h index 3f2eeaa..43ba84e 100644 --- a/payloads/libpayload/include/x86/arch/types.h +++ b/payloads/libpayload/include/x86/arch/types.h @@ -30,23 +30,31 @@ #define _ARCH_TYPES_H
typedef unsigned char uint8_t; +typedef unsigned char uint_fast8_t; typedef unsigned char u8; typedef signed char int8_t; +typedef signed char int_fast8_t; typedef signed char s8;
typedef unsigned short uint16_t; typedef unsigned short u16; +typedef unsigned short uint_fast16_t; typedef signed short int16_t; +typedef signed short int_fast16_t; typedef signed short s16;
typedef unsigned int uint32_t; +typedef unsigned int uint_fast32_t; typedef unsigned int u32; typedef signed int int32_t; +typedef signed int int_fast32_t; typedef signed int s32;
typedef unsigned long long uint64_t; +typedef unsigned long long uint_fast64_t; typedef unsigned long long u64; typedef signed long long int64_t; +typedef signed long long int_fast64_t; typedef signed long long s64;
typedef long time_t;