]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/binutils/gas/frags.h
Initial import of GNU binutils version 2.8.1. Believe it or not,
[FreeBSD/FreeBSD.git] / contrib / binutils / gas / frags.h
1 /* frags.h - Header file for the frag concept.
2    Copyright (C) 1987, 92, 93, 94, 95, 1997 Free Software Foundation, Inc.
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 the Free
18    Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19    02111-1307, USA.  */
20
21 #ifdef ANSI_PROTOTYPES
22 struct obstack;
23 #endif
24
25 #if 0
26 /*
27  * A macro to speed up appending exactly 1 char
28  * to current frag.
29  */
30 /* JF changed < 1 to <= 1 to avoid a race conditon */
31 #define FRAG_APPEND_1_CHAR(datum)       \
32 {                                       \
33   if (obstack_room( &frags ) <= 1) {\
34     frag_wane (frag_now);       \
35     frag_new (0);               \
36   }                             \
37   obstack_1grow( &frags, datum );       \
38 }
39 #else
40 extern void frag_append_1_char PARAMS ((int));
41 #define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X)
42 #endif
43
44
45 void frag_init PARAMS ((void));
46 fragS *frag_alloc PARAMS ((struct obstack *));
47 void frag_grow PARAMS ((unsigned int nchars));
48 char *frag_more PARAMS ((int nchars));
49 void frag_align PARAMS ((int alignment, int fill_character, int max));
50 void frag_align_pattern PARAMS ((int alignment,
51                                  const char *fill_pattern,
52                                  int n_fill,
53                                  int max));
54 void frag_new PARAMS ((int old_frags_var_max_size));
55 void frag_wane PARAMS ((fragS * fragP));
56
57 char *frag_variant PARAMS ((relax_stateT type,
58                             int max_chars,
59                             int var,
60                             relax_substateT subtype,
61                             symbolS * symbol,
62                             offsetT offset,
63                             char *opcode));
64
65 char *frag_var PARAMS ((relax_stateT type,
66                         int max_chars,
67                         int var,
68                         relax_substateT subtype,
69                         symbolS * symbol,
70                         offsetT offset,
71                         char *opcode));
72
73 /* end of frags.h */