diff options
| author | qmuntal <quimmuntal@gmail.com> | 2023-02-08 09:40:44 +0100 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2023-02-22 21:35:26 +0000 |
| commit | 521d2614df0cf4fa3a92bd01e1c98d77bfeac9ed (patch) | |
| tree | 946da115e94c13f893c7f417e00603197bcc26d8 /src/runtime/sys_linux_amd64.s | |
| parent | 133e0bca0be23980604ee98589ddcacdb1262afd (diff) | |
| download | go-521d2614df0cf4fa3a92bd01e1c98d77bfeac9ed.tar.xz | |
runtime: use explicit NOFRAME on linux/amd64
This CL marks some linux assembly functions as NOFRAME to avoid relying
on the implicit amd64 NOFRAME heuristic, where NOSPLIT functions
without stack were also marked as NOFRAME.
Updates #58378
Change-Id: I7792cff4f6e539bfa56c02868f2965088ca1975a
Reviewed-on: https://go-review.googlesource.com/c/go/+/466316
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_amd64.s')
| -rw-r--r-- | src/runtime/sys_linux_amd64.s | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/runtime/sys_linux_amd64.s b/src/runtime/sys_linux_amd64.s index c7a89ba536..9f18d2d7cd 100644 --- a/src/runtime/sys_linux_amd64.s +++ b/src/runtime/sys_linux_amd64.s @@ -325,16 +325,14 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-32 MOVL sig+8(FP), DI MOVQ info+16(FP), SI MOVQ ctx+24(FP), DX - PUSHQ BP - MOVQ SP, BP + MOVQ SP, BX // callee-saved ANDQ $~15, SP // alignment for x86_64 ABI CALL AX - MOVQ BP, SP - POPQ BP + MOVQ BX, SP RET // Called using C ABI. -TEXT runtime·sigtramp(SB),NOSPLIT|TOPFRAME,$0 +TEXT runtime·sigtramp(SB),NOSPLIT|TOPFRAME|NOFRAME,$0 // Transition from C ABI to Go ABI. PUSH_REGS_HOST_TO_ABI0() @@ -359,7 +357,7 @@ TEXT runtime·sigtramp(SB),NOSPLIT|TOPFRAME,$0 RET // Called using C ABI. -TEXT runtime·sigprofNonGoWrapper<>(SB),NOSPLIT,$0 +TEXT runtime·sigprofNonGoWrapper<>(SB),NOSPLIT|NOFRAME,$0 // Transition from C ABI to Go ABI. PUSH_REGS_HOST_TO_ABI0() @@ -556,7 +554,7 @@ TEXT runtime·futex(SB),NOSPLIT,$0 RET // int32 clone(int32 flags, void *stk, M *mp, G *gp, void (*fn)(void)); -TEXT runtime·clone(SB),NOSPLIT,$0 +TEXT runtime·clone(SB),NOSPLIT|NOFRAME,$0 MOVL flags+0(FP), DI MOVQ stk+8(FP), SI MOVQ $0, DX @@ -620,7 +618,7 @@ nog2: SYSCALL JMP -3(PC) // keep exiting -TEXT runtime·sigaltstack(SB),NOSPLIT,$-8 +TEXT runtime·sigaltstack(SB),NOSPLIT,$0 MOVQ new+0(FP), DI MOVQ old+8(FP), SI MOVQ $SYS_sigaltstack, AX |
