| OLD | NEW |
| 1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 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 /* | 5 /* |
| 6 * basic types | 6 * basic types |
| 7 */ | 7 */ |
| 8 typedef signed char int8; | 8 typedef signed char int8; |
| 9 typedef unsigned char uint8; | 9 typedef unsigned char uint8; |
| 10 typedef signed short int16; | 10 typedef signed short int16; |
| (...skipping 58 matching lines...) | | Loading... |
| 69 typedef struct Complex128 Complex128; | 69 typedef struct Complex128 Complex128; |
| 70 | 70 |
| 71 /* | 71 /* |
| 72 * per-cpu declaration. | 72 * per-cpu declaration. |
| 73 * "extern register" is a special storage class implemented by 6c, 8c, etc. | 73 * "extern register" is a special storage class implemented by 6c, 8c, etc. |
| 74 * on machines with lots of registers, it allocates a register that will not be | 74 * on machines with lots of registers, it allocates a register that will not be |
| 75 * used in generated code. on the x86, it allocates a slot indexed by a | 75 * used in generated code. on the x86, it allocates a slot indexed by a |
| 76 * segment register. | 76 * segment register. |
| 77 * | 77 * |
| 78 * amd64: allocated downwards from R15 | 78 * amd64: allocated downwards from R15 |
| 79 * x86: allocated upwards from 0(FS) | 79 * x86: allocated upwards from 0(GS) |
| 80 * arm: allocated downwards from R10 | 80 * arm: allocated downwards from R10 |
| 81 * | 81 * |
| 82 * every C file linked into a Go program must include runtime.h | 82 * every C file linked into a Go program must include runtime.h |
| 83 * so that the C compiler knows to avoid other uses of these registers. | 83 * so that the C compiler knows to avoid other uses of these registers. |
| 84 * the Go compilers know to avoid them. | 84 * the Go compilers know to avoid them. |
| 85 */ | 85 */ |
| 86 extern register G* g; | 86 extern register G* g; |
| 87 extern register M* m; | 87 extern register M* m; |
| 88 | 88 |
| 89 /* | 89 /* |
| (...skipping 506 matching lines...) | | Loading... |
| 596 | 596 |
| 597 Hchan* makechan(Type*, int64); | 597 Hchan* makechan(Type*, int64); |
| 598 void chansend(Hchan*, void*, bool*); | 598 void chansend(Hchan*, void*, bool*); |
| 599 void chanrecv(Hchan*, void*, bool*); | 599 void chanrecv(Hchan*, void*, bool*); |
| 600 void chanclose(Hchan*); | 600 void chanclose(Hchan*); |
| 601 bool chanclosed(Hchan*); | 601 bool chanclosed(Hchan*); |
| 602 int32 chanlen(Hchan*); | 602 int32 chanlen(Hchan*); |
| 603 int32 chancap(Hchan*); | 603 int32 chancap(Hchan*); |
| 604 | 604 |
| 605 void ifaceE2I(struct InterfaceType*, Eface, Iface*); | 605 void ifaceE2I(struct InterfaceType*, Eface, Iface*); |
| OLD | NEW |