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.
11DATA runtime·no_pointers_stackmap+0x00(SB)/4, $2
12DATA runtime·no_pointers_stackmap+0x04(SB)/4, $0
13GLOBL runtime·no_pointers_stackmap(SB),RODATA, $8
14
15// NaCl requires that these skips be verifiable machine code.
16#ifdef GOARCH_amd64
17#define SKIP4 BYTE $0x90; BYTE $0x90; BYTE $0x90; BYTE $0x90
18#endif
19#ifdef GOARCH_386
20#define SKIP4 BYTE $0x90; BYTE $0x90; BYTE $0x90; BYTE $0x90
21#endif
22#ifdef GOARCH_wasm
23#define SKIP4 UNDEF; UNDEF; UNDEF; UNDEF
24#endif
25#ifndef SKIP4
26#define SKIP4 WORD $0
27#endif
28
29#define SKIP16 SKIP4; SKIP4; SKIP4; SKIP4
30#define SKIP64 SKIP16; SKIP16; SKIP16; SKIP16
31
32// This function must be sizeofSkipFunction bytes.
33TEXT runtime·skipPleaseUseCallersFrames(SB),NOSPLIT,$0-0
34	SKIP64; SKIP64; SKIP64; SKIP64
35