Gitiles

review.coreboot.org / coreboot / 47995fbb36d914d96b7c6e49d81135834dc3f157 / . / src / arch / riscv / include / stdint.h

Martin Roth | 8e442dc | 2016-01-12 09:52:36 -0700 | [diff] [blame] | 1 | /* |

2 | * This file is part of the coreboot project. | ||||

3 | * | ||||

4 | * This program is free software; you can redistribute it and/or modify | ||||

5 | * it under the terms of the GNU General Public License as published by | ||||

6 | * the Free Software Foundation; version 2 of the License. | ||||

7 | * | ||||

8 | * This program is distributed in the hope that it will be useful, | ||||

9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||

10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||

11 | * GNU General Public License for more details. | ||||

12 | */ | ||||

13 | |||||

Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 14 | #ifndef RISCV_STDINT_H |

15 | #define RISCV_STDINT_H | ||||

16 | |||||

17 | /* Exact integral types */ | ||||

18 | typedef unsigned char uint8_t; | ||||

19 | typedef signed char int8_t; | ||||

20 | |||||

21 | typedef unsigned short uint16_t; | ||||

22 | typedef signed short int16_t; | ||||

23 | |||||

24 | typedef unsigned int uint32_t; | ||||

25 | typedef signed int int32_t; | ||||

26 | |||||

27 | typedef unsigned long long uint64_t; | ||||

28 | typedef signed long long int64_t; | ||||

29 | |||||

30 | /* Small types */ | ||||

31 | typedef unsigned char uint_least8_t; | ||||

32 | typedef signed char int_least8_t; | ||||

33 | |||||

34 | typedef unsigned short uint_least16_t; | ||||

35 | typedef signed short int_least16_t; | ||||

36 | |||||

37 | typedef unsigned int uint_least32_t; | ||||

38 | typedef signed int int_least32_t; | ||||

39 | |||||

40 | typedef unsigned long long uint_least64_t; | ||||

41 | typedef signed long long int_least64_t; | ||||

42 | |||||

43 | /* Fast Types */ | ||||

44 | typedef unsigned char uint_fast8_t; | ||||

45 | typedef signed char int_fast8_t; | ||||

46 | |||||

47 | typedef unsigned int uint_fast16_t; | ||||

48 | typedef signed int int_fast16_t; | ||||

49 | |||||

50 | typedef unsigned int uint_fast32_t; | ||||

51 | typedef signed int int_fast32_t; | ||||

52 | |||||

53 | typedef unsigned long long uint_fast64_t; | ||||

54 | typedef signed long long int_fast64_t; | ||||

55 | |||||

56 | typedef long long int intmax_t; | ||||

57 | typedef unsigned long long uintmax_t; | ||||

58 | |||||

59 | typedef uint8_t u8; | ||||

60 | typedef uint16_t u16; | ||||

61 | typedef uint32_t u32; | ||||

62 | typedef uint64_t u64; | ||||

63 | typedef int8_t s8; | ||||

64 | typedef int16_t s16; | ||||

65 | typedef int32_t s32; | ||||

66 | typedef int64_t s64; | ||||

67 | |||||

Alexandru Gagniuc | a583924 | 2015-01-25 20:46:55 -0600 | [diff] [blame] | 68 | typedef uint8_t bool; |

69 | #define true 1 | ||||

70 | #define false 0 | ||||

Ronald G. Minnich | e0e784a | 2014-11-26 19:25:47 +0000 | [diff] [blame] | 71 | |

72 | /* Types for `void *' pointers. */ | ||||

73 | typedef s64 intptr_t; | ||||

74 | typedef u64 uintptr_t; | ||||

75 | |||||

76 | #endif /* RISCV_STDINT_H */ |