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