* gas/elf/elf.exp: New directory.
[binutils.git] / gas / bit_fix.h
blob6a729a700c6753046e4dafb12954b12c056e4131
1 /* write.h
3 Copyright (C) 1987, 1992 Free Software Foundation, Inc.
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 /* The bit_fix was implemented to support machines that need variables
22 to be inserted in bitfields other than 1, 2 and 4 bytes.
23 Furthermore it gives us a possibillity to mask in bits in the symbol
24 when it's fixed in the objectcode and check the symbols limits.
26 The or-mask is used to set the huffman bits in displacements for the
27 ns32k port.
28 The acbi, addqi, movqi, cmpqi instruction requires an assembler that
29 can handle bitfields. Ie handle an expression, evaluate it and insert
30 the result in an some bitfield. ( ex: 5 bits in a short field of a opcode)
33 #ifndef __bit_fix_h__
34 #define __bit_fix_h__
36 struct bit_fix
38 int fx_bit_size; /* Length of bitfield */
39 int fx_bit_offset; /* Bit offset to bitfield */
40 long fx_bit_base; /* Where do we apply the bitfix.
41 If this is zero, default is assumed. */
42 long fx_bit_base_adj; /* Adjustment of base */
43 long fx_bit_max; /* Signextended max for bitfield */
44 long fx_bit_min; /* Signextended min for bitfield */
45 long fx_bit_add; /* Or mask, used for huffman prefix */
47 typedef struct bit_fix bit_fixS;
49 #endif /* __bit_fix_h__ */
51 /* end of bit_fix.h */