Rizin
unix-like reverse engineering framework and cli tools
sfsyscall.h File Reference

Go to the source code of this file.

Macros

#define __sfsyscall_return(type, res)
 
#define _sfsyscall0(type, name)
 
#define _sfsyscall1(type, name, type1, arg1)
 
#define _sfsyscall2(type, name, type1, arg1, type2, arg2)
 
#define _sfsyscall3(type, name, type1, arg1, type2, arg2, type3, arg3)
 
#define _sfsyscall4(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4)
 
#define _sfsyscall5(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5)
 
#define _sfsyscall6(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5, type6, arg6)
 
#define _sfoldsyscall6(type, name, type1, arg1, type2, arg2, type3, arg3, type4, arg4, type5, arg5, type6, arg6)
 

Macro Definition Documentation

◆ __sfsyscall_return

#define __sfsyscall_return (   type,
  res 
)
Value:
do { \
return (type) (res); \
} while (0)
int type
Definition: mipsasm.c:17

Definition at line 44 of file sfsyscall.h.

◆ _sfoldsyscall6

#define _sfoldsyscall6 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3,
  type4,
  arg4,
  type5,
  arg5,
  type6,
  arg6 
)
Value:
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6) \
{ \
long __res; \
__asm__ volatile ("pushl %%ebx\n\t" \
"pushl %7\n\t" \
"pushl %6\n\t" \
"pushl %5\n\t" \
"pushl %4\n\t" \
"pushl %3\n\t" \
"pushl %2\n\t" \
"movl %%esp, %%ebx\n\t" \
"int $0x80\n\t" \
"add $0x18,%%esp\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"g" ((long)(arg2)), \
"g" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)), \
"g" ((long)(arg6))); \
__sfsyscall_return(type,__res); \
}
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags long
Definition: sflib.h:79
const char * name
Definition: op.c:541
Definition: z80asm.h:102

Definition at line 160 of file sfsyscall.h.

◆ _sfsyscall0

#define _sfsyscall0 (   type,
  name 
)
Value:
type name(void) \
{ \
long __res; \
__asm__ volatile ("###> " #name "() <###\n\t" \
"int $0x80" \
: "=a" (__res) \
: "0" (__NR_##name)); \
__sfsyscall_return(type,__res); \
}

Definition at line 54 of file sfsyscall.h.

◆ _sfsyscall1

#define _sfsyscall1 (   type,
  name,
  type1,
  arg1 
)
Value:
type name(type1 arg1) \
{ \
long __res; \
__asm__ volatile ("###> " #name "(%2) <###\n\t" \
"pushl %%ebx\n\t" \
"mov %2,%%ebx\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1))); \
__sfsyscall_return(type,__res); \
}

Definition at line 65 of file sfsyscall.h.

◆ _sfsyscall2

#define _sfsyscall2 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2 
)
Value:
type name(type1 arg1,type2 arg2) \
{ \
long __res; \
__asm__ volatile ("###> " #name "(%2, %3) <###\n\t" \
"pushl %%ebx\n\t" \
"mov %2,%%ebx\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"c" ((long)(arg2)) ); \
__sfsyscall_return(type,__res); \
}

Definition at line 79 of file sfsyscall.h.

◆ _sfsyscall3

#define _sfsyscall3 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3 
)
Value:
type name(type1 arg1,type2 arg2,type3 arg3) \
{ \
long __res; \
__asm__ volatile ("###> " #name "(%2, %3, %4) <###\n\t" \
"pushl %%ebx\n\t" \
"mov %2,%%ebx\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)) ); \
__sfsyscall_return(type,__res); \
}

Definition at line 93 of file sfsyscall.h.

◆ _sfsyscall4

#define _sfsyscall4 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3,
  type4,
  arg4 
)
Value:
type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
{ \
long __res; \
__asm__ volatile ("###> " #name "(%2, %3, %4, %5) <###\n\t" \
"pushl %%ebx\n\t" \
"mov %2,%%ebx\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)),"S" ((long)(arg4)) ); \
__sfsyscall_return(type,__res); \
}

Definition at line 108 of file sfsyscall.h.

◆ _sfsyscall5

#define _sfsyscall5 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3,
  type4,
  arg4,
  type5,
  arg5 
)
Value:
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
{ \
long __res; \
__asm__ volatile ("###> " #name "(%2, %3, %4, %5, %6) <###\n\t" \
"pushl %%ebx\n\t" \
"mov %2,%%ebx\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
__sfsyscall_return(type,__res); \
}

Definition at line 123 of file sfsyscall.h.

◆ _sfsyscall6

#define _sfsyscall6 (   type,
  name,
  type1,
  arg1,
  type2,
  arg2,
  type3,
  arg3,
  type4,
  arg4,
  type5,
  arg5,
  type6,
  arg6 
)
Value:
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, type6 arg6) \
{ \
long __res; \
__asm__ volatile ("##> " #name "(%2, %3, %4, %5, %6, %7) <###\n\t" \
"pushl %%ebx\n\t" \
"pushl %%ebp\n\t" \
"movl %2,%%ebx\n\t" \
"movl %7,%%ebp\n\t" \
"int $0x80\n\t" \
"popl %%ebp\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "0" (__NR_##name),"g" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \
"g" ((long)(arg6))); \
__sfsyscall_return(type,__res); \
}

Definition at line 139 of file sfsyscall.h.