5 |
|
* Based on work by Tauno Taipaleenmaki |
6 |
|
* |
7 |
|
* Copyright 1996 Bernd Schmidt |
8 |
+ |
* |
9 |
+ |
* This program is free software; you can redistribute it and/or modify |
10 |
+ |
* it under the terms of the GNU General Public License as published by |
11 |
+ |
* the Free Software Foundation; either version 2 of the License, or |
12 |
+ |
* (at your option) any later version. |
13 |
+ |
* |
14 |
+ |
* This program is distributed in the hope that it will be useful, |
15 |
+ |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 |
+ |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 |
+ |
* GNU General Public License for more details. |
18 |
+ |
* |
19 |
+ |
* You should have received a copy of the GNU General Public License |
20 |
+ |
* along with this program; if not, write to the Free Software |
21 |
+ |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
|
*/ |
23 |
|
|
24 |
|
#include <ctype.h> |
41 |
|
static void oops(void) |
42 |
|
{ |
43 |
|
fprintf(stderr, "Don't know how to optimize this file.\n"); |
44 |
< |
abort(); |
44 |
> |
exit(1); |
45 |
|
} |
46 |
|
|
47 |
|
static char * match(struct line *l, const char *m) |
60 |
|
{ |
61 |
|
if (reg[0] != 'e') { |
62 |
|
fprintf(stderr, "Unknown register?!?\n"); |
63 |
< |
abort(); |
63 |
> |
exit(1); |
64 |
|
} |
65 |
|
if (strstr (l->data, reg) != 0) |
66 |
|
return 1; |
135 |
|
l3 = l3->prev; |
136 |
|
} |
137 |
|
if (l3 == l2) |
138 |
< |
abort(); |
138 |
> |
exit(1); |
139 |
|
for (l4 = l2; l4 != l3; l4 = l4->prev) { |
140 |
|
/* The register may not be referenced by any of the insns that we |
141 |
|
* move the popl past */ |