| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-require-effective-target arm_thumb2_ok } */ |
| 3 |
/* { dg-options "-mthumb -Os" } */ |
| 4 |
/* { dg-final { scan-assembler "push\t.*r8" } } */ |
| 5 |
/* { dg-final { scan-assembler-not "push\t*r3" } } */ |
| 6 |
|
| 7 |
extern int hist_verify; |
| 8 |
extern char *pre_process_line (char*); |
| 9 |
extern char* savestring1 (char*, char*, int, int); |
| 10 |
extern char* str_cpy (char*, char*); |
| 11 |
extern int str_len (char*); |
| 12 |
extern char* x_malloc (int); |
| 13 |
#define savestring(x) (char *)str_cpy (x_malloc (1 + str_len (x)), (x)) |
| 14 |
|
| 15 |
char * |
| 16 |
history_expand_line_internal (char* line) |
| 17 |
{ |
| 18 |
char *new_line; |
| 19 |
int old_verify; |
| 20 |
|
| 21 |
old_verify = hist_verify; |
| 22 |
hist_verify = 0; |
| 23 |
new_line = pre_process_line (line); |
| 24 |
hist_verify = old_verify; |
| 25 |
/* Two tail calls here, but r3 is used to pass values. */ |
| 26 |
return (new_line == line) ? savestring (line) : |
| 27 |
savestring1 (new_line, line, 0, old_verify+1); |
| 28 |
} |