summaryrefslogtreecommitdiffstats
path: root/src/runtime/preempt_386.s
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 13:14:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 13:14:23 +0000
commit73df946d56c74384511a194dd01dbe099584fd1a (patch)
treefd0bcea490dd81327ddfbb31e215439672c9a068 /src/runtime/preempt_386.s
parentInitial commit. (diff)
downloadgolang-1.16-73df946d56c74384511a194dd01dbe099584fd1a.tar.xz
golang-1.16-73df946d56c74384511a194dd01dbe099584fd1a.zip
Adding upstream version 1.16.10.upstream/1.16.10upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/runtime/preempt_386.s')
-rw-r--r--src/runtime/preempt_386.s50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/runtime/preempt_386.s b/src/runtime/preempt_386.s
new file mode 100644
index 0000000..a803b24
--- /dev/null
+++ b/src/runtime/preempt_386.s
@@ -0,0 +1,50 @@
+// Code generated by mkpreempt.go; DO NOT EDIT.
+
+#include "go_asm.h"
+#include "textflag.h"
+
+// Note: asyncPreempt doesn't use the internal ABI, but we must be able to inject calls to it from the signal handler, so Go code has to see the PC of this function literally.
+TEXT ·asyncPreempt<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-0
+ PUSHFL
+ ADJSP $156
+ NOP SP
+ MOVL AX, 0(SP)
+ MOVL CX, 4(SP)
+ MOVL DX, 8(SP)
+ MOVL BX, 12(SP)
+ MOVL BP, 16(SP)
+ MOVL SI, 20(SP)
+ MOVL DI, 24(SP)
+ CMPB internal∕cpu·X86+const_offsetX86HasSSE2(SB), $1
+ JNE nosse
+ MOVUPS X0, 28(SP)
+ MOVUPS X1, 44(SP)
+ MOVUPS X2, 60(SP)
+ MOVUPS X3, 76(SP)
+ MOVUPS X4, 92(SP)
+ MOVUPS X5, 108(SP)
+ MOVUPS X6, 124(SP)
+ MOVUPS X7, 140(SP)
+nosse:
+ CALL ·asyncPreempt2(SB)
+ CMPB internal∕cpu·X86+const_offsetX86HasSSE2(SB), $1
+ JNE nosse2
+ MOVUPS 140(SP), X7
+ MOVUPS 124(SP), X6
+ MOVUPS 108(SP), X5
+ MOVUPS 92(SP), X4
+ MOVUPS 76(SP), X3
+ MOVUPS 60(SP), X2
+ MOVUPS 44(SP), X1
+ MOVUPS 28(SP), X0
+nosse2:
+ MOVL 24(SP), DI
+ MOVL 20(SP), SI
+ MOVL 16(SP), BP
+ MOVL 12(SP), BX
+ MOVL 8(SP), DX
+ MOVL 4(SP), CX
+ MOVL 0(SP), AX
+ ADJSP $-156
+ POPFL
+ RET