...

Text file src/runtime/preempt_amd64.s

Documentation: runtime

		 1// Code generated by mkpreempt.go; DO NOT EDIT.
		 2
		 3#include "go_asm.h"
		 4#include "textflag.h"
		 5
		 6// 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.
		 7TEXT ·asyncPreempt<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-0
		 8	PUSHQ BP
		 9	MOVQ SP, BP
		10	// Save flags before clobbering them
		11	PUSHFQ
		12	// obj doesn't understand ADD/SUB on SP, but does understand ADJSP
		13	ADJSP $368
		14	// But vet doesn't know ADJSP, so suppress vet stack checking
		15	NOP SP
		16	MOVQ AX, 0(SP)
		17	MOVQ CX, 8(SP)
		18	MOVQ DX, 16(SP)
		19	MOVQ BX, 24(SP)
		20	MOVQ SI, 32(SP)
		21	MOVQ DI, 40(SP)
		22	MOVQ R8, 48(SP)
		23	MOVQ R9, 56(SP)
		24	MOVQ R10, 64(SP)
		25	MOVQ R11, 72(SP)
		26	MOVQ R12, 80(SP)
		27	MOVQ R13, 88(SP)
		28	MOVQ R14, 96(SP)
		29	MOVQ R15, 104(SP)
		30	#ifdef GOOS_darwin
		31	CMPB internal∕cpu·X86+const_offsetX86HasAVX(SB), $0
		32	JE 2(PC)
		33	VZEROUPPER
		34	#endif
		35	MOVUPS X0, 112(SP)
		36	MOVUPS X1, 128(SP)
		37	MOVUPS X2, 144(SP)
		38	MOVUPS X3, 160(SP)
		39	MOVUPS X4, 176(SP)
		40	MOVUPS X5, 192(SP)
		41	MOVUPS X6, 208(SP)
		42	MOVUPS X7, 224(SP)
		43	MOVUPS X8, 240(SP)
		44	MOVUPS X9, 256(SP)
		45	MOVUPS X10, 272(SP)
		46	MOVUPS X11, 288(SP)
		47	MOVUPS X12, 304(SP)
		48	MOVUPS X13, 320(SP)
		49	MOVUPS X14, 336(SP)
		50	MOVUPS X15, 352(SP)
		51	CALL ·asyncPreempt2(SB)
		52	MOVUPS 352(SP), X15
		53	MOVUPS 336(SP), X14
		54	MOVUPS 320(SP), X13
		55	MOVUPS 304(SP), X12
		56	MOVUPS 288(SP), X11
		57	MOVUPS 272(SP), X10
		58	MOVUPS 256(SP), X9
		59	MOVUPS 240(SP), X8
		60	MOVUPS 224(SP), X7
		61	MOVUPS 208(SP), X6
		62	MOVUPS 192(SP), X5
		63	MOVUPS 176(SP), X4
		64	MOVUPS 160(SP), X3
		65	MOVUPS 144(SP), X2
		66	MOVUPS 128(SP), X1
		67	MOVUPS 112(SP), X0
		68	MOVQ 104(SP), R15
		69	MOVQ 96(SP), R14
		70	MOVQ 88(SP), R13
		71	MOVQ 80(SP), R12
		72	MOVQ 72(SP), R11
		73	MOVQ 64(SP), R10
		74	MOVQ 56(SP), R9
		75	MOVQ 48(SP), R8
		76	MOVQ 40(SP), DI
		77	MOVQ 32(SP), SI
		78	MOVQ 24(SP), BX
		79	MOVQ 16(SP), DX
		80	MOVQ 8(SP), CX
		81	MOVQ 0(SP), AX
		82	ADJSP $-368
		83	POPFQ
		84	POPQ BP
		85	RET

View as plain text