Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * linux/asm-sparc/reg.h | |
3 | * Layout of the registers as expected by gdb on the Sparc | |
4 | * we should replace the user.h definitions with those in | |
5 | * this file, we don't even use the other | |
6 | * -miguel | |
7 | * | |
8 | * The names of the structures, constants and aliases in this file | |
9 | * have the same names as the sunos ones, some programs rely on these | |
10 | * names (gdb for example). | |
11 | * | |
12 | */ | |
13 | ||
14 | #ifndef __SPARC_REG_H | |
15 | #define __SPARC_REG_H | |
16 | ||
17 | struct regs { | |
18 | int r_psr; | |
19 | #define r_ps r_psr | |
20 | int r_pc; | |
21 | int r_npc; | |
22 | int r_y; | |
23 | int r_g1; | |
24 | int r_g2; | |
25 | int r_g3; | |
26 | int r_g4; | |
27 | int r_g5; | |
28 | int r_g6; | |
29 | int r_g7; | |
30 | int r_o0; | |
31 | int r_o1; | |
32 | int r_o2; | |
33 | int r_o3; | |
34 | int r_o4; | |
35 | int r_o5; | |
36 | int r_o6; | |
37 | int r_o7; | |
38 | }; | |
39 | ||
40 | struct fpq { | |
41 | unsigned long *addr; | |
42 | unsigned long instr; | |
43 | }; | |
44 | ||
45 | struct fq { | |
46 | union { | |
47 | double whole; | |
48 | struct fpq fpq; | |
49 | } FQu; | |
50 | }; | |
51 | ||
52 | #define FPU_REGS_TYPE unsigned int | |
53 | #define FPU_FSR_TYPE unsigned | |
54 | ||
55 | struct fp_status { | |
56 | union { | |
57 | FPU_REGS_TYPE Fpu_regs[32]; | |
58 | double Fpu_dregs[16]; | |
59 | } fpu_fr; | |
60 | FPU_FSR_TYPE Fpu_fsr; | |
61 | unsigned Fpu_flags; | |
62 | unsigned Fpu_extra; | |
63 | unsigned Fpu_qcnt; | |
64 | struct fq Fpu_q[16]; | |
65 | }; | |
66 | ||
67 | #define fpu_regs f_fpstatus.fpu_fr.Fpu_regs | |
68 | #define fpu_dregs f_fpstatus.fpu_fr.Fpu_dregs | |
69 | #define fpu_fsr f_fpstatus.Fpu_fsr | |
70 | #define fpu_flags f_fpstatus.Fpu_flags | |
71 | #define fpu_extra f_fpstatus.Fpu_extra | |
72 | #define fpu_q f_fpstatus.Fpu_q | |
73 | #define fpu_qcnt f_fpstatus.Fpu_qcnt | |
74 | ||
75 | struct fpu { | |
76 | struct fp_status f_fpstatus; | |
77 | }; | |
78 | ||
79 | #endif /* __SPARC_REG_H */ |