1 /* vi: set sw=4 ts=4: */
5 * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
7 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 #include <sys/syscall.h>
12 /* psm: including sys/prctl.h would depend on kernel headers */
15 extern int prctl (int __option, ...);
16 int prctl (int __option, ...)
18 register long no __asm__("B0");
19 register long a __asm__("A4");
20 register long b __asm__("B4");
21 register long c __asm__("A6");
22 register long d __asm__("B6");
23 register long e __asm__("A8");
27 va_start( ap, __option);
29 b = va_arg( ap, long);
30 c = va_arg( ap, long);
31 d = va_arg( ap, long);
32 e = va_arg( ap, long);
37 __asm__ __volatile__ ("SWE" : "=a" (a) : "a" (a), "b" (b), "a" (c), "b" (d), "a" (e), "b" (no)
41 __SYSCALL_RETURN (int);