aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/sys_darwin_386.s6
-rw-r--r--src/runtime/sys_darwin_amd64.s19
-rw-r--r--src/runtime/sys_dragonfly_amd64.s11
-rw-r--r--src/runtime/sys_freebsd_386.s18
-rw-r--r--src/runtime/sys_freebsd_amd64.s11
-rw-r--r--src/runtime/sys_linux_386.s18
-rw-r--r--src/runtime/sys_linux_amd64.s11
-rw-r--r--src/runtime/sys_netbsd_386.s18
-rw-r--r--src/runtime/sys_netbsd_amd64.s11
-rw-r--r--src/runtime/sys_openbsd_386.s18
-rw-r--r--src/runtime/sys_openbsd_amd64.s11
-rw-r--r--src/runtime/sys_solaris_amd64.s11
12 files changed, 109 insertions, 54 deletions
diff --git a/src/runtime/sys_darwin_386.s b/src/runtime/sys_darwin_386.s
index 45658d0ae6..200961f225 100644
--- a/src/runtime/sys_darwin_386.s
+++ b/src/runtime/sys_darwin_386.s
@@ -254,12 +254,12 @@ TEXT runtime·sigfwd(SB),NOSPLIT,$0-16
MOVL info+8(FP), CX
MOVL ctx+12(FP), DX
MOVL SP, SI
- SUBL $32, SP // align stack; handler might be C code
- ANDL $~15, SP
+ SUBL $32, SP
+ ANDL $~15, SP // align stack: handler might be a C function
MOVL BX, 0(SP)
MOVL CX, 4(SP)
MOVL DX, 8(SP)
- MOVL SI, 12(SP)
+ MOVL SI, 12(SP) // save SI: handler might be a Go function
CALL AX
MOVL 12(SP), AX
MOVL AX, SP
diff --git a/src/runtime/sys_darwin_amd64.s b/src/runtime/sys_darwin_amd64.s
index a15ac3e158..96fa5b9710 100644
--- a/src/runtime/sys_darwin_amd64.s
+++ b/src/runtime/sys_darwin_amd64.s
@@ -219,15 +219,16 @@ TEXT runtime·sigaction(SB),NOSPLIT,$0-24
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVQ fn+0(FP), AX
- MOVL sig+8(FP), DI
- MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ SP, BP
- SUBQ $64, SP
- ANDQ $~15, SP // alignment for x86_64 ABI
- CALL AX
- MOVQ BP, SP
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
+ MOVQ info+16(FP), SI
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
+ CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$32
diff --git a/src/runtime/sys_dragonfly_amd64.s b/src/runtime/sys_dragonfly_amd64.s
index fd960e608a..88c7f9dd8a 100644
--- a/src/runtime/sys_dragonfly_amd64.s
+++ b/src/runtime/sys_dragonfly_amd64.s
@@ -188,11 +188,16 @@ TEXT runtime·sigaction(SB),NOSPLIT,$-8
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVL sig+8(FP), DI
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ fn+0(FP), AX
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$24
diff --git a/src/runtime/sys_freebsd_386.s b/src/runtime/sys_freebsd_386.s
index 7f3cd56cad..8b6ee1f2a6 100644
--- a/src/runtime/sys_freebsd_386.s
+++ b/src/runtime/sys_freebsd_386.s
@@ -208,14 +208,20 @@ TEXT runtime·sigaction(SB),NOSPLIT,$-4
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$12-16
- MOVL sig+4(FP), AX
- MOVL AX, 0(SP)
- MOVL info+8(FP), AX
- MOVL AX, 4(SP)
- MOVL ctx+12(FP), AX
- MOVL AX, 8(SP)
MOVL fn+0(FP), AX
+ MOVL sig+4(FP), BX
+ MOVL info+8(FP), CX
+ MOVL ctx+12(FP), DX
+ MOVL SP, SI
+ SUBL $32, SP
+ ANDL $~15, SP // align stack: handler might be a C function
+ MOVL BX, 0(SP)
+ MOVL CX, 4(SP)
+ MOVL DX, 8(SP)
+ MOVL SI, 12(SP) // save SI: handler might be a Go function
CALL AX
+ MOVL 12(SP), AX
+ MOVL AX, SP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$12
diff --git a/src/runtime/sys_freebsd_amd64.s b/src/runtime/sys_freebsd_amd64.s
index 118febde47..19007dc401 100644
--- a/src/runtime/sys_freebsd_amd64.s
+++ b/src/runtime/sys_freebsd_amd64.s
@@ -184,11 +184,16 @@ TEXT runtime·sigaction(SB),NOSPLIT,$-8
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVL sig+8(FP), DI
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ fn+0(FP), AX
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$24
diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s
index 86ca06fd2c..1d798c741e 100644
--- a/src/runtime/sys_linux_386.s
+++ b/src/runtime/sys_linux_386.s
@@ -212,14 +212,20 @@ TEXT runtime·rt_sigaction(SB),NOSPLIT,$0
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$12-16
- MOVL sig+4(FP), AX
- MOVL AX, 0(SP)
- MOVL info+8(FP), AX
- MOVL AX, 4(SP)
- MOVL ctx+12(FP), AX
- MOVL AX, 8(SP)
MOVL fn+0(FP), AX
+ MOVL sig+4(FP), BX
+ MOVL info+8(FP), CX
+ MOVL ctx+12(FP), DX
+ MOVL SP, SI
+ SUBL $32, SP
+ ANDL $-15, SP // align stack: handler might be a C function
+ MOVL BX, 0(SP)
+ MOVL CX, 4(SP)
+ MOVL DX, 8(SP)
+ MOVL SI, 12(SP) // save SI: handler might be a Go function
CALL AX
+ MOVL 12(SP), AX
+ MOVL AX, SP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$12
diff --git a/src/runtime/sys_linux_amd64.s b/src/runtime/sys_linux_amd64.s
index ee7b0ffb37..7f88e1db23 100644
--- a/src/runtime/sys_linux_amd64.s
+++ b/src/runtime/sys_linux_amd64.s
@@ -219,11 +219,16 @@ TEXT runtime·rt_sigaction(SB),NOSPLIT,$0-36
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVL sig+8(FP), DI
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ fn+0(FP), AX
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$24
diff --git a/src/runtime/sys_netbsd_386.s b/src/runtime/sys_netbsd_386.s
index a276001fe1..50d35e5b5c 100644
--- a/src/runtime/sys_netbsd_386.s
+++ b/src/runtime/sys_netbsd_386.s
@@ -216,14 +216,20 @@ TEXT runtime·sigaction(SB),NOSPLIT,$24
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$12-16
- MOVL sig+4(FP), AX
- MOVL AX, 0(SP)
- MOVL info+8(FP), AX
- MOVL AX, 4(SP)
- MOVL ctx+12(FP), AX
- MOVL AX, 8(SP)
MOVL fn+0(FP), AX
+ MOVL sig+4(FP), BX
+ MOVL info+8(FP), CX
+ MOVL ctx+12(FP), DX
+ MOVL SP, SI
+ SUBL $32, SP
+ ANDL $-15, SP // align stack: handler might be a C function
+ MOVL BX, 0(SP)
+ MOVL CX, 4(SP)
+ MOVL DX, 8(SP)
+ MOVL SI, 12(SP) // save SI: handler might be a Go function
CALL AX
+ MOVL 12(SP), AX
+ MOVL AX, SP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$12
diff --git a/src/runtime/sys_netbsd_amd64.s b/src/runtime/sys_netbsd_amd64.s
index e0dd85f2aa..2c50adb123 100644
--- a/src/runtime/sys_netbsd_amd64.s
+++ b/src/runtime/sys_netbsd_amd64.s
@@ -238,11 +238,16 @@ TEXT runtime·sigaction(SB),NOSPLIT,$-8
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVL sig+8(FP), DI
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ fn+0(FP), AX
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$32
diff --git a/src/runtime/sys_openbsd_386.s b/src/runtime/sys_openbsd_386.s
index 9357d346d1..e969395088 100644
--- a/src/runtime/sys_openbsd_386.s
+++ b/src/runtime/sys_openbsd_386.s
@@ -196,14 +196,20 @@ TEXT runtime·obsdsigprocmask(SB),NOSPLIT,$-4
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$12-16
- MOVL sig+4(FP), AX
- MOVL AX, 0(SP)
- MOVL info+8(FP), AX
- MOVL AX, 4(SP)
- MOVL ctx+12(FP), AX
- MOVL AX, 8(SP)
MOVL fn+0(FP), AX
+ MOVL sig+4(FP), BX
+ MOVL info+8(FP), CX
+ MOVL ctx+12(FP), DX
+ MOVL SP, SI
+ SUBL $32, SP
+ ANDL $~15, SP // align stack: handler might be a C function
+ MOVL BX, 0(SP)
+ MOVL CX, 4(SP)
+ MOVL DX, 8(SP)
+ MOVL SI, 12(SP) // save SI: handler might be a Go function
CALL AX
+ MOVL 12(SP), AX
+ MOVL AX, SP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$12
diff --git a/src/runtime/sys_openbsd_amd64.s b/src/runtime/sys_openbsd_amd64.s
index e22a2faeeb..01d6bd8e85 100644
--- a/src/runtime/sys_openbsd_amd64.s
+++ b/src/runtime/sys_openbsd_amd64.s
@@ -229,11 +229,16 @@ TEXT runtime·obsdsigprocmask(SB),NOSPLIT,$0
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVL sig+8(FP), DI
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ fn+0(FP), AX
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
TEXT runtime·sigtramp(SB),NOSPLIT,$24
diff --git a/src/runtime/sys_solaris_amd64.s b/src/runtime/sys_solaris_amd64.s
index a36bd37ff0..c542db3986 100644
--- a/src/runtime/sys_solaris_amd64.s
+++ b/src/runtime/sys_solaris_amd64.s
@@ -290,11 +290,16 @@ exit:
RET
TEXT runtime·sigfwd(SB),NOSPLIT,$0-32
- MOVL sig+8(FP), DI
+ MOVQ fn+0(FP), AX
+ MOVL sig+8(FP), DI
MOVQ info+16(FP), SI
- MOVQ ctx+24(FP), DX
- MOVQ fn+0(FP), AX
+ MOVQ ctx+24(FP), DX
+ PUSHQ BP
+ MOVQ SP, BP
+ ANDQ $~15, SP // alignment for x86_64 ABI
CALL AX
+ MOVQ BP, SP
+ POPQ BP
RET
// Called from runtime·usleep (Go). Can be called on Go stack, on OS stack,