177298Sobrien/* bit_fix.h 2218822Sdim Copyright 1987, 1992, 2000, 2001, 2003 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 18218822Sdim Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 19218822Sdim 02110-1301, 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. 23130561Sobrien Furthermore it gives us a possibility 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 2989857Sobrien can handle bitfields. Ie. handle an expression, evaluate it and insert 3089857Sobrien the result in some bitfield. (eg: 5 bits in a short field of an 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