Additional parsing tests for PA gas.
[deliverable/binutils-gdb.git] / gas / subsegs.h
CommitLineData
fecd2382
RP
1/* subsegs.h -> subsegs.c
2 Copyright (C) 1987 Free Software Foundation, Inc.
a39116f1
RP
3
4 This file is part of GAS, the GNU Assembler.
5
6 GAS 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.
10
11 GAS 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.
15
16 You should have received a copy of the GNU General Public License
17 along with GAS; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
fecd2382
RP
19
20/*
21 * For every sub-segment the user mentions in the ASsembler program,
22 * we make one struct frchain. Each sub-segment has exactly one struct frchain
23 * and vice versa.
24 *
25 * Struct frchain's are forward chained (in ascending order of sub-segment
26 * code number). The chain runs through frch_next of each subsegment.
27 * This makes it hard to find a subsegment's frags
28 * if programmer uses a lot of them. Most programs only use text0 and
29 * data0, so they don't suffer. At least this way:
30 * (1) There are no "arbitrary" restrictions on how many subsegments
31 * can be programmed;
32 * (2) Subsegments' frchain-s are (later) chained together in the order in
33 * which they are emitted for object file viz text then data.
34 *
35 * From each struct frchain dangles a chain of struct frags. The frags
36 * represent code fragments, for that sub-segment, forward chained.
37 */
38
39struct frchain /* control building of a frag chain */
40{ /* FRCH = FRagment CHain control */
a39116f1
RP
41 struct frag * frch_root; /* 1st struct frag in chain, or NULL */
42 struct frag * frch_last; /* last struct frag in chain, or NULL */
43 struct frchain * frch_next; /* next in chain of struct frchain-s */
44 segT frch_seg; /* SEG_TEXT or SEG_DATA. */
45 subsegT frch_subseg; /* subsegment number of this chain */
fecd2382
RP
46};
47
48typedef struct frchain frchainS;
49
50extern frchainS * frchain_root; /* NULL means no frchains yet. */
a39116f1 51/* all subsegments' chains hang off here */
fecd2382
RP
52
53extern frchainS * frchain_now;
a39116f1
RP
54/* Frchain we are assembling into now */
55/* That is, the current segment's frag */
56/* chain, even if it contains no (complete) */
57/* frags. */
fecd2382 58
ace68c4e
SC
59
60#ifdef MANY_SEGMENTS
61typedef struct
62{
a39116f1
RP
63 frchainS *frchainP;
64 int hadone;
65 int user_stuff;
66 /* struct frag *frag_root;*/
67 /* struct frag *last_frag;*/
68 fixS *fix_root;
69 fixS *fix_tail;
70 struct internal_scnhdr scnhdr;
71 symbolS *dot;
72
73 struct lineno_list *lineno_list_head;
74 struct lineno_list *lineno_list_tail;
75
ace68c4e
SC
76} segment_info_type;
77segment_info_type segment_info[];
78#else
fecd2382 79extern frchainS * data0_frchainP;
a39116f1
RP
80/* Sentinel for frchain crawling. */
81/* Points to the 1st data-segment frchain. */
82/* (Which is pointed to by the last text- */
83/* segment frchain.) */
fecd2382 84
ace68c4e
SC
85#endif
86
8b228fe9 87/* end of subsegs.h */
This page took 0.150883 seconds and 4 git commands to generate.