File: naked-fn-with-frame-pointer.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (87 lines) | stat: -rw-r--r-- 2,884 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple powerpc | FileCheck %s -check-prefixes=CHECK-32-BE
; RUN: llc < %s -mtriple powerpcle | FileCheck %s -check-prefixes=CHECK-32-LE
; RUN: llc < %s -mtriple powerpc64 | FileCheck %s -check-prefixes=CHECK-64-BE
; RUN: llc < %s -mtriple powerpc64le | FileCheck %s -check-prefixes=CHECK-64-LE

declare dso_local void @main()

define dso_local void @naked() naked "frame-pointer"="all" {
; CHECK-32-BE-LABEL: naked:
; CHECK-32-BE:       # %bb.0:
; CHECK-32-BE-NEXT:    bl main
;
; CHECK-32-LE-LABEL: naked:
; CHECK-32-LE:       # %bb.0:
; CHECK-32-LE-NEXT:    bl main
;
; CHECK-64-BE-LABEL: naked:
; CHECK-64-BE:       # %bb.0:
; CHECK-64-BE-NEXT:    bl main
; CHECK-64-BE-NEXT:    nop
;
; CHECK-64-LE-LABEL: naked:
; CHECK-64-LE:       # %bb.0:
; CHECK-64-LE-NEXT:    bl main
; CHECK-64-LE-NEXT:    nop
  call void @main()
  unreachable
}

define dso_local void @normal() "frame-pointer"="all" {
; CHECK-32-BE-LABEL: normal:
; CHECK-32-BE:       # %bb.0:
; CHECK-32-BE-NEXT:    mflr 0
; CHECK-32-BE-NEXT:    stwu 1, -16(1)
; CHECK-32-BE-NEXT:    stw 31, 12(1)
; CHECK-32-BE-NEXT:    stw 0, 20(1)
; CHECK-32-BE-NEXT:    .cfi_def_cfa_offset 16
; CHECK-32-BE-NEXT:    .cfi_offset r31, -4
; CHECK-32-BE-NEXT:    .cfi_offset lr, 4
; CHECK-32-BE-NEXT:    mr 31, 1
; CHECK-32-BE-NEXT:    .cfi_def_cfa_register r31
; CHECK-32-BE-NEXT:    bl main
;
; CHECK-32-LE-LABEL: normal:
; CHECK-32-LE:       # %bb.0:
; CHECK-32-LE-NEXT:    mflr 0
; CHECK-32-LE-NEXT:    stwu 1, -16(1)
; CHECK-32-LE-NEXT:    stw 31, 12(1)
; CHECK-32-LE-NEXT:    stw 0, 20(1)
; CHECK-32-LE-NEXT:    .cfi_def_cfa_offset 16
; CHECK-32-LE-NEXT:    .cfi_offset r31, -4
; CHECK-32-LE-NEXT:    .cfi_offset lr, 4
; CHECK-32-LE-NEXT:    mr 31, 1
; CHECK-32-LE-NEXT:    .cfi_def_cfa_register r31
; CHECK-32-LE-NEXT:    bl main
;
; CHECK-64-BE-LABEL: normal:
; CHECK-64-BE:       # %bb.0:
; CHECK-64-BE-NEXT:    mflr 0
; CHECK-64-BE-NEXT:    std 31, -8(1)
; CHECK-64-BE-NEXT:    stdu 1, -128(1)
; CHECK-64-BE-NEXT:    std 0, 144(1)
; CHECK-64-BE-NEXT:    .cfi_def_cfa_offset 128
; CHECK-64-BE-NEXT:    .cfi_offset r31, -8
; CHECK-64-BE-NEXT:    .cfi_offset lr, 16
; CHECK-64-BE-NEXT:    mr 31, 1
; CHECK-64-BE-NEXT:    .cfi_def_cfa_register r31
; CHECK-64-BE-NEXT:    bl main
; CHECK-64-BE-NEXT:    nop
;
; CHECK-64-LE-LABEL: normal:
; CHECK-64-LE:       # %bb.0:
; CHECK-64-LE-NEXT:    mflr 0
; CHECK-64-LE-NEXT:    std 31, -8(1)
; CHECK-64-LE-NEXT:    stdu 1, -48(1)
; CHECK-64-LE-NEXT:    std 0, 64(1)
; CHECK-64-LE-NEXT:    .cfi_def_cfa_offset 48
; CHECK-64-LE-NEXT:    .cfi_offset r31, -8
; CHECK-64-LE-NEXT:    .cfi_offset lr, 16
; CHECK-64-LE-NEXT:    mr 31, 1
; CHECK-64-LE-NEXT:    .cfi_def_cfa_register r31
; CHECK-64-LE-NEXT:    bl main
; CHECK-64-LE-NEXT:    nop
  call void @main()
  unreachable
}