Commit | Line | Data |
---|---|---|
a01b9fa4 | 1 | /* bit_fix.h |
2571583a | 2 | Copyright (C) 1987-2017 Free Software Foundation, Inc. |
252b5132 RH |
3 | |
4 | This file is part of GAS, the GNU Assembler. | |
5 | ||
6 | GAS is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
ec2655a6 | 8 | the Free Software Foundation; either version 3, or (at your option) |
252b5132 RH |
9 | any later version. |
10 | ||
ec2655a6 NC |
11 | GAS is distributed in the hope that it will be useful, but WITHOUT |
12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
13 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
14 | License for more details. | |
252b5132 RH |
15 | |
16 | You should have received a copy of the GNU General Public License | |
a01b9fa4 | 17 | along with GAS; see the file COPYING. If not, write to the Free |
4b4da160 NC |
18 | Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA |
19 | 02110-1301, USA. */ | |
252b5132 RH |
20 | |
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. | |
47eebc20 | 23 | Furthermore it gives us a possibility to mask in bits in the symbol |
33eaf5de | 24 | when it's fixed in the object code and check the symbols limits. |
252b5132 RH |
25 | |
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 | |
d3ecfc59 | 29 | can handle bitfields. Ie. handle an expression, evaluate it and insert |
ec2655a6 | 30 | the result in some bitfield. (eg: 5 bits in a short field of an opcode). */ |
252b5132 RH |
31 | |
32 | #ifndef __bit_fix_h__ | |
33 | #define __bit_fix_h__ | |
34 | ||
30a2b4ef KH |
35 | struct bit_fix { |
36 | int fx_bit_size; /* Length of bitfield */ | |
37 | int fx_bit_offset; /* Bit offset to bitfield */ | |
38 | long fx_bit_base; /* Where do we apply the bitfix. | |
39 | If this is zero, default is assumed. */ | |
40 | long fx_bit_base_adj; /* Adjustment of base */ | |
41 | long fx_bit_max; /* Signextended max for bitfield */ | |
42 | long fx_bit_min; /* Signextended min for bitfield */ | |
43 | long fx_bit_add; /* Or mask, used for huffman prefix */ | |
44 | }; | |
252b5132 RH |
45 | typedef struct bit_fix bit_fixS; |
46 | ||
47 | #endif /* __bit_fix_h__ */ |