Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1002)

Side by Side Diff: src/pkg/runtime/linux/amd64/defs.h

Issue 5348052: code review 5348052: runtime, syscall: convert from godefs to cgo (Closed)
Patch Set: diff -r 700ff7ef684f https://go.googlecode.com/hg Created 13 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/linux/386/defs.h ('k') | src/pkg/runtime/linux/defs.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // godefs -f -m64 defs.c 1 // Created by cgo -cdefs - DO NOT EDIT
2 2 // cgo -cdefs defs.go defs1.go
3 // MACHINE GENERATED - DO NOT EDIT. 3
4 4
5 // Constants
6 enum { 5 enum {
7 » PROT_NONE = 0, 6 » PROT_NONE» = 0x0,
8 » PROT_READ = 0x1, 7 » PROT_READ» = 0x1,
9 » PROT_WRITE = 0x2, 8 » PROT_WRITE» = 0x2,
10 » PROT_EXEC = 0x4, 9 » PROT_EXEC» = 0x4,
11 » MAP_ANON = 0x20, 10
12 » MAP_PRIVATE = 0x2, 11 » MAP_ANON» = 0x20,
13 » MAP_FIXED = 0x10, 12 » MAP_PRIVATE» = 0x2,
14 » SA_RESTART = 0x10000000, 13 » MAP_FIXED» = 0x10,
15 » SA_ONSTACK = 0x8000000, 14
16 » SA_RESTORER = 0x4000000, 15 » SA_RESTART» = 0x10000000,
17 » SA_SIGINFO = 0x4, 16 » SA_ONSTACK» = 0x8000000,
18 » SIGHUP = 0x1, 17 » SA_RESTORER» = 0x4000000,
19 » SIGINT = 0x2, 18 » SA_SIGINFO» = 0x4,
20 » SIGQUIT = 0x3, 19
21 » SIGILL = 0x4, 20 » SIGHUP» » = 0x1,
22 » SIGTRAP = 0x5, 21 » SIGINT» » = 0x2,
23 » SIGABRT = 0x6, 22 » SIGQUIT»» = 0x3,
24 » SIGBUS = 0x7, 23 » SIGILL» » = 0x4,
25 » SIGFPE = 0x8, 24 » SIGTRAP»» = 0x5,
26 » SIGKILL = 0x9, 25 » SIGABRT»» = 0x6,
27 » SIGUSR1 = 0xa, 26 » SIGBUS» » = 0x7,
28 » SIGSEGV = 0xb, 27 » SIGFPE» » = 0x8,
29 » SIGUSR2 = 0xc, 28 » SIGKILL»» = 0x9,
30 » SIGPIPE = 0xd, 29 » SIGUSR1»» = 0xa,
31 » SIGALRM = 0xe, 30 » SIGSEGV»» = 0xb,
32 » SIGSTKFLT = 0x10, 31 » SIGUSR2»» = 0xc,
33 » SIGCHLD = 0x11, 32 » SIGPIPE»» = 0xd,
34 » SIGCONT = 0x12, 33 » SIGALRM»» = 0xe,
35 » SIGSTOP = 0x13, 34 » SIGSTKFLT» = 0x10,
36 » SIGTSTP = 0x14, 35 » SIGCHLD»» = 0x11,
37 » SIGTTIN = 0x15, 36 » SIGCONT»» = 0x12,
38 » SIGTTOU = 0x16, 37 » SIGSTOP»» = 0x13,
39 » SIGURG = 0x17, 38 » SIGTSTP»» = 0x14,
40 » SIGXCPU = 0x18, 39 » SIGTTIN»» = 0x15,
41 » SIGXFSZ = 0x19, 40 » SIGTTOU»» = 0x16,
42 » SIGVTALRM = 0x1a, 41 » SIGURG» » = 0x17,
43 » SIGPROF = 0x1b, 42 » SIGXCPU»» = 0x18,
44 » SIGWINCH = 0x1c, 43 » SIGXFSZ»» = 0x19,
45 » SIGIO = 0x1d, 44 » SIGVTALRM» = 0x1a,
46 » SIGPWR = 0x1e, 45 » SIGPROF»» = 0x1b,
47 » SIGSYS = 0x1f, 46 » SIGWINCH» = 0x1c,
48 » FPE_INTDIV = 0x1, 47 » SIGIO» » = 0x1d,
49 » FPE_INTOVF = 0x2, 48 » SIGPWR» » = 0x1e,
50 » FPE_FLTDIV = 0x3, 49 » SIGSYS» » = 0x1f,
51 » FPE_FLTOVF = 0x4, 50
52 » FPE_FLTUND = 0x5, 51 » FPE_INTDIV» = 0x1,
53 » FPE_FLTRES = 0x6, 52 » FPE_INTOVF» = 0x2,
54 » FPE_FLTINV = 0x7, 53 » FPE_FLTDIV» = 0x3,
55 » FPE_FLTSUB = 0x8, 54 » FPE_FLTOVF» = 0x4,
56 » BUS_ADRALN = 0x1, 55 » FPE_FLTUND» = 0x5,
57 » BUS_ADRERR = 0x2, 56 » FPE_FLTRES» = 0x6,
58 » BUS_OBJERR = 0x3, 57 » FPE_FLTINV» = 0x7,
59 » SEGV_MAPERR = 0x1, 58 » FPE_FLTSUB» = 0x8,
60 » SEGV_ACCERR = 0x2, 59
61 » ITIMER_REAL = 0, 60 » BUS_ADRALN» = 0x1,
62 » ITIMER_VIRTUAL = 0x1, 61 » BUS_ADRERR» = 0x2,
63 » ITIMER_PROF = 0x2, 62 » BUS_OBJERR» = 0x3,
64 » O_RDONLY = 0, 63
65 » O_CLOEXEC = 02000000, 64 » SEGV_MAPERR» = 0x1,
66 }; 65 » SEGV_ACCERR» = 0x2,
67 66
68 // Types 67 » ITIMER_REAL» = 0x0,
68 » ITIMER_VIRTUAL» = 0x1,
69 » ITIMER_PROF» = 0x2,
70 };
71
72 typedef struct Timespec Timespec;
73 typedef struct Timeval Timeval;
74 typedef struct Sigaction Sigaction;
75 typedef struct Siginfo Siginfo;
76 typedef struct Itimerval Itimerval;
77
69 #pragma pack on 78 #pragma pack on
70 79
71 typedef struct Timespec Timespec;
72 struct Timespec { 80 struct Timespec {
73 » int64 tv_sec; 81 » int64» tv_sec;
74 » int64 tv_nsec; 82 » int64» tv_nsec;
75 }; 83 };
76
77 typedef struct Timeval Timeval;
78 struct Timeval { 84 struct Timeval {
79 » int64 tv_sec; 85 » int64» tv_sec;
80 » int64 tv_usec; 86 » int64» tv_usec;
81 }; 87 };
82
83 typedef struct Sigaction Sigaction;
84 struct Sigaction { 88 struct Sigaction {
85 » void *sa_handler; 89 » void» *sa_handler;
86 » uint64 sa_flags; 90 » uint64» sa_flags;
87 » void *sa_restorer; 91 » void» *sa_restorer;
88 » uint64 sa_mask; 92 » uint64» sa_mask;
89 }; 93 };
90
91 typedef struct Siginfo Siginfo;
92 struct Siginfo { 94 struct Siginfo {
93 » int32 si_signo; 95 » int32» si_signo;
94 » int32 si_errno; 96 » int32» si_errno;
95 » int32 si_code; 97 » int32» si_code;
96 » byte pad_godefs_0[4]; 98 » byte» Pad_godefs_0[4];
97 » byte _sifields[112]; 99 » byte» _sifields[112];
98 }; 100 };
99
100 typedef struct Itimerval Itimerval;
101 struct Itimerval { 101 struct Itimerval {
102 » Timeval it_interval; 102 » Timeval»it_interval;
103 » Timeval it_value; 103 » Timeval»it_value;
104 }; 104 };
105
106
105 #pragma pack off 107 #pragma pack off
106 // godefs -f -m64 defs1.c 108 // Created by cgo -cdefs - DO NOT EDIT
107 109 // cgo -cdefs defs.go defs1.go
108 // MACHINE GENERATED - DO NOT EDIT. 110
109 111
110 // Constants 112 enum {
111 113 » O_RDONLY» = 0x0,
112 // Types 114 » O_CLOEXEC» = 0x80000,
115 };
116
117 typedef struct Usigset Usigset;
118 typedef struct Fpxreg Fpxreg;
119 typedef struct Xmmreg Xmmreg;
120 typedef struct Fpstate Fpstate;
121 typedef struct Fpxreg1 Fpxreg1;
122 typedef struct Xmmreg1 Xmmreg1;
123 typedef struct Fpstate1 Fpstate1;
124 typedef struct Fpreg1 Fpreg1;
125 typedef struct Sigaltstack Sigaltstack;
126 typedef struct Mcontext Mcontext;
127 typedef struct Ucontext Ucontext;
128 typedef struct Sigcontext Sigcontext;
129
113 #pragma pack on 130 #pragma pack on
114 131
115 typedef struct Usigset Usigset;
116 struct Usigset { 132 struct Usigset {
117 » uint64 __val[16]; 133 » uint64» __val[16];
118 }; 134 };
119
120 typedef struct Fpxreg Fpxreg;
121 struct Fpxreg { 135 struct Fpxreg {
122 » uint16 significand[4]; 136 » uint16» significand[4];
123 » uint16 exponent; 137 » uint16» exponent;
124 » uint16 padding[3]; 138 » uint16» padding[3];
125 }; 139 };
126
127 typedef struct Xmmreg Xmmreg;
128 struct Xmmreg { 140 struct Xmmreg {
129 » uint32 element[4]; 141 » uint32» element[4];
130 }; 142 };
131
132 typedef struct Fpstate Fpstate;
133 struct Fpstate { 143 struct Fpstate {
134 » uint16 cwd; 144 » uint16» cwd;
135 » uint16 swd; 145 » uint16» swd;
136 » uint16 ftw; 146 » uint16» ftw;
137 » uint16 fop; 147 » uint16» fop;
138 » uint64 rip; 148 » uint64» rip;
139 » uint64 rdp; 149 » uint64» rdp;
140 » uint32 mxcsr; 150 » uint32» mxcsr;
141 » uint32 mxcr_mask; 151 » uint32» mxcr_mask;
142 » Fpxreg _st[8]; 152 » Fpxreg» _st[8];
143 » Xmmreg _xmm[16]; 153 » Xmmreg» _xmm[16];
144 » uint32 padding[24]; 154 » uint32» padding[24];
145 }; 155 };
146
147 typedef struct Fpxreg1 Fpxreg1;
148 struct Fpxreg1 { 156 struct Fpxreg1 {
149 » uint16 significand[4]; 157 » uint16» significand[4];
150 » uint16 exponent; 158 » uint16» exponent;
151 » uint16 padding[3]; 159 » uint16» padding[3];
152 }; 160 };
153
154 typedef struct Xmmreg1 Xmmreg1;
155 struct Xmmreg1 { 161 struct Xmmreg1 {
156 » uint32 element[4]; 162 » uint32» element[4];
157 }; 163 };
158
159 typedef struct Fpstate1 Fpstate1;
160 struct Fpstate1 { 164 struct Fpstate1 {
161 » uint16 cwd; 165 » uint16» cwd;
162 » uint16 swd; 166 » uint16» swd;
163 » uint16 ftw; 167 » uint16» ftw;
164 » uint16 fop; 168 » uint16» fop;
165 » uint64 rip; 169 » uint64» rip;
166 » uint64 rdp; 170 » uint64» rdp;
167 » uint32 mxcsr; 171 » uint32» mxcsr;
168 » uint32 mxcr_mask; 172 » uint32» mxcr_mask;
169 » Fpxreg1 _st[8]; 173 » Fpxreg1»_st[8];
170 » Xmmreg1 _xmm[16]; 174 » Xmmreg1»_xmm[16];
171 » uint32 padding[24]; 175 » uint32» padding[24];
172 }; 176 };
173
174 typedef struct Fpreg1 Fpreg1;
175 struct Fpreg1 { 177 struct Fpreg1 {
176 » uint16 significand[4]; 178 » uint16» significand[4];
177 » uint16 exponent; 179 » uint16» exponent;
178 }; 180 };
179
180 typedef struct Sigaltstack Sigaltstack;
181 struct Sigaltstack { 181 struct Sigaltstack {
182 » void *ss_sp; 182 » byte» *ss_sp;
183 » int32 ss_flags; 183 » int32» ss_flags;
184 » byte pad_godefs_0[4]; 184 » byte» Pad_godefs_0[4];
185 » uint64 ss_size; 185 » uint64» ss_size;
186 }; 186 };
187
188 typedef struct Mcontext Mcontext;
189 struct Mcontext { 187 struct Mcontext {
190 » int64 gregs[23]; 188 » int64» gregs[23];
191 » Fpstate *fpregs; 189 » Fpstate»*fpregs;
192 » uint64 __reserved1[8]; 190 » uint64» __reserved1[8];
193 }; 191 };
194
195 typedef struct Ucontext Ucontext;
196 struct Ucontext { 192 struct Ucontext {
197 » uint64 uc_flags; 193 » uint64» uc_flags;
198 » Ucontext *uc_link; 194 » Ucontext» *uc_link;
199 » Sigaltstack uc_stack; 195 » Sigaltstack» uc_stack;
200 » Mcontext uc_mcontext; 196 » Mcontext» uc_mcontext;
201 » Usigset uc_sigmask; 197 » Usigset»uc_sigmask;
202 » Fpstate __fpregs_mem; 198 » Fpstate»__fpregs_mem;
203 }; 199 };
204
205 typedef struct Sigcontext Sigcontext;
206 struct Sigcontext { 200 struct Sigcontext {
207 » uint64 r8; 201 » uint64» r8;
208 » uint64 r9; 202 » uint64» r9;
209 » uint64 r10; 203 » uint64» r10;
210 » uint64 r11; 204 » uint64» r11;
211 » uint64 r12; 205 » uint64» r12;
212 » uint64 r13; 206 » uint64» r13;
213 » uint64 r14; 207 » uint64» r14;
214 » uint64 r15; 208 » uint64» r15;
215 » uint64 rdi; 209 » uint64» rdi;
216 » uint64 rsi; 210 » uint64» rsi;
217 » uint64 rbp; 211 » uint64» rbp;
218 » uint64 rbx; 212 » uint64» rbx;
219 » uint64 rdx; 213 » uint64» rdx;
220 » uint64 rax; 214 » uint64» rax;
221 » uint64 rcx; 215 » uint64» rcx;
222 » uint64 rsp; 216 » uint64» rsp;
223 » uint64 rip; 217 » uint64» rip;
224 » uint64 eflags; 218 » uint64» eflags;
225 » uint16 cs; 219 » uint16» cs;
226 » uint16 gs; 220 » uint16» gs;
227 » uint16 fs; 221 » uint16» fs;
228 » uint16 __pad0; 222 » uint16» __pad0;
229 » uint64 err; 223 » uint64» err;
230 » uint64 trapno; 224 » uint64» trapno;
231 » uint64 oldmask; 225 » uint64» oldmask;
232 » uint64 cr2; 226 » uint64» cr2;
233 » Fpstate1 *fpstate; 227 » Fpstate1» *fpstate;
234 » uint64 __reserved1[8]; 228 » uint64» __reserved1[8];
235 }; 229 };
230
231
236 #pragma pack off 232 #pragma pack off
OLDNEW
« no previous file with comments | « src/pkg/runtime/linux/386/defs.h ('k') | src/pkg/runtime/linux/defs.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b