From 0d0a2083fa51693cc1a92f44b78aeee4f6e63aa4 Mon Sep 17 00:00:00 2001 From: Sam Ellicott Date: Sun, 18 Jul 2021 18:56:37 -0400 Subject: [PATCH 2/2] stdint base types for riscv in tccdef.h --- include/tccdefs.h | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/include/tccdefs.h b/include/tccdefs.h index ae0364e..a3d7219 100644 --- a/include/tccdefs.h +++ b/include/tccdefs.h @@ -24,6 +24,8 @@ #else #define __SIZE_TYPE__ unsigned int #define __PTRDIFF_TYPE__ int + #define __UINTPTR_TYPE__ unsigned int + #define __INTPTR_TYPE__ int #endif #define __ILP32__ 1 #define __INT64_TYPE__ long long @@ -37,6 +39,8 @@ /* Other 64bit systems. */ #define __SIZE_TYPE__ unsigned long #define __PTRDIFF_TYPE__ long + #define __UINTPTR_TYPE__ long unsigned int + #define __INTPTR_TYPE__ long int #define __LP64__ 1 # if defined __linux__ #define __INT64_TYPE__ long @@ -198,7 +202,37 @@ #define _tcc_align(addr,type) (((unsigned long)addr + __alignof__(type) - 1) \ & -(__alignof__(type))) #define __builtin_va_arg(ap,type) (*(sizeof(type) > (2*__va_reg_size) ? *(type **)((ap += __va_reg_size) - __va_reg_size) : (ap = (va_list)(_tcc_align(ap,type) + (sizeof(type)+__va_reg_size - 1)& -__va_reg_size), (type *)(ap - ((sizeof(type)+ __va_reg_size - 1)& -__va_reg_size))))) - + #define __INT32_TYPE__ int + #define __UINT_LEAST8_TYPE__ unsigned char + #define __SIG_ATOMIC_TYPE__ int + #define __UINTMAX_TYPE__ long unsigned int + #define __INT_FAST16_TYPE__ int + #define __INT_FAST64_TYPE__ long int + #define __UINT8_TYPE__ unsigned char + #define __INT_FAST32_TYPE__ int + #define __UINT_LEAST16_TYPE__ short unsigned int + #define __INT8_TYPE__ signed char + #define __INT_LEAST16_TYPE__ short int + #define __UINT_LEAST64_TYPE__ long unsigned int + #define __UINT_FAST16_TYPE__ unsigned int + #define __CHAR16_TYPE__ short unsigned int + #define __INT_LEAST64_TYPE__ long int + #define __INT16_TYPE__ short int + #define __INT_LEAST8_TYPE__ signed char + #define __UINT16_TYPE__ short unsigned int + #define __WCHAR_TYPE__ int + #define __UINT_FAST64_TYPE__ long unsigned int + #define __WINT_TYPE__ unsigned int + #define __UINT_LEAST32_TYPE__ unsigned int + #define __INT_LEAST32_TYPE__ int + #define __UINT64_TYPE__ long unsigned int + #define __INT_FAST8_TYPE__ int + #define __UINT_FAST32_TYPE__ unsigned int + #define __CHAR32_TYPE__ unsigned int + #define __INT32_TYPE__ int + #define __INTMAX_TYPE__ long int + #define __UINT32_TYPE__ unsigned int + #define __UINT_FAST8_TYPE__ unsigned int #else /* __i386__ */ typedef char *__builtin_va_list; #define __builtin_va_start(ap,last) (ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)) -- 2.32.0