Subversion Repositories Kolibri OS

Rev

Rev 3291 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3291 Rev 4251
Line 35... Line 35...
35
#define force_inline inline __attribute__((always_inline))
35
#define force_inline inline __attribute__((always_inline))
36
#define fastcall __attribute__((regparm(3)))
36
#define fastcall __attribute__((regparm(3)))
37
#define must_check __attribute__((warn_unused_result))
37
#define must_check __attribute__((warn_unused_result))
38
#define constant __attribute__((const))
38
#define constant __attribute__((const))
39
#define pure __attribute__((pure))
39
#define pure __attribute__((pure))
40
#define __packed__ __attribute__((__packed__))
40
#define tightly_packed __attribute__((__packed__))
41
#define flatten __attribute__((flatten))
41
#define flatten __attribute__((flatten))
-
 
42
#define page_aligned __attribute__((aligned(4096)))
42
#else
43
#else
43
#define likely(expr) (expr)
44
#define likely(expr) (expr)
44
#define unlikely(expr) (expr)
45
#define unlikely(expr) (expr)
45
#define noinline
46
#define noinline
46
#define force_inline
47
#define force_inline inline
47
#define fastcall
48
#define fastcall
48
#define must_check
49
#define must_check
49
#define constant
50
#define constant
50
#define pure
51
#define pure
51
#define __packed__
52
#define tighly_packed
52
#define flatten
53
#define flatten
-
 
54
#define page_aligned
-
 
55
#endif
-
 
56
 
-
 
57
#define HAS_GCC(major, minor) defined(__GNUC__) && (__GNUC__ > (major) || __GNUC__ == (major) && __GNUC_MINOR__ >= (minor))
-
 
58
 
-
 
59
#if HAS_GCC(4, 5)
-
 
60
#define sse2 __attribute__((target("sse2,fpmath=sse")))
-
 
61
#define sse4_2 __attribute__((target("sse4.2,sse2,fpmath=sse")))
-
 
62
#endif
-
 
63
 
-
 
64
#if HAS_GCC(4, 7)
-
 
65
#define avx2 __attribute__((target("avx2,sse4.2,sse2,fpmath=sse")))
-
 
66
#endif
-
 
67
 
-
 
68
#if HAS_GCC(4, 6) && defined(__OPTIMIZE__)
-
 
69
#define fast __attribute__((optimize("Ofast")))
-
 
70
#else
-
 
71
#define fast
-
 
72
#endif
-
 
73
 
-
 
74
#if HAS_GCC(4, 6) && defined(__OPTIMIZE__)
-
 
75
#define fast_memcpy __attribute__((optimize("Ofast"))) __attribute__((target("inline-all-stringops")))
-
 
76
#elif HAS_GCC(4, 5) && defined(__OPTIMIZE__)
-
 
77
#define fast_memcpy __attribute__((target("inline-all-stringops")))
-
 
78
#else
-
 
79
#define fast_memcpy
53
#endif
80
#endif
Line 54... Line 81...
54
 
81
 
55
#ifdef HAVE_VALGRIND
82
#ifdef HAVE_VALGRIND
56
#define VG(x) x
83
#define VG(x) x