Back to index

glibc  2.9
Defines
sysdep.h File Reference
#include <sysdeps/unix/sh/sysdep.h>
#include <tls.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SYS_ify(syscall_name)   (__NR_##syscall_name)
#define SYSCALL_INST_STR0   "trapa #0x10\n\t"
#define SYSCALL_INST_STR1   "trapa #0x11\n\t"
#define SYSCALL_INST_STR2   "trapa #0x12\n\t"
#define SYSCALL_INST_STR3   "trapa #0x13\n\t"
#define SYSCALL_INST_STR4   "trapa #0x14\n\t"
#define SYSCALL_INST_STR5   "trapa #0x15\n\t"
#define SYSCALL_INST_STR6   "trapa #0x16\n\t"
#define SYSCALL_INST_PAD
#define ASMFMT_0
#define ASMFMT_1   , "r" (r4)
#define ASMFMT_2   , "r" (r4), "r" (r5)
#define ASMFMT_3   , "r" (r4), "r" (r5), "r" (r6)
#define ASMFMT_4   , "r" (r4), "r" (r5), "r" (r6), "r" (r7)
#define ASMFMT_5   , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0)
#define ASMFMT_6   , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0), "r" (r1)
#define ASMFMT_7   , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0), "r" (r1), "r" (r2)
#define SUBSTITUTE_ARGS_0()
#define SUBSTITUTE_ARGS_1(arg1)
#define SUBSTITUTE_ARGS_2(arg1, arg2)
#define SUBSTITUTE_ARGS_3(arg1, arg2, arg3)
#define SUBSTITUTE_ARGS_4(arg1, arg2, arg3, arg4)
#define SUBSTITUTE_ARGS_5(arg1, arg2, arg3, arg4, arg5)
#define SUBSTITUTE_ARGS_6(arg1, arg2, arg3, arg4, arg5, arg6)
#define SUBSTITUTE_ARGS_7(arg1, arg2, arg3, arg4, arg5, arg6, arg7)
#define INLINE_SYSCALL(name, nr, args...)
#define INTERNAL_SYSCALL(name, err, nr, args...)
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...)
#define INTERNAL_SYSCALL_DECL(err)   do { } while (0)
#define INTERNAL_SYSCALL_ERROR_P(val, err)   ((unsigned int) (val) >= 0xfffff001u)
#define INTERNAL_SYSCALL_ERRNO(val, err)   (-(val))
#define PTR_MANGLE(var)   (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
#define PTR_DEMANGLE(var)   PTR_MANGLE (var)

Define Documentation

#define ASMFMT_0

Definition at line 240 of file sysdep.h.

#define ASMFMT_1   , "r" (r4)

Definition at line 241 of file sysdep.h.

#define ASMFMT_2   , "r" (r4), "r" (r5)

Definition at line 243 of file sysdep.h.

#define ASMFMT_3   , "r" (r4), "r" (r5), "r" (r6)

Definition at line 245 of file sysdep.h.

#define ASMFMT_4   , "r" (r4), "r" (r5), "r" (r6), "r" (r7)

Definition at line 247 of file sysdep.h.

#define ASMFMT_5   , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0)

Definition at line 249 of file sysdep.h.

#define ASMFMT_6   , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0), "r" (r1)

Definition at line 251 of file sysdep.h.

#define ASMFMT_7   , "r" (r4), "r" (r5), "r" (r6), "r" (r7), "0" (r0), "r" (r1), "r" (r2)

Definition at line 253 of file sysdep.h.

#define INLINE_SYSCALL (   name,
  nr,
  args... 
)
Value:
({                                                                          \
    unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args);             \
    if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0))         \
      {                                                                       \
        __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, ));                   \
        resultvar = 0xffffffff;                                               \
      }                                                                       \
    (int) resultvar; })

Definition at line 322 of file sysdep.h.

#define INTERNAL_SYSCALL (   name,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    unsigned long int resultvar;                                     \
    register long int r3 asm ("%r3") = SYS_ify (name);                      \
    SUBSTITUTE_ARGS_##nr(args);                                             \
                                                                     \
    asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD                     \
                : "=z" (resultvar)                                   \
                : "r" (r3) ASMFMT_##nr                               \
                : "memory");                                                \
                                                                     \
    (int) resultvar; })

Definition at line 333 of file sysdep.h.

#define INTERNAL_SYSCALL_DECL (   err)    do { } while (0)

Definition at line 361 of file sysdep.h.

#define INTERNAL_SYSCALL_ERRNO (   val,
  err 
)    (-(val))

Definition at line 368 of file sysdep.h.

#define INTERNAL_SYSCALL_ERROR_P (   val,
  err 
)    ((unsigned int) (val) >= 0xfffff001u)

Definition at line 364 of file sysdep.h.

#define INTERNAL_SYSCALL_NCS (   name,
  err,
  nr,
  args... 
)
Value:
({                                                                   \
    unsigned long int resultvar;                                     \
    register long int r3 asm ("%r3") = (name);                              \
    SUBSTITUTE_ARGS_##nr(args);                                             \
                                                                     \
    asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD                     \
                : "=z" (resultvar)                                   \
                : "r" (r3) ASMFMT_##nr                               \
                : "memory");                                                \
                                                                     \
    (int) resultvar; })

Definition at line 347 of file sysdep.h.

#define PTR_DEMANGLE (   var)    PTR_MANGLE (var)

Definition at line 387 of file sysdep.h.

#define PTR_MANGLE (   var)    (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())

Definition at line 385 of file sysdep.h.

#define SUBSTITUTE_ARGS_0 ( )

Definition at line 256 of file sysdep.h.

#define SUBSTITUTE_ARGS_1 (   arg1)
Value:
long int _arg1 = (long int) (arg1);                                  \
       register long int r4 asm ("%r4") = (long int) (_arg1)

Definition at line 257 of file sysdep.h.

#define SUBSTITUTE_ARGS_2 (   arg1,
  arg2 
)
Value:
long int _arg1 = (long int) (arg1);                                  \
       long int _arg2 = (long int) (arg2);                                  \
       register long int r4 asm ("%r4") = (long int) (_arg1);               \
       register long int r5 asm ("%r5") = (long int) (_arg2)

Definition at line 260 of file sysdep.h.

#define SUBSTITUTE_ARGS_3 (   arg1,
  arg2,
  arg3 
)
Value:
long int _arg1 = (long int) (arg1);                                  \
       long int _arg2 = (long int) (arg2);                                  \
       long int _arg3 = (long int) (arg3);                                  \
       register long int r4 asm ("%r4") = (long int) (_arg1);               \
       register long int r5 asm ("%r5") = (long int) (_arg2);               \
       register long int r6 asm ("%r6") = (long int) (_arg3)

Definition at line 265 of file sysdep.h.

#define SUBSTITUTE_ARGS_4 (   arg1,
  arg2,
  arg3,
  arg4 
)
Value:
long int _arg1 = (long int) (arg1);                                  \
       long int _arg2 = (long int) (arg2);                                  \
       long int _arg3 = (long int) (arg3);                                  \
       long int _arg4 = (long int) (arg4);                                  \
       register long int r4 asm ("%r4") = (long int) (_arg1);               \
       register long int r5 asm ("%r5") = (long int) (_arg2);               \
       register long int r6 asm ("%r6") = (long int) (_arg3);               \
       register long int r7 asm ("%r7") = (long int) (_arg4)

Definition at line 272 of file sysdep.h.

#define SUBSTITUTE_ARGS_5 (   arg1,
  arg2,
  arg3,
  arg4,
  arg5 
)
Value:
long int _arg1 = (long int) (arg1);                                  \
       long int _arg2 = (long int) (arg2);                                  \
       long int _arg3 = (long int) (arg3);                                  \
       long int _arg4 = (long int) (arg4);                                  \
       long int _arg5 = (long int) (arg5);                                  \
       register long int r4 asm ("%r4") = (long int) (_arg1);               \
       register long int r5 asm ("%r5") = (long int) (_arg2);               \
       register long int r6 asm ("%r6") = (long int) (_arg3);               \
       register long int r7 asm ("%r7") = (long int) (_arg4);               \
       register long int r0 asm ("%r0") = (long int) (_arg5)

Definition at line 281 of file sysdep.h.

#define SUBSTITUTE_ARGS_6 (   arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  arg6 
)
Value:
long int _arg1 = (long int) (arg1);                                  \
       long int _arg2 = (long int) (arg2);                                  \
       long int _arg3 = (long int) (arg3);                                  \
       long int _arg4 = (long int) (arg4);                                  \
       long int _arg5 = (long int) (arg5);                                  \
       long int _arg6 = (long int) (arg6);                                  \
       register long int r4 asm ("%r4") = (long int)(_arg1);                \
       register long int r5 asm ("%r5") = (long int) (_arg2);               \
       register long int r6 asm ("%r6") = (long int) (_arg3);               \
       register long int r7 asm ("%r7") = (long int) (_arg4);               \
       register long int r0 asm ("%r0") = (long int) (_arg5);               \
       register long int r1 asm ("%r1") = (long int) (_arg6)

Definition at line 292 of file sysdep.h.

#define SUBSTITUTE_ARGS_7 (   arg1,
  arg2,
  arg3,
  arg4,
  arg5,
  arg6,
  arg7 
)
Value:
long int _arg1 = (long int) (arg1);                                  \
       long int _arg2 = (long int) (arg2);                                  \
       long int _arg3 = (long int) (arg3);                                  \
       long int _arg4 = (long int) (arg4);                                  \
       long int _arg5 = (long int) (arg5);                                  \
       long int _arg6 = (long int) (arg6);                                  \
       long int _arg7 = (long int) (arg7);                                  \
       register long int r4 asm ("%r4") = (long int) (_arg1);               \
       register long int r5 asm ("%r5") = (long int) (_arg2);               \
       register long int r6 asm ("%r6") = (long int) (_arg3);               \
       register long int r7 asm ("%r7") = (long int) (_arg4);               \
       register long int r0 asm ("%r0") = (long int) (_arg5);               \
       register long int r1 asm ("%r1") = (long int) (_arg6);               \
       register long int r2 asm ("%r2") = (long int) (_arg7)

Definition at line 305 of file sysdep.h.

#define SYS_ify (   syscall_name)    (__NR_##syscall_name)

Definition at line 34 of file sysdep.h.

Definition at line 237 of file sysdep.h.

#define SYSCALL_INST_STR0   "trapa #0x10\n\t"

Definition at line 225 of file sysdep.h.

#define SYSCALL_INST_STR1   "trapa #0x11\n\t"

Definition at line 226 of file sysdep.h.

#define SYSCALL_INST_STR2   "trapa #0x12\n\t"

Definition at line 227 of file sysdep.h.

#define SYSCALL_INST_STR3   "trapa #0x13\n\t"

Definition at line 228 of file sysdep.h.

#define SYSCALL_INST_STR4   "trapa #0x14\n\t"

Definition at line 229 of file sysdep.h.

#define SYSCALL_INST_STR5   "trapa #0x15\n\t"

Definition at line 230 of file sysdep.h.

#define SYSCALL_INST_STR6   "trapa #0x16\n\t"

Definition at line 231 of file sysdep.h.