mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:54:41 +08:00
2000-10-17 Kazu Hirata <kazu@hxi.com>
* debug.c: Fix formatting. * depend.c: Likewise. * dwarf2dbg.c: Likewise. * dwarf2dbg.h: Likewise. * ecoff.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flonum-konst.c: Likewise. * frags.h: Likewise.
This commit is contained in:
parent
ea20a7da87
commit
e6c774b42a
@ -1,3 +1,15 @@
|
||||
2000-10-17 Kazu Hirata <kazu@hxi.com>
|
||||
|
||||
* debug.c: Fix formatting.
|
||||
* depend.c: Likewise.
|
||||
* dwarf2dbg.c: Likewise.
|
||||
* dwarf2dbg.h: Likewise.
|
||||
* ecoff.c: Likewise.
|
||||
* expr.c: Likewise.
|
||||
* expr.h: Likewise.
|
||||
* flonum-konst.c: Likewise.
|
||||
* frags.h: Likewise.
|
||||
|
||||
2000-10-17 Chandrakala Chavva <cchavva@redhat.com>
|
||||
|
||||
* as.c: New option OPTION_TARGET_HELP. Prints all target specific
|
||||
|
@ -62,8 +62,7 @@ dmp_frag (fp, indent)
|
||||
printf ("%srs_fill(%d)\n", indent, fp->fr_offset);
|
||||
printf ("%s", indent);
|
||||
var_chars (fp, fp->fr_var + fp->fr_fix);
|
||||
printf ("%s\t repeated %d times,",
|
||||
indent, fp->fr_offset);
|
||||
printf ("%s\t repeated %d times,", indent, fp->fr_offset);
|
||||
printf (" fixed length if # chars == 0)\n");
|
||||
break;
|
||||
case rs_org:
|
||||
|
@ -23,8 +23,7 @@
|
||||
/* The file to write to, or NULL if no dependencies being kept. */
|
||||
static char *dep_file = NULL;
|
||||
|
||||
struct dependency
|
||||
{
|
||||
struct dependency {
|
||||
char *file;
|
||||
struct dependency *next;
|
||||
};
|
||||
|
@ -99,11 +99,9 @@
|
||||
0, /* basic_block */ \
|
||||
1 /* empty_sequence */
|
||||
|
||||
static struct
|
||||
{
|
||||
static struct {
|
||||
/* state machine state as per DWARF2 manual: */
|
||||
struct dwarf2_sm
|
||||
{
|
||||
struct dwarf2_sm {
|
||||
addressT addr;
|
||||
unsigned int filenum;
|
||||
unsigned int line;
|
||||
@ -112,8 +110,7 @@ static struct
|
||||
is_stmt : 1,
|
||||
basic_block : 1,
|
||||
empty_sequence : 1; /* current code sequence has no DWARF2 directives? */
|
||||
}
|
||||
sm;
|
||||
} sm;
|
||||
|
||||
unsigned int
|
||||
any_dwarf2_directives : 1; /* did we emit any DWARF2 line debug directives? */
|
||||
@ -125,21 +122,17 @@ static struct
|
||||
int last_filename; /* index of last filename that was used */
|
||||
int num_filenames; /* index of last filename in use */
|
||||
int filename_len; /* length of the filename array */
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int dir; /* valid after gen_dir_list() only */
|
||||
char *name; /* full path before gen_dir_list(), filename afterwards */
|
||||
}
|
||||
*file;
|
||||
} *file;
|
||||
|
||||
struct dwarf2_line_info current; /* current source info */
|
||||
|
||||
/* counters for statistical purposes */
|
||||
unsigned int num_line_entries;
|
||||
unsigned int opcode_hist[256]; /* histogram of opcode frequencies */
|
||||
}
|
||||
ls =
|
||||
{
|
||||
} ls = {
|
||||
{
|
||||
INITIAL_STATE
|
||||
},
|
||||
@ -172,7 +165,7 @@ ls =
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/* Function prototypes. */
|
||||
static void out_uleb128 PARAMS ((addressT));
|
||||
@ -252,7 +245,7 @@ gen_addr_line (line_delta, addr_delta)
|
||||
tmp += DWARF2_LINE_OPCODE_BASE;
|
||||
|
||||
/* Try using a special opcode. */
|
||||
opcode = tmp + addr_delta*DWARF2_LINE_RANGE;
|
||||
opcode = tmp + addr_delta * DWARF2_LINE_RANGE;
|
||||
if (opcode <= 255)
|
||||
{
|
||||
out_opcode (opcode);
|
||||
@ -617,12 +610,11 @@ static void
|
||||
print_stats (total_size)
|
||||
unsigned long total_size;
|
||||
{
|
||||
static const char *opc_name[] =
|
||||
{
|
||||
"extended", "copy", "advance_pc", "advance_line", "set_file",
|
||||
"set_column", "negate_stmt", "set_basic_block", "const_add_pc",
|
||||
"fixed_advance_pc"
|
||||
};
|
||||
static const char *opc_name[] = {
|
||||
"extended", "copy", "advance_pc", "advance_line", "set_file",
|
||||
"set_column", "negate_stmt", "set_basic_block", "const_add_pc",
|
||||
"fixed_advance_pc"
|
||||
};
|
||||
size_t i;
|
||||
int j;
|
||||
|
||||
|
@ -26,14 +26,13 @@
|
||||
#define DWARF2_FLAG_BEGIN_STMT (1 << 0) /* beginning of statement */
|
||||
#define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */
|
||||
|
||||
struct dwarf2_line_info
|
||||
{
|
||||
char *filename;
|
||||
unsigned int filenum;
|
||||
unsigned int line;
|
||||
unsigned int column;
|
||||
unsigned int flags;
|
||||
};
|
||||
struct dwarf2_line_info {
|
||||
char *filename;
|
||||
unsigned int filenum;
|
||||
unsigned int line;
|
||||
unsigned int column;
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
/* Implements the .file FILENO "FILENAME" directive. FILENO can be 0
|
||||
to indicate that no file number has been assigned. All real file
|
||||
|
@ -952,8 +952,7 @@ typedef struct efdr {
|
||||
} efdr_t;
|
||||
|
||||
/* Pre-initialized extended file structure. */
|
||||
static const efdr_t init_file =
|
||||
{
|
||||
static const efdr_t init_file = {
|
||||
{ /* FDR structure */
|
||||
0, /* adr: memory address of beginning of file */
|
||||
0, /* rss: file name (of source, if known) */
|
||||
@ -1111,7 +1110,7 @@ static const type_info_t type_info_init = {
|
||||
/* Global hash table for the tags table and global table for file
|
||||
descriptors. */
|
||||
|
||||
static varray_t file_desc = INIT_VARRAY (efdr_t);
|
||||
static varray_t file_desc = INIT_VARRAY (efdr_t);
|
||||
|
||||
static struct hash_control *tag_hash;
|
||||
|
||||
|
10
gas/expr.c
10
gas/expr.c
@ -48,8 +48,7 @@ extern const char EXP_CHARS[], FLT_CHARS[];
|
||||
/* We keep a mapping of expression symbols to file positions, so that
|
||||
we can provide better error messages. */
|
||||
|
||||
struct expr_symbol_line
|
||||
{
|
||||
struct expr_symbol_line {
|
||||
struct expr_symbol_line *next;
|
||||
symbolS *sym;
|
||||
char *file;
|
||||
@ -217,8 +216,8 @@ expr_build_dot ()
|
||||
and never write into the early words, thus they'll always be zero.
|
||||
I hate Dean's floating-point code. Bleh. */
|
||||
LITTLENUM_TYPE generic_bignum[SIZE_OF_LARGE_NUMBER + 6];
|
||||
FLONUM_TYPE generic_floating_point_number =
|
||||
{
|
||||
|
||||
FLONUM_TYPE generic_floating_point_number = {
|
||||
&generic_bignum[6], /* low. (JF: Was 0) */
|
||||
&generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high. JF: (added +6) */
|
||||
0, /* leader. */
|
||||
@ -1464,8 +1463,7 @@ static const operatorT op_encoding[256] =
|
||||
7 * / % << >>
|
||||
8 unary - unary ~
|
||||
*/
|
||||
static operator_rankT op_rank[] =
|
||||
{
|
||||
static operator_rankT op_rank[] = {
|
||||
0, /* O_illegal */
|
||||
0, /* O_absent */
|
||||
0, /* O_constant */
|
||||
|
@ -39,8 +39,7 @@
|
||||
|
||||
NOTE: This enumeration must match the op_rank array in expr.c. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
/* An illegal expression. */
|
||||
O_illegal,
|
||||
/* A nonexistent expression. */
|
||||
@ -111,8 +110,7 @@ typedef enum
|
||||
O_max
|
||||
} operatorT;
|
||||
|
||||
typedef struct expressionS
|
||||
{
|
||||
typedef struct expressionS {
|
||||
/* The main symbol. */
|
||||
symbolS *X_add_symbol;
|
||||
/* The second symbol, if needed. */
|
||||
|
@ -27,8 +27,9 @@
|
||||
|
||||
const int table_size_of_flonum_powers_of_ten = 13;
|
||||
|
||||
static const LITTLENUM_TYPE zero[] =
|
||||
{1};
|
||||
static const LITTLENUM_TYPE zero[] = {
|
||||
1
|
||||
};
|
||||
|
||||
/***********************************************************************\
|
||||
* *
|
||||
@ -43,131 +44,149 @@ static const LITTLENUM_TYPE zero[] =
|
||||
\***********************************************************************/
|
||||
|
||||
/* JF: If this equals 6553/(2^16)+39321/(2^32)+... it approaches .1 */
|
||||
static const LITTLENUM_TYPE minus_1[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_1[] = {
|
||||
39322, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321,
|
||||
39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553};
|
||||
static const LITTLENUM_TYPE plus_1[] =
|
||||
{10};
|
||||
39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_1[] = {
|
||||
10
|
||||
};
|
||||
|
||||
/* JF: If this equals 655/(2^16) + 23592/(2^32) + ... it approaches .01 */
|
||||
static const LITTLENUM_TYPE minus_2[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_2[] = {
|
||||
10486, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 49807,
|
||||
10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655};
|
||||
static const LITTLENUM_TYPE plus_2[] =
|
||||
{100};
|
||||
10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_2[] = {
|
||||
100
|
||||
};
|
||||
|
||||
/* This approaches .0001 */
|
||||
static const LITTLENUM_TYPE minus_3[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_3[] = {
|
||||
52534, 20027, 37329, 65116, 64067, 60397, 14784, 18979, 33659, 19503,
|
||||
2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6};
|
||||
static const LITTLENUM_TYPE plus_3[] =
|
||||
{10000};
|
||||
2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_3[] = {
|
||||
10000
|
||||
};
|
||||
|
||||
/* JF: this approaches 1e-8 */
|
||||
static const LITTLENUM_TYPE minus_4[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_4[] = {
|
||||
22517, 49501, 54293, 19424, 60699, 6716, 24348, 22618, 23904, 21327,
|
||||
3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42};
|
||||
3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42
|
||||
};
|
||||
|
||||
/* This equals 1525 * 2^16 + 57600 */
|
||||
static const LITTLENUM_TYPE plus_4[] =
|
||||
{57600, 1525};
|
||||
static const LITTLENUM_TYPE plus_4[] = {
|
||||
57600, 1525
|
||||
};
|
||||
|
||||
/* This approaches 1e-16 */
|
||||
static const LITTLENUM_TYPE minus_5[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_5[] = {
|
||||
22199, 45957, 17005, 26266, 10526, 16260, 55017, 35680, 40443, 19789,
|
||||
17356, 30195, 55905, 28426, 63010, 44197, 1844};
|
||||
static const LITTLENUM_TYPE plus_5[] =
|
||||
{28609, 34546, 35};
|
||||
17356, 30195, 55905, 28426, 63010, 44197, 1844
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_6[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE plus_5[] = {
|
||||
28609, 34546, 35
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_6[] = {
|
||||
30926, 26518, 13110, 43018, 54982, 48258, 24658, 15209, 63366, 11929,
|
||||
20069, 43857, 60487, 51};
|
||||
static const LITTLENUM_TYPE plus_6[] =
|
||||
{61313, 34220, 16731, 11629, 1262};
|
||||
20069, 43857, 60487, 51
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_7[] =
|
||||
{
|
||||
29819, 14733, 21490, 40602, 31315, 65186, 2695};
|
||||
static const LITTLENUM_TYPE plus_7[] =
|
||||
{
|
||||
7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24};
|
||||
static const LITTLENUM_TYPE plus_6[] = {
|
||||
61313, 34220, 16731, 11629, 1262
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_8[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_7[] = {
|
||||
29819, 14733, 21490, 40602, 31315, 65186, 2695
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_7[] = {
|
||||
7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_8[] = {
|
||||
27579, 64807, 12543, 794, 13907, 61297, 12013, 64360, 15961, 20566,
|
||||
24178, 15922, 59427, 110};
|
||||
static const LITTLENUM_TYPE plus_8[] =
|
||||
{
|
||||
15873, 11925, 39177, 991, 14589, 3861, 58415, 9076, 62956, 54223,
|
||||
56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590};
|
||||
24178, 15922, 59427, 110
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_9[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE plus_8[] = {
|
||||
15873, 11925, 39177, 991, 14589, 3861, 58415, 9076, 62956, 54223,
|
||||
56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_9[] = {
|
||||
11042, 8464, 58971, 63429, 6022, 63485, 5500, 53464, 47545, 50068,
|
||||
56988, 22819, 49708, 54493, 9920, 47667, 40409, 35764, 10383, 54466,
|
||||
32702, 17493, 32420, 34382, 22750, 20681, 12300};
|
||||
static const LITTLENUM_TYPE plus_9[] =
|
||||
{
|
||||
32702, 17493, 32420, 34382, 22750, 20681, 12300
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_9[] = {
|
||||
20678, 27614, 28272, 53066, 55311, 54677, 29038, 9906, 26288, 44486,
|
||||
13860, 7445, 54106, 15426, 21518, 25599, 29632, 52309, 61207, 26105,
|
||||
10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5};
|
||||
10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_10[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_10[] = {
|
||||
6214, 48771, 23471, 30163, 31763, 38013, 57001, 11770, 18263, 36366,
|
||||
20742, 45086, 56969, 53231, 37856, 55814, 38057, 15692, 46761, 8713,
|
||||
6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308};
|
||||
static const LITTLENUM_TYPE plus_10[] =
|
||||
{
|
||||
6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_10[] = {
|
||||
63839, 36576, 45712, 44516, 37803, 29482, 4966, 30556, 37961, 23310,
|
||||
27070, 44972, 29507, 48257, 45209, 7494, 17831, 38728, 41577, 29443,
|
||||
36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28};
|
||||
36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_11[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_11[] = {
|
||||
16663, 56882, 61983, 7804, 36555, 32060, 34502, 1000, 14356, 21681,
|
||||
6605, 34767, 51411, 59048, 53614, 39850, 30079, 6496, 6846, 26841,
|
||||
40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81};
|
||||
static const LITTLENUM_TYPE plus_11[] =
|
||||
{
|
||||
40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_11[] = {
|
||||
92, 9054, 62707, 17993, 7821, 56838, 13992, 21321, 29637, 48426,
|
||||
42982, 38668, 49574, 28820, 18200, 18927, 53979, 16219, 37484, 2516,
|
||||
44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805};
|
||||
44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_12[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_12[] = {
|
||||
33202, 45969, 58804, 56734, 16482, 26007, 44984, 49334, 31007, 32944,
|
||||
44517, 63329, 47131, 15291, 59465, 2264, 23218, 11829, 59771, 38798,
|
||||
31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613};
|
||||
static const LITTLENUM_TYPE plus_12[] =
|
||||
{
|
||||
31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_12[] = {
|
||||
10098, 37922, 58070, 7432, 10470, 63465, 23718, 62190, 47420, 7009,
|
||||
38443, 4587, 45596, 38472, 52129, 52779, 29012, 13559, 48688, 31678,
|
||||
41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9};
|
||||
41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE minus_13[] =
|
||||
{
|
||||
static const LITTLENUM_TYPE minus_13[] = {
|
||||
45309, 27592, 37144, 34637, 34328, 41671, 34620, 24135, 53401, 22112,
|
||||
21576, 45147, 39310, 44051, 48572, 3676, 46544, 59768, 33350, 2323,
|
||||
49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667};
|
||||
static const LITTLENUM_TYPE plus_13[] =
|
||||
{
|
||||
49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667
|
||||
};
|
||||
|
||||
static const LITTLENUM_TYPE plus_13[] = {
|
||||
18788, 16960, 6318, 45685, 55400, 46230, 35794, 25588, 7253, 55541,
|
||||
49716, 59760, 63592, 8191, 63765, 58530, 44667, 13294, 10001, 55586,
|
||||
47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98};
|
||||
47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98
|
||||
};
|
||||
|
||||
/* Shut up complaints about differing pointer types. They only differ
|
||||
in the const attribute, but there isn't any easy way to do this
|
||||
*/
|
||||
#define X (LITTLENUM_TYPE *)
|
||||
|
||||
const FLONUM_TYPE flonum_negative_powers_of_ten[] =
|
||||
{
|
||||
const FLONUM_TYPE flonum_negative_powers_of_ten[] = {
|
||||
{X zero, X zero, X zero, 0, '+'},
|
||||
{X minus_1, X minus_1 + 19, X minus_1 + 19, -20, '+'},
|
||||
{X minus_2, X minus_2 + 19, X minus_2 + 19, -20, '+'},
|
||||
@ -184,8 +203,7 @@ const FLONUM_TYPE flonum_negative_powers_of_ten[] =
|
||||
{X minus_13, X minus_13 + 29, X minus_13 + 29, -880, '+'},
|
||||
};
|
||||
|
||||
const FLONUM_TYPE flonum_positive_powers_of_ten[] =
|
||||
{
|
||||
const FLONUM_TYPE flonum_positive_powers_of_ten[] = {
|
||||
{X zero, X zero, X zero, 0, '+'},
|
||||
{X plus_1, X plus_1 + 0, X plus_1 + 0, 0, '+'},
|
||||
{X plus_2, X plus_2 + 0, X plus_2 + 0, 0, '+'},
|
||||
|
53
gas/frags.h
53
gas/frags.h
@ -26,24 +26,21 @@
|
||||
struct obstack;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A code fragment (frag) is some known number of chars, followed by some
|
||||
* unknown number of chars. Typically the unknown number of chars is an
|
||||
* instruction address whose size is yet unknown. We always know the greatest
|
||||
* possible size the unknown number of chars may become, and reserve that
|
||||
* much room at the end of the frag.
|
||||
* Once created, frags do not change address during assembly.
|
||||
* We chain the frags in (a) forward-linked list(s). The object-file address
|
||||
* of the 1st char of a frag is generally not known until after relax().
|
||||
* Many things at assembly time describe an address by {object-file-address
|
||||
* of a particular frag}+offset.
|
||||
/* A code fragment (frag) is some known number of chars, followed by some
|
||||
unknown number of chars. Typically the unknown number of chars is an
|
||||
instruction address whose size is yet unknown. We always know the greatest
|
||||
possible size the unknown number of chars may become, and reserve that
|
||||
much room at the end of the frag.
|
||||
Once created, frags do not change address during assembly.
|
||||
We chain the frags in (a) forward-linked list(s). The object-file address
|
||||
of the 1st char of a frag is generally not known until after relax().
|
||||
Many things at assembly time describe an address by {object-file-address
|
||||
of a particular frag}+offset.
|
||||
|
||||
BUG: it may be smarter to have a single pointer off to various different
|
||||
notes for different frag kinds. See how code pans
|
||||
*/
|
||||
BUG: it may be smarter to have a single pointer off to various different
|
||||
notes for different frag kinds. See how code pans. */
|
||||
|
||||
struct frag
|
||||
{
|
||||
struct frag {
|
||||
/* Object file address (as an octet offset). */
|
||||
addressT fr_address;
|
||||
/* Chain forward; ascending address order. Rooted in frch_root. */
|
||||
@ -94,7 +91,7 @@ struct frag
|
||||
};
|
||||
|
||||
#define SIZEOF_STRUCT_FRAG \
|
||||
((char *)zero_address_frag.fr_literal-(char *)&zero_address_frag)
|
||||
((char *) zero_address_frag.fr_literal - (char *) &zero_address_frag)
|
||||
/* We want to say fr_literal[0] above. */
|
||||
|
||||
/* Current frag we are building. This frag is incomplete. It is,
|
||||
@ -110,18 +107,16 @@ COMMON fragS zero_address_frag;
|
||||
COMMON fragS bss_address_frag;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* A macro to speed up appending exactly 1 char
|
||||
* to current frag.
|
||||
*/
|
||||
/* JF changed < 1 to <= 1 to avoid a race conditon */
|
||||
#define FRAG_APPEND_1_CHAR(datum) \
|
||||
{ \
|
||||
if (obstack_room( &frags ) <= 1) {\
|
||||
frag_wane (frag_now); \
|
||||
frag_new (0); \
|
||||
} \
|
||||
obstack_1grow( &frags, datum ); \
|
||||
/* A macro to speed up appending exactly 1 char to current frag. */
|
||||
/* JF changed < 1 to <= 1 to avoid a race conditon. */
|
||||
#define FRAG_APPEND_1_CHAR(datum) \
|
||||
{ \
|
||||
if (obstack_room (&frags) <= 1) \
|
||||
{ \
|
||||
frag_wane (frag_now); \
|
||||
frag_new (0); \
|
||||
} \
|
||||
obstack_1grow (&frags, datum); \
|
||||
}
|
||||
#else
|
||||
extern void frag_append_1_char PARAMS ((int));
|
||||
|
Loading…
Reference in New Issue
Block a user