Back to index

cell-binutils  2.17cvs20070401
bit_fix.h
Go to the documentation of this file.
00001 /* bit_fix.h
00002    Copyright 1987, 1992, 2000, 2001, 2003 Free Software Foundation, Inc.
00003 
00004    This file is part of GAS, the GNU Assembler.
00005 
00006    GAS is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 2, or (at your option)
00009    any later version.
00010 
00011    GAS is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with GAS; see the file COPYING.  If not, write to the Free
00018    Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
00019    02110-1301, USA.  */
00020 
00021 /* The bit_fix was implemented to support machines that need variables
00022    to be inserted in bitfields other than 1, 2 and 4 bytes.
00023    Furthermore it gives us a possibility to mask in bits in the symbol
00024    when it's fixed in the objectcode and check the symbols limits.
00025 
00026    The or-mask is used to set the huffman bits in displacements for the
00027    ns32k port.
00028    The acbi, addqi, movqi, cmpqi instruction requires an assembler that
00029    can handle bitfields.  Ie. handle an expression, evaluate it and insert
00030    the result in some bitfield.  (eg: 5 bits in a short field of an opcode)
00031    */
00032 
00033 #ifndef __bit_fix_h__
00034 #define __bit_fix_h__
00035 
00036 struct bit_fix {
00037   int fx_bit_size;          /* Length of bitfield */
00038   int fx_bit_offset;        /* Bit offset to bitfield */
00039   long fx_bit_base;         /* Where do we apply the bitfix.
00040                                If this is zero, default is assumed.  */
00041   long fx_bit_base_adj;            /* Adjustment of base */
00042   long fx_bit_max;          /* Signextended max for bitfield */
00043   long fx_bit_min;          /* Signextended min for bitfield */
00044   long fx_bit_add;          /* Or mask, used for huffman prefix */
00045 };
00046 typedef struct bit_fix bit_fixS;
00047 
00048 #endif /* __bit_fix_h__ */