diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2021-03-15 21:48:58 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2021-03-19 17:08:02 +0000 |
| commit | 836dbdb15b766696eadd141ea2430f3549c58ec5 (patch) | |
| tree | af80cbf4fd4a46344124ed74818ca6a67b976054 /src/runtime/sys_windows_amd64.s | |
| parent | 4deaa6a178d89631302470f78574c1e957cf84a5 (diff) | |
| download | go-836dbdb15b766696eadd141ea2430f3549c58ec5.tar.xz | |
runtime: mark Windows' address-taken asm routines as ABIInternal
In the runtime there are Windows-specific assembly routines that are
address-taken via funcPC and are not intended to be called through a
wrapper. Mark them as ABIInternal so that we don't grab the wrapper,
because that will break in all sorts of contexts.
For #40724.
For #44065.
Change-Id: I12a728786786f423e5b229f8622e4a80ec27a31c
Reviewed-on: https://go-review.googlesource.com/c/go/+/302109
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/sys_windows_amd64.s')
| -rw-r--r-- | src/runtime/sys_windows_amd64.s | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/runtime/sys_windows_amd64.s b/src/runtime/sys_windows_amd64.s index a7c519ae19..574def1038 100644 --- a/src/runtime/sys_windows_amd64.s +++ b/src/runtime/sys_windows_amd64.s @@ -11,7 +11,7 @@ #define maxargs 16 // void runtime·asmstdcall(void *c); -TEXT runtime·asmstdcall(SB),NOSPLIT|NOFRAME,$0 +TEXT runtime·asmstdcall<ABIInternal>(SB),NOSPLIT|NOFRAME,$0 // asmcgocall will put first argument into CX. PUSHQ CX // save for later MOVQ libcall_fn(CX), AX @@ -190,32 +190,32 @@ done: RET -TEXT runtime·exceptiontramp(SB),NOSPLIT|NOFRAME,$0 +TEXT runtime·exceptiontramp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0 MOVQ $runtime·exceptionhandler(SB), AX JMP sigtramp<>(SB) -TEXT runtime·firstcontinuetramp(SB),NOSPLIT|NOFRAME,$0-0 +TEXT runtime·firstcontinuetramp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-0 MOVQ $runtime·firstcontinuehandler(SB), AX JMP sigtramp<>(SB) -TEXT runtime·lastcontinuetramp(SB),NOSPLIT|NOFRAME,$0-0 +TEXT runtime·lastcontinuetramp<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-0 MOVQ $runtime·lastcontinuehandler(SB), AX JMP sigtramp<>(SB) -TEXT runtime·ctrlhandler(SB),NOSPLIT|NOFRAME,$8 +TEXT runtime·ctrlhandler<ABIInternal>(SB),NOSPLIT|NOFRAME,$8 MOVQ CX, 16(SP) // spill MOVQ $runtime·ctrlhandler1(SB), CX MOVQ CX, 0(SP) - CALL runtime·externalthreadhandler(SB) + CALL runtime·externalthreadhandler<ABIInternal>(SB) RET -TEXT runtime·profileloop(SB),NOSPLIT|NOFRAME,$8 +TEXT runtime·profileloop<ABIInternal>(SB),NOSPLIT|NOFRAME,$8 MOVQ $runtime·profileloop1(SB), CX MOVQ CX, 0(SP) - CALL runtime·externalthreadhandler(SB) + CALL runtime·externalthreadhandler<ABIInternal>(SB) RET -TEXT runtime·externalthreadhandler(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 +TEXT runtime·externalthreadhandler<ABIInternal>(SB),NOSPLIT|NOFRAME|TOPFRAME,$0 PUSHQ BP MOVQ SP, BP PUSHQ BX @@ -287,7 +287,7 @@ TEXT runtime·callbackasm1(SB),NOSPLIT,$0 ADDQ $8, SP // determine index into runtime·cbs table - MOVQ $runtime·callbackasm(SB), DX + MOVQ $runtime·callbackasm<ABIInternal>(SB), DX SUBQ DX, AX MOVQ $0, DX MOVQ $5, CX // divide by 5 because each call instruction in runtime·callbacks is 5 bytes long @@ -343,7 +343,7 @@ TEXT runtime·callbackasm1(SB),NOSPLIT,$0 RET // uint32 tstart_stdcall(M *newm); -TEXT runtime·tstart_stdcall(SB),NOSPLIT,$0 +TEXT runtime·tstart_stdcall<ABIInternal>(SB),NOSPLIT,$0 // CX contains first arg newm MOVQ m_g0(CX), DX // g |
