summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/amd64')
-rw-r--r--src/pkg/runtime/amd64/asm.s24
-rw-r--r--src/pkg/runtime/amd64/traceback.c4
2 files changed, 14 insertions, 14 deletions
diff --git a/src/pkg/runtime/amd64/asm.s b/src/pkg/runtime/amd64/asm.s
index 235f27206..b6642c13c 100644
--- a/src/pkg/runtime/amd64/asm.s
+++ b/src/pkg/runtime/amd64/asm.s
@@ -151,7 +151,7 @@ TEXT runtime·morestack(SB),7,$0
MOVQ AX, (m_morebuf+gobuf_pc)(BX)
LEAQ 16(SP), AX // f's caller's SP
MOVQ AX, (m_morebuf+gobuf_sp)(BX)
- MOVQ AX, (m_morefp)(BX)
+ MOVQ AX, m_moreargp(BX)
get_tls(CX)
MOVQ g(CX), SI
MOVQ SI, (m_morebuf+gobuf_g)(BX)
@@ -197,9 +197,9 @@ TEXT reflect·call(SB), 7, $0
MOVL 24(SP), CX // arg size
MOVQ AX, m_morepc(BX) // f's PC
- MOVQ DX, m_morefp(BX) // argument frame pointer
- MOVL CX, m_moreargs(BX) // f's argument size
- MOVL $1, m_moreframe(BX) // f's frame size
+ MOVQ DX, m_moreargp(BX) // argument frame pointer
+ MOVL CX, m_moreargsize(BX) // f's argument size
+ MOVL $1, m_moreframesize(BX) // f's frame size
// Call newstack on m's scheduling stack.
MOVQ m_g0(BX), BP
@@ -230,7 +230,7 @@ TEXT runtime·morestack00(SB),7,$0
get_tls(CX)
MOVQ m(CX), BX
MOVQ $0, AX
- MOVQ AX, m_moreframe(BX)
+ MOVQ AX, m_moreframesize(BX)
MOVQ $runtime·morestack(SB), AX
JMP AX
@@ -238,7 +238,7 @@ TEXT runtime·morestack01(SB),7,$0
get_tls(CX)
MOVQ m(CX), BX
SHLQ $32, AX
- MOVQ AX, m_moreframe(BX)
+ MOVQ AX, m_moreframesize(BX)
MOVQ $runtime·morestack(SB), AX
JMP AX
@@ -246,14 +246,14 @@ TEXT runtime·morestack10(SB),7,$0
get_tls(CX)
MOVQ m(CX), BX
MOVLQZX AX, AX
- MOVQ AX, m_moreframe(BX)
+ MOVQ AX, m_moreframesize(BX)
MOVQ $runtime·morestack(SB), AX
JMP AX
TEXT runtime·morestack11(SB),7,$0
get_tls(CX)
MOVQ m(CX), BX
- MOVQ AX, m_moreframe(BX)
+ MOVQ AX, m_moreframesize(BX)
MOVQ $runtime·morestack(SB), AX
JMP AX
@@ -294,7 +294,7 @@ TEXT morestack<>(SB),7,$0
MOVQ m(CX), BX
POPQ AX
SHLQ $35, AX
- MOVQ AX, m_moreframe(BX)
+ MOVQ AX, m_moreframesize(BX)
MOVQ $runtime·morestack(SB), AX
JMP AX
@@ -407,9 +407,9 @@ TEXT runtime·stackcheck(SB), 7, $0
TEXT runtime·memclr(SB),7,$0
MOVQ 8(SP), DI // arg 1 addr
- MOVL 16(SP), CX // arg 2 count
- ADDL $7, CX
- SHRL $3, CX
+ MOVQ 16(SP), CX // arg 2 count
+ ADDQ $7, CX
+ SHRQ $3, CX
MOVQ $0, AX
CLD
REP
diff --git a/src/pkg/runtime/amd64/traceback.c b/src/pkg/runtime/amd64/traceback.c
index 3ea80a661..86e96f348 100644
--- a/src/pkg/runtime/amd64/traceback.c
+++ b/src/pkg/runtime/amd64/traceback.c
@@ -60,7 +60,7 @@ gentraceback(byte *pc0, byte *sp, G *g, int32 skip, uintptr *pcbuf, int32 m)
// The 0x48 byte is only on amd64.
p = (byte*)pc;
// We check p < p+8 to avoid wrapping and faulting if we lose track.
- if(runtime·mheap.min < p && p < p+8 && p+8 < runtime·mheap.max && // pointer in allocated memory
+ if(runtime·mheap.arena_start < p && p < p+8 && p+8 < runtime·mheap.arena_used && // pointer in allocated memory
(sizeof(uintptr) != 8 || *p++ == 0x48) && // skip 0x48 byte on amd64
p[0] == 0x81 && p[1] == 0xc4 && p[6] == 0xc3) {
sp += *(uint32*)(p+2);
@@ -154,7 +154,7 @@ isclosureentry(uintptr pc)
int32 i, siz;
p = (byte*)pc;
- if(p < runtime·mheap.min || p+32 > runtime·mheap.max)
+ if(p < runtime·mheap.arena_start || p+32 > runtime·mheap.arena_used)
return 0;
// SUBQ $siz, SP