66; When using FP, for large or small frames, we may need one scratch register.
77
88; FP + small frame: spill FP+SR = entsp 2
9- ; CHECKFP-LABEL: f1
9+ ; CHECKFP-LABEL: f1:
1010; CHECKFP: entsp 2
1111; CHECKFP-NEXT: stw r10, sp[1]
1212; CHECKFP-NEXT: ldaw r10, sp[0]
1515; CHECKFP-NEXT: retsp 2
1616;
1717; !FP + small frame: no spills = no stack adjustment needed
18- ; CHECK-LABEL: f1
18+ ; CHECK-LABEL: f1:
1919; CHECK: stw lr, sp[0]
2020; CHECK: ldw lr, sp[0]
2121; CHECK-NEXT: retsp 0
2727
2828
2929; FP + small frame: spill FP+SR+R0+LR = entsp 3 + extsp 1
30- ; CHECKFP-LABEL:f3
30+ ; CHECKFP-LABEL: f3:
3131; CHECKFP: entsp 3
3232; CHECKFP-NEXT: stw r10, sp[1]
3333; CHECKFP-NEXT: ldaw r10, sp[0]
4343; CHECKFP-NEXT: retsp 3
4444;
4545; !FP + small frame: spill R0+LR = entsp 2
46- ; CHECK-LABEL: f3
46+ ; CHECK-LABEL: f3:
4747; CHECK: entsp 2
4848; CHECK-NEXT: stw [[REG:r[4-9]+]], sp[1]
4949; CHECK-NEXT: mov [[REG]], r0
6060
6161
6262; FP + large frame: spill FP+SR = entsp 2 + 100000
63- ; CHECKFP-LABEL: f4
63+ ; CHECKFP-LABEL: f4:
6464; CHECKFP: entsp 65535
6565; CHECKFP-NEXT: .Lcfi{{[0-9]+}}
6666; CHECKFP-NEXT: .cfi_def_cfa_offset 262140
8181; CHECKFP-NEXT: retsp 34467
8282;
8383; !FP + large frame: spill SR+SR = entsp 2 + 100000
84- ; CHECK-LABEL: f4
84+ ; CHECK-LABEL: f4:
8585; CHECK: entsp 65535
8686; CHECK-NEXT: .Lcfi{{[0-9]+}}
8787; CHECK-NEXT: .cfi_def_cfa_offset 262140
@@ -107,7 +107,7 @@ entry:
107107; CHECKFP-NEXT: .LCPI[[CNST1:[0-9_]+]]:
108108; CHECKFP-NEXT: .long 200001
109109; CHECKFP-NEXT: .text
110- ; CHECKFP-LABEL: f6
110+ ; CHECKFP-LABEL: f6:
111111; CHECKFP: entsp 65535
112112; CHECKFP-NEXT: .Lcfi{{[0-9]+}}
113113; CHECKFP-NEXT: .cfi_def_cfa_offset 262140
@@ -160,7 +160,7 @@ entry:
160160; CHECK-NEXT: .LCPI[[CNST1:[0-9_]+]]:
161161; CHECK-NEXT: .long 200002
162162; CHECK-NEXT: .text
163- ; CHECK-LABEL: f6
163+ ; CHECK-LABEL: f6:
164164; CHECK: entsp 65535
165165; CHECK-NEXT: .Lcfi{{[0-9]+}}
166166; CHECK-NEXT: .cfi_def_cfa_offset 262140
@@ -207,7 +207,7 @@ entry:
207207}
208208
209209; FP + large frame: spill FP+SR+LR = entsp 2 + 256 + extsp 1
210- ; CHECKFP-LABEL:f8
210+ ; CHECKFP-LABEL: f8:
211211; CHECKFP: entsp 258
212212; CHECKFP-NEXT: stw r10, sp[1]
213213; CHECKFP-NEXT: ldaw r10, sp[0]
@@ -221,7 +221,7 @@ entry:
221221; CHECKFP-NEXT: retsp 258
222222;
223223; !FP + large frame: spill SR+SR+LR = entsp 3 + 256
224- ; CHECK-LABEL:f8
224+ ; CHECK-LABEL: f8:
225225; CHECK: entsp 257
226226; CHECK-NEXT: ldaw r0, sp[254]
227227; CHECK-NEXT: bl f5
@@ -235,7 +235,7 @@ entry:
235235}
236236
237237; FP + large frame: spill FP+SR+LR = entsp 2 + 32768 + extsp 1
238- ; CHECKFP-LABEL:f9
238+ ; CHECKFP-LABEL: f9:
239239; CHECKFP: entsp 32770
240240; CHECKFP-NEXT: stw r10, sp[1]
241241; CHECKFP-NEXT: ldaw r10, sp[0]
@@ -249,7 +249,7 @@ entry:
249249; CHECKFP-NEXT: retsp 32770
250250;
251251; !FP + large frame: spill SR+SR+LR = entsp 3 + 32768
252- ; CHECK-LABEL:f9
252+ ; CHECK-LABEL: f9:
253253; CHECK: entsp 32771
254254; CHECK-NEXT: ldaw r0, sp[32768]
255255; CHECK-NEXT: bl f5
0 commit comments