1 /* { dg-add-options stack_size } */
3 /* Test for a reload bug:
4 if you have a memory reference using the indexed addressing
5 mode, and the base address is a pseudo containing an address in the frame
6 and this pseudo fails to get a hard register, we end up with a double PLUS,
7 so the frame address gets reloaded. Now, when the index got a hard register,
8 and it dies in this insn, push_reload will consider that hard register as
9 a reload register, and disregrad overlaps with rld[n_reloads].in . That is
10 fine as long as the add can be done with a single insn, but when the
11 constant is so large that it has to be reloaded into a register first,
12 that clobbers the index. */
17 /* We need to be careful that we don't blow our stack. Function f, in the
18 worst case, needs to fit on the stack:
20 * 40 int[CHUNK] arrays;
22 * ~40 pointers for stdarg passing.
24 Subtract the last two off STACK_SIZE and figure out what the maximum
25 chunk size can be. We make the last bit conservative to account for
26 register saves and other processor-dependent saving. Limit the
27 chunk size to some sane values. */
29 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
30 #define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
33 MIN (500, (MAX (1, (signed)(STACK_SIZE-40*sizeof(int)-256*sizeof(void *)) \
34 / (signed)(40*sizeof(int)))))
49 l a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
, a8
, a9
;
50 l a10
, a11
, a12
, a13
, a14
, a15
, a16
, a17
, a18
, a19
;
51 l a20
, a21
, a22
, a23
, a24
, a25
, a26
, a27
, a28
, a29
;
52 l a30
, a31
, a32
, a33
, a34
, a35
, a36
, a37
, a38
, a39
;
53 int i0
, i1
, i2
, i3
, i4
, i5
, i6
, i7
, i8
, i9
;
54 int i10
, i11
, i12
, i13
, i14
, i15
, i16
, i17
, i18
, i19
;
55 int i20
, i21
, i22
, i23
, i24
, i25
, i26
, i27
, i28
, i29
;
56 int i30
, i31
, i32
, i33
, i34
, i35
, i36
, i37
, i38
, i39
;
58 for (i
= 0; i
< n
; i
++)
60 s (40, a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
, a8
, a9
,
61 a10
, a11
, a12
, a13
, a14
, a15
, a16
, a17
, a18
, a19
,
62 a20
, a21
, a22
, a23
, a24
, a25
, a26
, a27
, a28
, a29
,
63 a30
, a31
, a32
, a33
, a34
, a35
, a36
, a37
, a38
, a39
);
104 z (40, a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
, a8
, a9
,
105 a10
, a11
, a12
, a13
, a14
, a15
, a16
, a17
, a18
, a19
,
106 a20
, a21
, a22
, a23
, a24
, a25
, a26
, a27
, a28
, a29
,
107 a30
, a31
, a32
, a33
, a34
, a35
, a36
, a37
, a38
, a39
);
148 c (40, a0
, a1
, a2
, a3
, a4
, a5
, a6
, a7
, a8
, a9
,
149 a10
, a11
, a12
, a13
, a14
, a15
, a16
, a17
, a18
, a19
,
150 a20
, a21
, a22
, a23
, a24
, a25
, a26
, a27
, a28
, a29
,
151 a30
, a31
, a32
, a33
, a34
, a35
, a36
, a37
, a38
, a39
);
158 /* CHUNK needs to be at least 40 to avoid stack corruption,
159 since index variable i0 in "a[i0] = i0" equals 39. */
174 int *a
= va_arg (list
, int *);
187 int *a
= va_arg (list
, int *);
188 __builtin_memset (a
, 0, sizeof (l
));
200 int *a
= va_arg (list
, int *);