4 typedef __SIZE_TYPE__ size_t;
5 # define STAP_SDT_ARG_CONSTRAINT nor
6 # define _SDT_STRINGIFY(x) #x
7 # define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x)
8 # define _SDT_ARG(n, x) \
9 [_SDT_S##n] "n" ((_SDT_ARGSIGNED (x) ? 1 : -1) * (int) _SDT_ARGSIZE (x)), \
10 [_SDT_A##n] _SDT_ARG_CONSTRAINT_STRING (STAP_SDT_ARG_CONSTRAINT) (_SDT_ARGVAL (x))
11 #define _SDT_ARGARRAY(x) (__builtin_classify_type (x) == 14 \
12 || __builtin_classify_type (x) == 5)
13 # define _SDT_ARGSIGNED(x) (!_SDT_ARGARRAY (x) \
14 && __sdt_type<__typeof (x)>::__sdt_signed)
15 # define _SDT_ARGSIZE(x) (_SDT_ARGARRAY (x) \
16 ? sizeof (void *) : sizeof (x))
17 # define _SDT_ARGVAL(x) (x)
18 template<typename __sdt_T>
21 static const bool __sdt_signed = false;
23 #define __SDT_ALWAYS_SIGNED(T) \
24 template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
25 __SDT_ALWAYS_SIGNED(signed char)
26 __SDT_ALWAYS_SIGNED(short)
27 __SDT_ALWAYS_SIGNED(int)
28 __SDT_ALWAYS_SIGNED(long)
29 __SDT_ALWAYS_SIGNED(long long)
30 template<typename __sdt_E>
31 struct __sdt_type<__sdt_E[]> : public __sdt_type<__sdt_E *> {};
32 template<typename __sdt_E, size_t __sdt_N>
33 struct __sdt_type<__sdt_E[__sdt_N]> : public __sdt_type<__sdt_E *> {};
35 struct S { char p[8]; };
40 __asm__ __volatile__ ("" : : _SDT_ARG (0, &str));