Changeset 331 for EcnlProtoTool/trunk/tcc-0.9.27/include
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- Location:
- EcnlProtoTool/trunk/tcc-0.9.27
- Files:
-
- 1 deleted
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/tcc-0.9.27/include/float.h
r321 r331 28 28 29 29 /* horrible intel long double */ 30 #if def __i386__30 #if defined __i386__ || defined __x86_64__ 31 31 32 32 #define LDBL_MANT_DIG 64 -
EcnlProtoTool/trunk/tcc-0.9.27/include/stdarg.h
r321 r331 5 5 #ifndef _WIN64 6 6 7 typedef void *va_list; 7 //This should be in sync with the declaration on our lib/libtcc1.c 8 /* GCC compatible definition of va_list. */ 9 typedef struct { 10 unsigned int gp_offset; 11 unsigned int fp_offset; 12 union { 13 unsigned int overflow_offset; 14 char *overflow_arg_area; 15 }; 16 char *reg_save_area; 17 } __va_list_struct; 8 18 9 va_list __va_start(void *fp); 10 void *__va_arg(va_list ap, int arg_type, int size); 11 va_list __va_copy(va_list src); 12 void __va_end(va_list ap); 19 typedef __va_list_struct va_list[1]; 13 20 14 #define va_start(ap, last) ((ap) = __va_start(__builtin_frame_address(0))) 21 void __va_start(__va_list_struct *ap, void *fp); 22 void *__va_arg(__va_list_struct *ap, int arg_type, int size, int align); 23 24 #define va_start(ap, last) __va_start(ap, __builtin_frame_address(0)) 15 25 #define va_arg(ap, type) \ 16 (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type)))) 17 #define va_copy(dest, src) ((dest) = __va_copy(src)) 18 #define va_end(ap) __va_end(ap) 26 (*(type *)(__va_arg(ap, __builtin_va_arg_types(type), sizeof(type), __alignof__(type)))) 27 #define va_copy(dest, src) (*(dest) = *(src)) 28 #define va_end(ap) 29 30 /* avoid conflicting definition for va_list on Macs. */ 31 #define _VA_LIST_T 19 32 20 33 #else /* _WIN64 */ 21 34 typedef char *va_list; 22 #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+7)&~7) 23 #define va_arg(ap,type) (ap += (sizeof(type)+7)&~7, *(type *)(ap - ((sizeof(type)+7)&~7))) 35 #define va_start(ap,last) __builtin_va_start(ap,last) 36 #define va_arg(ap, t) ((sizeof(t) > 8 || (sizeof(t) & (sizeof(t) - 1))) \ 37 ? **(t **)((ap += 8) - 8) : *(t *)((ap += 8) - 8)) 38 #define va_copy(dest, src) ((dest) = (src)) 39 #define va_end(ap) 40 #endif 41 42 #elif __arm__ 43 typedef char *va_list; 44 #define _tcc_alignof(type) ((int)&((struct {char c;type x;} *)0)->x) 45 #define _tcc_align(addr,type) (((unsigned)addr + _tcc_alignof(type) - 1) \ 46 & ~(_tcc_alignof(type) - 1)) 47 #define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3) 48 #define va_arg(ap,type) (ap = (void *) ((_tcc_align(ap,type)+sizeof(type)+3) \ 49 &~3), *(type *)(ap - ((sizeof(type)+3)&~3))) 24 50 #define va_copy(dest, src) (dest) = (src) 25 51 #define va_end(ap) 26 #endif 52 53 #elif defined(__aarch64__) 54 typedef struct { 55 void *__stack; 56 void *__gr_top; 57 void *__vr_top; 58 int __gr_offs; 59 int __vr_offs; 60 } va_list; 61 #define va_start(ap, last) __va_start(ap, last) 62 #define va_arg(ap, type) __va_arg(ap, type) 63 #define va_end(ap) 64 #define va_copy(dest, src) ((dest) = (src)) 27 65 28 66 #else /* __i386__ */ -
EcnlProtoTool/trunk/tcc-0.9.27/include/stdbool.h
r321 r331 7 7 #define true 1 8 8 #define false 0 9 #define __bool_true_false_are_defined 1 9 10 10 11 #endif /* _STDBOOL_H */ -
EcnlProtoTool/trunk/tcc-0.9.27/include/stddef.h
r321 r331 14 14 typedef signed short int int16_t; 15 15 typedef signed int int32_t; 16 #ifdef __LP64__ 17 typedef signed long int int64_t; 18 #else 16 19 typedef signed long long int int64_t; 20 #endif 17 21 typedef unsigned char uint8_t; 18 22 typedef unsigned short int uint16_t; 19 23 typedef unsigned int uint32_t; 24 #ifdef __LP64__ 25 typedef unsigned long int uint64_t; 26 #else 20 27 typedef unsigned long long int uint64_t; 21 28 #endif 29 #endif 22 30 31 #ifndef NULL 23 32 #define NULL ((void*)0) 33 #endif 34 24 35 #define offsetof(type, field) ((size_t)&((type *)0)->field) 25 36 … … 27 38 28 39 #endif 40 41 /* Older glibc require a wint_t from <stddef.h> (when requested 42 by __need_wint_t, as otherwise stddef.h isn't allowed to 43 define this type). Note that this must be outside the normal 44 _STDDEF_H guard, so that it works even when we've included the file 45 already (without requiring wint_t). Some other libs define _WINT_T 46 if they've already provided that type, so we can use that as guard. 47 TCC defines __WINT_TYPE__ for us. */ 48 #if defined (__need_wint_t) 49 #ifndef _WINT_T 50 #define _WINT_T 51 typedef __WINT_TYPE__ wint_t; 52 #endif 53 #undef __need_wint_t 54 #endif
Note:
See TracChangeset
for help on using the changeset viewer.