File: fastcall.h

package info (click to toggle)
radare2 0.9.6-3.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 17,496 kB
  • ctags: 45,959
  • sloc: ansic: 240,999; sh: 3,645; makefile: 2,520; python: 1,212; asm: 312; ruby: 214; awk: 209; perl: 188; lisp: 169; java: 23; xml: 17; php: 6
file content (56 lines) | stat: -rw-r--r-- 1,430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* radare 2010-2013 GPL -- pancake */

#include <r_syscall.h>

static struct r_syscall_regs_t fastcall_arm [R_SYSCALL_ARGS] = {
	{{ "r0", NULL }},
	{{ "r0", "r1", NULL }},
	{{ "r0", "r1", "r2", NULL }},
	{{ "r0", "r1", "r2", "r3", NULL }},
	{{ NULL }}
};

static struct r_syscall_regs_t fastcall_mips [R_SYSCALL_ARGS] = {
	{{ "a0", NULL }},
	{{ "a0", "a1", NULL }},
	{{ "a0", "a1", "a2", NULL }},
	{{ "a0", "a1", "a2", "a3", NULL }},
	{{ NULL }}
};

// TODO: add ppc and ppc64 regs here

static struct r_syscall_regs_t fastcall_x86_32 [R_SYSCALL_ARGS] = {
	{{ "eax", NULL }},
	{{ "eax", "ebx", NULL }},
	{{ "eax", "ebx", "ecx", NULL }},
	{{ "eax", "ebx", "ecx", "edx", NULL }},
	{{ NULL }}
};

// TODO: x86-64-microsoft RCX, RDX, R8, R9 
static struct r_syscall_regs_t fastcall_x86_64 [R_SYSCALL_ARGS] = {
	{{ "rdi", NULL }},
	{{ "rdi", "rsi", NULL }},
	{{ "rdi", "rsi", "rdx", NULL }},
	{{ "rdi", "rsi", "rdx", "rdx", NULL }},
	{{ "rdi", "rsi", "rdx", "rdx", "r8", NULL }},
	{{ "rdi", "rsi", "rdx", "rdx", "r8", "r9", NULL }},
	{{ NULL }}
};

static struct r_syscall_regs_t fastcall_x86_8 [R_SYSCALL_ARGS] = {
	{{ "ax", NULL }},
	{{ "ax", "dx", NULL }},
	{{ "ax", "dx", "bx", NULL }},
	{{ "ax", "dx", "bx", "cx", NULL }},
	{{ NULL }}
};

static struct r_syscall_regs_t fastcall_sh [R_SYSCALL_ARGS] = {
	{{ "r4", NULL }},
	{{ "r4", "r5", NULL }},
	{{ "r4", "r5", "r6", NULL }},
	{{ "r4", "r5", "r6", "r7", NULL }},
	{{ NULL }}
};