Subversion Repositories Kolibri OS

Rev

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

Rev 1408 Rev 1964
Line 33... Line 33...
33
  ({ unsigned long __ptr;					\
33
  ({ unsigned long __ptr;					\
34
    __asm__ ("" : "=r"(__ptr) : "0"(ptr));		\
34
    __asm__ ("" : "=r"(__ptr) : "0"(ptr));		\
35
    (typeof(ptr)) (__ptr + (off)); })
35
    (typeof(ptr)) (__ptr + (off)); })
Line 36... Line 36...
36
 
36
 
37
/* &a[0] degrades to a pointer: a different type from an array */
-
 
38
#define __must_be_array(a) \
37
/* &a[0] degrades to a pointer: a different type from an array */
Line 39... Line 38...
39
  BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
38
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
40
 
39
 
41
/*
40
/*
42
 * Force always-inline if the user requests it so via the .config,
41
 * Force always-inline if the user requests it so via the .config,
Line 56... Line 55...
56
/*
55
/*
57
 * it doesn't make sense on ARM (currently the only user of __naked) to trace
56
 * it doesn't make sense on ARM (currently the only user of __naked) to trace
58
 * naked functions because then mcount is called without stack and frame pointer
57
 * naked functions because then mcount is called without stack and frame pointer
59
 * being set up and there is no chance to restore the lr register to the value
58
 * being set up and there is no chance to restore the lr register to the value
60
 * before mcount was called.
59
 * before mcount was called.
-
 
60
 *
-
 
61
 * The asm() bodies of naked functions often depend on standard calling conventions,
-
 
62
 * therefore they must be noinline and noclone.  GCC 4.[56] currently fail to enforce
-
 
63
 * this, so we must do so ourselves.  See GCC PR44290.
61
 */
64
 */
62
#define __naked				__attribute__((naked)) notrace
65
#define __naked				__attribute__((naked)) noinline __noclone notrace
Line 63... Line 66...
63
 
66
 
Line 64... Line 67...
64
#define __noreturn			__attribute__((noreturn))
67
#define __noreturn			__attribute__((noreturn))
65
 
68
 
Line 83... Line 86...
83
 
86
 
84
#define __gcc_header(x) #x
87
#define __gcc_header(x) #x
85
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
88
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
86
#define gcc_header(x) _gcc_header(x)
89
#define gcc_header(x) _gcc_header(x)
-
 
90
#include gcc_header(__GNUC__)
-
 
91
 
-
 
92
#if !defined(__noclone)
-
 
93
#define __noclone	/* not needed */