bit_fix.h revision 77298
177298Sobrien/* bit_fix.h 277298Sobrien Copyright (C) 1987, 1992, 2000 Free Software Foundation, Inc. 333965Sjdp 433965Sjdp This file is part of GAS, the GNU Assembler. 533965Sjdp 633965Sjdp GAS is free software; you can redistribute it and/or modify 733965Sjdp it under the terms of the GNU General Public License as published by 833965Sjdp the Free Software Foundation; either version 2, or (at your option) 933965Sjdp any later version. 1033965Sjdp 1133965Sjdp GAS is distributed in the hope that it will be useful, 1233965Sjdp but WITHOUT ANY WARRANTY; without even the implied warranty of 1333965Sjdp MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1433965Sjdp GNU General Public License for more details. 1533965Sjdp 1633965Sjdp You should have received a copy of the GNU General Public License 1777298Sobrien along with GAS; see the file COPYING. If not, write to the Free 1877298Sobrien Software Foundation, 59 Temple Place - Suite 330, Boston, MA 1977298Sobrien 02111-1307, USA. */ 2033965Sjdp 2133965Sjdp/* The bit_fix was implemented to support machines that need variables 2233965Sjdp to be inserted in bitfields other than 1, 2 and 4 bytes. 2333965Sjdp Furthermore it gives us a possibillity to mask in bits in the symbol 2433965Sjdp when it's fixed in the objectcode and check the symbols limits. 2533965Sjdp 2633965Sjdp The or-mask is used to set the huffman bits in displacements for the 2733965Sjdp ns32k port. 2833965Sjdp The acbi, addqi, movqi, cmpqi instruction requires an assembler that 2933965Sjdp can handle bitfields. Ie handle an expression, evaluate it and insert 3033965Sjdp the result in an some bitfield. ( ex: 5 bits in a short field of a opcode) 3133965Sjdp */ 3233965Sjdp 3333965Sjdp#ifndef __bit_fix_h__ 3433965Sjdp#define __bit_fix_h__ 3533965Sjdp 3677298Sobrienstruct bit_fix { 3777298Sobrien int fx_bit_size; /* Length of bitfield */ 3877298Sobrien int fx_bit_offset; /* Bit offset to bitfield */ 3977298Sobrien long fx_bit_base; /* Where do we apply the bitfix. 4077298Sobrien If this is zero, default is assumed. */ 4177298Sobrien long fx_bit_base_adj; /* Adjustment of base */ 4277298Sobrien long fx_bit_max; /* Signextended max for bitfield */ 4377298Sobrien long fx_bit_min; /* Signextended min for bitfield */ 4477298Sobrien long fx_bit_add; /* Or mask, used for huffman prefix */ 4577298Sobrien}; 4633965Sjdptypedef struct bit_fix bit_fixS; 4733965Sjdp 4833965Sjdp#endif /* __bit_fix_h__ */ 49