.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.1.0 / go / analysis / passes / framepointer / testdata / src / a / asm_amd64.s
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.1.0/go/analysis/passes/framepointer/testdata/src/a/asm_amd64.s b/.config/coc/extensions/coc-go-data/tools/pkg/mod/golang.org/x/tools@v0.1.0/go/analysis/passes/framepointer/testdata/src/a/asm_amd64.s
new file mode 100644 (file)
index 0000000..a7d1b1c
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+TEXT ·bad1(SB), 0, $0
+       MOVQ    $0, BP // want `frame pointer is clobbered before saving`
+       RET
+TEXT ·bad2(SB), 0, $0
+       MOVQ    AX, BP // want `frame pointer is clobbered before saving`
+       RET
+TEXT ·bad3(SB), 0, $0
+       MOVQ    6(AX), BP // want `frame pointer is clobbered before saving`
+       RET
+TEXT ·good1(SB), 0, $0
+       PUSHQ   BP
+       MOVQ    $0, BP // this is ok
+       POPQ    BP
+       RET
+TEXT ·good2(SB), 0, $0
+       MOVQ    BP, BX
+       MOVQ    $0, BP // this is ok
+       MOVQ    BX, BP
+       RET
+TEXT ·good3(SB), 0, $0
+       CMPQ    AX, BX
+       JEQ     skip
+       MOVQ    $0, BP // this is ok
+skip:
+       RET
+TEXT ·good4(SB), 0, $0
+       RET
+       MOVQ    $0, BP // this is ok
+       RET
+TEXT ·good5(SB), 0, $8
+       MOVQ    $0, BP // this is ok
+       RET