LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2014 The Go Authors. All rights reserved. | 1 // Copyright 2014 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 // TODO #include "../../cmd/ld/textflag.h" | 5 // TODO #include "../../cmd/ld/textflag.h" |
6 | 6 |
7 #define NOSPLIT 4 | 7 #define NOSPLIT 4 |
8 | 8 |
9 // Functions that return details about our address space. | 9 // Functions that return details about our address space. |
10 // They use the C-defined symbols like edata and also know | 10 // They use the C-defined symbols like edata and also know |
(...skipping 22 matching lines...) Expand all Loading... |
33 RET | 33 RET |
34 | 34 |
35 // end of the pre-defined address space. | 35 // end of the pre-defined address space. |
36 TEXT ·end(SB), NOSPLIT, $0 | 36 TEXT ·end(SB), NOSPLIT, $0 |
37 LEAQ end+0(SB), BX | 37 LEAQ end+0(SB), BX |
38 MOVQ BX, ret+0(FP) | 38 MOVQ BX, ret+0(FP) |
39 RET | 39 RET |
40 | 40 |
41 // These are offsets of critical fields of runtime.mheap. | 41 // These are offsets of critical fields of runtime.mheap. |
42 // TODO: Very susceptible to change! They (or something equivalent) need to be p
ublished by runtime. | 42 // TODO: Very susceptible to change! They (or something equivalent) need to be p
ublished by runtime. |
43 #define arena_start_offset 28840 | 43 #define arena_start_offset 14504 |
44 #define arena_used_offset 28848 | 44 #define arena_used_offset 14512 |
45 #define arena_end_offset 28856 | 45 #define arena_end_offset 14520 |
46 | 46 |
47 // start of heap. | 47 // start of heap. |
48 TEXT ·heapStart(SB), NOSPLIT, $0 | 48 TEXT ·heapStart(SB), NOSPLIT, $0 |
49 MOVQ runtime·mheap+arena_start_offset(SB), BX | 49 MOVQ runtime·mheap+arena_start_offset(SB), BX |
50 MOVQ BX, ret+0(FP) | 50 MOVQ BX, ret+0(FP) |
51 RET | 51 RET |
52 | 52 |
53 // end of active region of heap. | 53 // end of active region of heap. |
54 TEXT ·heapUsed(SB), NOSPLIT, $0 | 54 TEXT ·heapUsed(SB), NOSPLIT, $0 |
55 MOVQ runtime·mheap+arena_used_offset(SB), BX | 55 MOVQ runtime·mheap+arena_used_offset(SB), BX |
56 MOVQ BX, ret+0(FP) | 56 MOVQ BX, ret+0(FP) |
57 RET | 57 RET |
58 | 58 |
59 // end of all of heap. | 59 // end of all of heap. |
60 TEXT ·heapEnd(SB), NOSPLIT, $0 | 60 TEXT ·heapEnd(SB), NOSPLIT, $0 |
61 MOVQ runtime·mheap+arena_end_offset(SB), BX | 61 MOVQ runtime·mheap+arena_end_offset(SB), BX |
62 MOVQ BX, ret+0(FP) | 62 MOVQ BX, ret+0(FP) |
63 RET | 63 RET |
LEFT | RIGHT |