root / linux-user / arm / syscall.h @ 192c7bd9
History | View | Annotate | Download (977 Bytes)
1 | 2c0262af | bellard | |
---|---|---|---|
2 | 2c0262af | bellard | /* this struct defines the way the registers are stored on the
|
3 | 2c0262af | bellard | stack during a system call. */
|
4 | 2c0262af | bellard | |
5 | 2c0262af | bellard | struct target_pt_regs {
|
6 | 2c0262af | bellard | target_long uregs[18];
|
7 | 2c0262af | bellard | }; |
8 | 2c0262af | bellard | |
9 | 2c0262af | bellard | #define ARM_cpsr uregs[16] |
10 | 2c0262af | bellard | #define ARM_pc uregs[15] |
11 | 2c0262af | bellard | #define ARM_lr uregs[14] |
12 | 2c0262af | bellard | #define ARM_sp uregs[13] |
13 | 2c0262af | bellard | #define ARM_ip uregs[12] |
14 | 2c0262af | bellard | #define ARM_fp uregs[11] |
15 | 2c0262af | bellard | #define ARM_r10 uregs[10] |
16 | 2c0262af | bellard | #define ARM_r9 uregs[9] |
17 | 2c0262af | bellard | #define ARM_r8 uregs[8] |
18 | 2c0262af | bellard | #define ARM_r7 uregs[7] |
19 | 2c0262af | bellard | #define ARM_r6 uregs[6] |
20 | 2c0262af | bellard | #define ARM_r5 uregs[5] |
21 | 2c0262af | bellard | #define ARM_r4 uregs[4] |
22 | 2c0262af | bellard | #define ARM_r3 uregs[3] |
23 | 2c0262af | bellard | #define ARM_r2 uregs[2] |
24 | 2c0262af | bellard | #define ARM_r1 uregs[1] |
25 | 2c0262af | bellard | #define ARM_r0 uregs[0] |
26 | 2c0262af | bellard | #define ARM_ORIG_r0 uregs[17] |
27 | 2c0262af | bellard | |
28 | 2c0262af | bellard | #define ARM_SYSCALL_BASE 0x900000 |
29 | 192c7bd9 | bellard | #define ARM_THUMB_SYSCALL 0 |
30 | 6f1f31c0 | bellard | |
31 | 6f1f31c0 | bellard | #define ARM_NR_cacheflush (ARM_SYSCALL_BASE + 0xf0000 + 2) |
32 | cf720db3 | bellard | |
33 | a4f81979 | bellard | #define ARM_NR_semihosting 0x123456 |
34 | a4f81979 | bellard | #define ARM_NR_thumb_semihosting 0xAB |
35 | a4f81979 | bellard | |
36 | cf720db3 | bellard | #if defined(TARGET_WORDS_BIGENDIAN)
|
37 | 99c475ab | bellard | #define UNAME_MACHINE "armv5teb" |
38 | cf720db3 | bellard | #else
|
39 | 99c475ab | bellard | #define UNAME_MACHINE "armv5tel" |
40 | cf720db3 | bellard | #endif
|
41 | a4f81979 | bellard | |
42 | a4f81979 | bellard | uint32_t do_arm_semihosting(CPUState *); |