File: Frames-stack-floor.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (87 lines) | stat: -rw-r--r-- 2,609 bytes parent folder | download | duplicates (9)
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
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \
; RUN: FileCheck %s -check-prefix=PPC32-LINUX-NOFP

; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu \
; RUN: -frame-pointer=all | FileCheck %s -check-prefix=PPC32-LINUX-FP

; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | \
; RUN: FileCheck %s -check-prefix=PPC64-NOFP

; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
; RUN: -frame-pointer=all | FileCheck %s -check-prefix=PPC64-FP

; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
; RUN: -mtriple=powerpc-ibm-aix-xcoff | FileCheck %s -check-prefix=PPC32-AIX-NOFP

; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
; RUN: -mtriple=powerpc-ibm-aix-xcoff -frame-pointer=all | FileCheck %s \
; RUN: -check-prefix=PPC32-AIX-FP

; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
; RUN: -mtriple=powerpc64-ibm-aix-xcoff | FileCheck %s -check-prefix=PPC64-NOFP

; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
; RUN: -mtriple=powerpc64-ibm-aix-xcoff -frame-pointer=all | FileCheck %s \
; RUN: -check-prefix=PPC64-FP

; - PPC64 SVR4ABI and AIX ABI:
;   288 bytes = 18*8 (FPRs) + 18*8 (GPRs, GPR13 reserved);
; - PPC32 SVR4ABI has no red zone;
; - PPC32 AIX ABI:
;   220 bytes = 18*8 (FPRs) + 19*4 (GPRs);

define i32* @in_stack_floor_32() {
        %tmp = alloca i32, i32 55
        ret i32* %tmp
}

define i32* @out_stack_floor_32() {
        %tmp = alloca i32, i32 56
        ret i32* %tmp
}

define i32* @in_stack_floor_64() {
        %tmp = alloca i32, i32 72
        ret i32* %tmp
}

define i32* @out_stack_floor_64() {
        %tmp = alloca i32, i32 73
        ret i32* %tmp
}

; PPC32-LINUX-NOFP-LABEL: in_stack_floor_32
; PPC32-LINUX-NOFP: stwu

; PPC32-LINUX-NOFP-LABEL: out_stack_floor_32
; PPC32-LINUX-NOFP: stwu

; PPC32-LINUX-FP-LABEL: in_stack_floor_32
; PPC32-LINUX-FP: stwu

; PPC32-LINUX-FP-LABEL: out_stack_floor_32
; PPC32-LINUX-FP: stwu

; PPC32-AIX-NOFP-LABEL: in_stack_floor_32
; PPC32-AIX-NOFP-NOT: stwu

; PPC32-AIX-NOFP-LABEL: out_stack_floor_32
; PPC32-AIX-NOFP:      stwu 1, -256(1)

; PPC32-AIX-FP-LABEL: in_stack_floor_32
; PPC32-AIX-FP: stwu 1, -256(1)

; PPC32-AIX-FP-LABEL: out_stack_floor_32
; PPC32-AIX-FP: stwu 1, -256(1)

; PPC64-NOFP-LABEL: in_stack_floor_64
; PPC64-NOFP:      addi 3, 1, -288

; PPC64-NOFP-LABEL: out_stack_floor_64
; PPC64-NOFP:      stdu 1, -352(1)

; PPC64-FP-LABEL: in_stack_floor_64
; PPC64-FP: stdu 1, -352(1)

; PPC64-FP-LABEL: out_stack_floor_64
; PPC64-FP: stdu 1, -352(1)