| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-mabi=lp64d -O2" } */ |
| 3 |
/* { dg-final { scan-assembler-times "slli.w" 1 } } */ |
| 4 |
|
| 5 |
extern int PL_savestack_ix; |
| 6 |
extern int PL_regsize; |
| 7 |
extern int PL_savestack_max; |
| 8 |
void Perl_savestack_grow_cnt (int need); |
| 9 |
extern void Perl_croak (char *); |
| 10 |
|
| 11 |
int |
| 12 |
S_regcppush(int parenfloor) |
| 13 |
{ |
| 14 |
int retval = PL_savestack_ix; |
| 15 |
int paren_elems_to_push = (PL_regsize - parenfloor) * 4; |
| 16 |
int p; |
| 17 |
|
| 18 |
if (paren_elems_to_push < 0) |
| 19 |
Perl_croak ("panic: paren_elems_to_push < 0"); |
| 20 |
|
| 21 |
if (PL_savestack_ix + (paren_elems_to_push + 6) > PL_savestack_max) |
| 22 |
Perl_savestack_grow_cnt (paren_elems_to_push + 6); |
| 23 |
|
| 24 |
return retval; |
| 25 |
} |