(all output patterns): Use new capabilities of arm_print_operand to
[official-gcc.git] / gcc / bi-reverse.c
blob04d669ed8e30c78cdc6a81999fee75db27bf43b5
1 /* Reverse order of definitions obtained from bytecode definition file.
2 Copyright (C) 1993 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 #include "hconfig.h"
22 #include "bi-defs.h"
24 void
25 reverse()
27 struct def *dp, *d, *dn;
28 struct variation *vp, *v, *vn;
30 dp = defs;
31 if (dp)
33 vp = dp->variations;
34 if (vp)
36 for (v = vp->next, vp->next = 0; v; vp = v, v = vn)
38 vn = v->next;
39 v->next = vp;
41 dp->variations = vp;
43 for (d = dp->next, dp->next = 0; d; dp = d, d = dn)
45 vp = d->variations;
46 if (vp)
48 for (v = vp->next, vp->next = 0; v; vp = v, v = vn)
50 vn = v->next;
51 v->next = vp;
53 d->variations = vp;
55 dn = d->next;
56 d->next = dp;
58 defs = dp;