github.com/megatontech/mynoteforgo@v0.0.0-20200507084910-5d0c6ea6e890/源码/runtime/asm.s (about) 1 // Copyright 2014 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 #include "textflag.h" 6 7 // funcdata for functions with no local variables in frame. 8 // Define two zero-length bitmaps, because the same index is used 9 // for the local variables as for the argument frame, and assembly 10 // frames have two argument bitmaps, one without results and one with results. 11 DATA runtime·no_pointers_stackmap+0x00(SB)/4, $2 12 DATA runtime·no_pointers_stackmap+0x04(SB)/4, $0 13 GLOBL runtime·no_pointers_stackmap(SB),RODATA, $8 14 15 GLOBL runtime·mheap_(SB), NOPTR, $0 16 GLOBL runtime·memstats(SB), NOPTR, $0 17 18 // NaCl requires that these skips be verifiable machine code. 19 #ifdef GOARCH_amd64 20 #define SKIP4 BYTE $0x90; BYTE $0x90; BYTE $0x90; BYTE $0x90 21 #endif 22 #ifdef GOARCH_386 23 #define SKIP4 BYTE $0x90; BYTE $0x90; BYTE $0x90; BYTE $0x90 24 #endif 25 #ifdef GOARCH_amd64p32 26 #define SKIP4 BYTE $0x90; BYTE $0x90; BYTE $0x90; BYTE $0x90 27 #endif 28 #ifdef GOARCH_wasm 29 #define SKIP4 UNDEF; UNDEF; UNDEF; UNDEF 30 #endif 31 #ifndef SKIP4 32 #define SKIP4 WORD $0 33 #endif 34 35 #define SKIP16 SKIP4; SKIP4; SKIP4; SKIP4 36 #define SKIP64 SKIP16; SKIP16; SKIP16; SKIP16 37 38 // This function must be sizeofSkipFunction bytes. 39 TEXT runtime·skipPleaseUseCallersFrames(SB),NOSPLIT,$0-0 40 SKIP64; SKIP64; SKIP64; SKIP64 41 42 // abi0Syms is a dummy symbol that creates ABI0 wrappers for Go 43 // functions called from assembly in other packages. 44 TEXT abi0Syms<>(SB),NOSPLIT,$0-0 45 // obj assumes it can call morestack* using ABI0, but 46 // morestackc is actually defined in Go. 47 CALL ·morestackc(SB) 48 // References from syscall are automatically collected by cmd/go.