Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / go / analysis / passes / framepointer / testdata / src / a / asm_amd64.s
1 // Copyright 2020 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 TEXT ·bad1(SB), 0, $0
6         MOVQ    $0, BP // want `frame pointer is clobbered before saving`
7         RET
8 TEXT ·bad2(SB), 0, $0
9         MOVQ    AX, BP // want `frame pointer is clobbered before saving`
10         RET
11 TEXT ·bad3(SB), 0, $0
12         MOVQ    6(AX), BP // want `frame pointer is clobbered before saving`
13         RET
14 TEXT ·good1(SB), 0, $0
15         PUSHQ   BP
16         MOVQ    $0, BP // this is ok
17         POPQ    BP
18         RET
19 TEXT ·good2(SB), 0, $0
20         MOVQ    BP, BX
21         MOVQ    $0, BP // this is ok
22         MOVQ    BX, BP
23         RET
24 TEXT ·good3(SB), 0, $0
25         CMPQ    AX, BX
26         JEQ     skip
27         MOVQ    $0, BP // this is ok
28 skip:
29         RET
30 TEXT ·good4(SB), 0, $0
31         RET
32         MOVQ    $0, BP // this is ok
33         RET
34 TEXT ·good5(SB), 0, $8
35         MOVQ    $0, BP // this is ok
36         RET