LEFT | RIGHT |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "a.h" | 5 #include "a.h" |
6 | 6 |
7 /* | 7 /* |
8 * Helpers for building pkg/runtime. | 8 * Helpers for building pkg/runtime. |
9 */ | 9 */ |
10 | 10 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 "#define get_tls(r) MOVQ 0x28(GS), r\n" | 183 "#define get_tls(r) MOVQ 0x28(GS), r\n" |
184 "#define g(r) 0(r)\n" | 184 "#define g(r) 0(r)\n" |
185 "#define m(r) 8(r)\n" | 185 "#define m(r) 8(r)\n" |
186 }, | 186 }, |
187 {"amd64", "plan9", | 187 {"amd64", "plan9", |
188 "#define get_tls(r)\n" | 188 "#define get_tls(r)\n" |
189 "#define g(r) 0(GS)\n" | 189 "#define g(r) 0(GS)\n" |
190 "#define m(r) 8(GS)\n" | 190 "#define m(r) 8(GS)\n" |
191 "#define procid(r) 16(GS)\n" | 191 "#define procid(r) 16(GS)\n" |
192 }, | 192 }, |
193 » {"amd64", "sunos", | 193 » {"amd64", "solaris", |
194 "#define get_tls(r) MOVQ 0(FS), r\n" | 194 "#define get_tls(r) MOVQ 0(FS), r\n" |
195 "#define g(r) -16(r)(FS*1)\n" | 195 "#define g(r) -16(r)(FS*1)\n" |
196 "#define m(r) -8(r)(FS*1)\n" | 196 "#define m(r) -8(r)(FS*1)\n" |
197 }, | 197 }, |
198 // The TLS accessors here are defined here to use initial exec model. | 198 // The TLS accessors here are defined here to use initial exec model. |
199 // If the linker is not outputting a shared library, it will reduce | 199 // If the linker is not outputting a shared library, it will reduce |
200 // the TLS accessors to the local exec model, effectively removing | 200 // the TLS accessors to the local exec model, effectively removing |
201 // get_tls(). | 201 // get_tls(). |
202 {"amd64", "linux", | 202 {"amd64", "linux", |
203 "#define get_tls(r) MOVQ runtime·tlsgm(SB), r\n" | 203 "#define get_tls(r) MOVQ runtime·tlsgm(SB), r\n" |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 | 470 |
471 bfree(&in); | 471 bfree(&in); |
472 bfree(&b); | 472 bfree(&b); |
473 bfree(&b1); | 473 bfree(&b1); |
474 bfree(&out); | 474 bfree(&out); |
475 vfree(&argv); | 475 vfree(&argv); |
476 vfree(&lines); | 476 vfree(&lines); |
477 vfree(&fields); | 477 vfree(&fields); |
478 vfree(&seen); | 478 vfree(&seen); |
479 } | 479 } |
LEFT | RIGHT |