aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-06-22 14:53:01 +0000
committerIan Lance Taylor <ian@airs.com>1999-06-22 14:53:01 +0000
commit7dcc9865504dca99a950c4d11d54c3a3a5f0b8c9 (patch)
treec4e20310082b203277f32490e0c765536bdc0a47 /gas
parenta77f5182c7d7ee65904c073161053e330bc8eed1 (diff)
downloadgdb-7dcc9865504dca99a950c4d11d54c3a3a5f0b8c9.zip
gdb-7dcc9865504dca99a950c4d11d54c3a3a5f0b8c9.tar.gz
gdb-7dcc9865504dca99a950c4d11d54c3a3a5f0b8c9.tar.bz2
* config/tc-alpha.c: More use of symbol accessor functions.
* config/tc-arc.c: Likewise. * config/tc-d30v.c: Likewise. * config/tc-fr30.c: Likewise. * config/tc-i860.c: Likewise. * config/tc-m88k.c: Likewise. * config/tc-mcore.c: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-sparc.c: Likewise. * config/tc-v850.c: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/config/tc-alpha.c9
-rw-r--r--gas/config/tc-arc.c12
-rw-r--r--gas/config/tc-d30v.c13
-rw-r--r--gas/config/tc-fr30.c2
-rw-r--r--gas/config/tc-i860.c10
-rw-r--r--gas/config/tc-m88k.c12
-rw-r--r--gas/config/tc-mcore.c2
-rw-r--r--gas/config/tc-ns32k.c2
-rw-r--r--gas/config/tc-sparc.c2
-rw-r--r--gas/config/tc-v850.c10
11 files changed, 49 insertions, 36 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6e00576..b4cf7df 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,16 @@
1999-06-22 Ian Lance Taylor <ian@zembu.com>
+ * config/tc-alpha.c: More use of symbol accessor functions.
+ * config/tc-arc.c: Likewise.
+ * config/tc-d30v.c: Likewise.
+ * config/tc-fr30.c: Likewise.
+ * config/tc-i860.c: Likewise.
+ * config/tc-m88k.c: Likewise.
+ * config/tc-mcore.c: Likewise.
+ * config/tc-ns32k.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-v850.c: Likewise.
+
* config/tc-arc.c (get_arc_exp_reloc_type): Change uses of
sy_value with appropriate accessor functions.
* config/tc-arm.c (md_apply_fix3): Likewise.
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index e55a9bc..69432dc 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -2181,7 +2181,7 @@ add_to_link_pool (basesym, sym, addend)
segment_info_type *seginfo = seg_info (alpha_link_section);
fixS *fixp;
- offset = -basesym->sy_obj;
+ offset = - *symbol_get_obj (basesym);
/* @@ This assumes all entries in a given section will be of the same
size... Probably correct, but unwise to rely on. */
@@ -3478,7 +3478,7 @@ s_alpha_comm (ignore)
subseg_set (current_section, current_subsec);
#endif
- know (symbolP->sy_frag == &zero_address_frag);
+ know (symbol_get_frag (symbolP) == &zero_address_frag);
demand_empty_rest_of_line ();
}
@@ -3848,7 +3848,8 @@ s_alpha_pdesc (ignore)
return;
}
- alpha_evax_proc.symbol->sy_obj = (valueT)seginfo->literal_pool_size;
+ *symbol_get_obj (alpha_evax_proc.symbol) =
+ (valueT) seginfo->literal_pool_size;
expression (&exp);
if (exp.X_op != O_symbol)
@@ -4294,7 +4295,7 @@ s_alpha_proc (is_static)
input_line_pointer++;
temp = get_absolute_expression ();
}
- /* symbolP->sy_other = (signed char) temp; */
+ /* *symbol_get_obj (symbolP) = (signed char) temp; */
as_warn (_("unhandled: .proc %s,%d"), name, temp);
demand_empty_rest_of_line ();
}
diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c
index ccacd25..3aafea3 100644
--- a/gas/config/tc-arc.c
+++ b/gas/config/tc-arc.c
@@ -798,7 +798,7 @@ arc_common (ignore)
S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size);
}
}
- assert (symbolP->sy_frag == &zero_address_frag);
+ assert (symbol_get_frag (symbolP) == &zero_address_frag);
if (*input_line_pointer != ',')
{
as_bad (_("expected comma after common length"));
@@ -831,8 +831,8 @@ arc_common (ignore)
if (align)
frag_align (align, 0, 0);
if (S_GET_SEGMENT (symbolP) == bss_section)
- symbolP->sy_frag->fr_symbol = 0;
- symbolP->sy_frag = frag_now;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
+ symbol_set_frag (symbolP, frag_now);
p = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *) 0);
*p = 0;
@@ -967,7 +967,7 @@ arc_rename (ignore)
new = (char *) xmalloc (strlen (name) + 1);
strcpy (new, name);
*input_line_pointer = c;
- sym->sy_tc.real_name = new;
+ symbol_get_tc (sym)->real_name = new;
demand_empty_rest_of_line ();
}
@@ -1476,8 +1476,8 @@ int
arc_frob_symbol (sym)
symbolS *sym;
{
- if (sym->sy_tc.real_name != (char *) NULL)
- S_SET_NAME (sym, sym->sy_tc.real_name);
+ if (symbol_get_tc (sym)->real_name != (char *) NULL)
+ S_SET_NAME (sym, symbol_get_tc (sym)->real_name);
return 0;
}
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c
index 99837ef..0682a57 100644
--- a/gas/config/tc-d30v.c
+++ b/gas/config/tc-d30v.c
@@ -2028,7 +2028,7 @@ d30v_frob_label (lab)
d30v_cleanup (false);
/* Update the label's address with the current output pointer. */
- lab->sy_frag = frag_now;
+ symbol_set_frag (lab, frag_now);
S_SET_VALUE (lab, (valueT) frag_now_fix ());
/* Record this label for future adjustment after we find out what
@@ -2110,7 +2110,7 @@ d30v_align (n, pfill, label)
assert (S_GET_SEGMENT (label) == now_seg);
- old_frag = label->sy_frag;
+ old_frag = symbol_get_frag (label);
old_value = S_GET_VALUE (label);
new_value = (valueT) frag_now_fix ();
@@ -2125,15 +2125,16 @@ d30v_align (n, pfill, label)
in the target fragment. Note, this search is guaranteed to
find at least one match when sym == label, so no special case
code is necessary. */
- for (sym = symbol_lastP; sym != NULL; sym = sym->sy_previous)
+ for (sym = symbol_lastP; sym != NULL; sym = symbol_previous (sym))
{
- if (sym->sy_frag == old_frag && S_GET_VALUE (sym) == old_value)
+ if (symbol_get_frag (sym) == old_frag
+ && S_GET_VALUE (sym) == old_value)
{
label_seen = true;
- sym->sy_frag = frag_now;
+ symbol_set_frag (sym, frag_now);
S_SET_VALUE (sym, new_value);
}
- else if (label_seen && sym->sy_frag != old_frag)
+ else if (label_seen && symbol_get_frag (sym) != old_frag)
break;
}
}
diff --git a/gas/config/tc-fr30.c b/gas/config/tc-fr30.c
index aa075b7..aca5880 100644
--- a/gas/config/tc-fr30.c
+++ b/gas/config/tc-fr30.c
@@ -384,7 +384,7 @@ md_convert_frag (abfd, sec, fragP)
{
/* Address we want to reach in file space. */
target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
- target_address += fragP->fr_symbol->sy_frag->fr_address;
+ target_address += symbol_get_frag (fragP->fr_symbol)->fr_address;
addend = (target_address - (opcode_address & -4)) >> 2;
}
diff --git a/gas/config/tc-i860.c b/gas/config/tc-i860.c
index f2e2b19..3317282 100644
--- a/gas/config/tc-i860.c
+++ b/gas/config/tc-i860.c
@@ -1,5 +1,5 @@
/* tc-i860.c -- Assemble for the I860
- Copyright (C) 1989, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1989, 92, 93, 94, 95, 98, 1999 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1118,9 +1118,9 @@ emit_machine_reloc (fixP, segment_address_in_file)
ri.r_extern = 0;
ri.r_symbolnum = S_GET_TYPE (symbolP);
}
- if (symbolP && symbolP->sy_frag)
+ if (symbolP && symbol_get_frag (symbolP))
{
- ri.r_addend = symbolP->sy_frag->fr_address;
+ ri.r_addend = symbol_get_frag (symbolP)->fr_address;
}
ri.r_type = fixP->fx_r_type;
if (fixP->fx_pcrel)
@@ -1184,9 +1184,9 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
| ((r_extern << 6) & 0x40)
| (fixP->fx_r_type & 0x3F));
- if (fixP->fx_addsy->sy_frag)
+ if (symbol_get_frag (fixP->fx_addsy))
{
- r_addend = fixP->fx_addsy->sy_frag->fr_address;
+ r_addend = symbol_get_frag (fixP->fx_addsy)->fr_address;
}
if (fixP->fx_pcrel)
diff --git a/gas/config/tc-m88k.c b/gas/config/tc-m88k.c
index 931a496a..f77460a 100644
--- a/gas/config/tc-m88k.c
+++ b/gas/config/tc-m88k.c
@@ -1,7 +1,7 @@
/* m88k.c -- Assembler for the Motorola 88000
Contributed by Devon Bowen of Buffalo University
and Torbjorn Granlund of the Swedish Institute of Computer Science.
- Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 1997
+ Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -1214,9 +1214,9 @@ emit_relocations (fixP, segment_address_in_file)
ri.r_extern = 0;
ri.r_symbolnum = symbolP->sy_type & N_TYPE;
}
- if (symbolP && symbolP->sy_frag)
+ if (symbolP && symbol_get_frag (symbolP))
{
- ri.r_addend = symbolP->sy_frag->fr_address;
+ ri.r_addend = symbol_get_frag (symbolP)->fr_address;
}
ri.r_type = fixP->fx_r_type;
if (fixP->fx_pcrel)
@@ -1294,10 +1294,10 @@ s_bss ()
frag_align (bss_align, 0, 0);
/* detach from old frag */
- if (symbolP->sy_type == N_BSS && symbolP->sy_frag != NULL)
- symbolP->sy_frag->fr_symbol = NULL;
+ if (symbolP->sy_type == N_BSS && symbol_get_frag (symbolP) != NULL)
+ symbol_get_frag (symbolP)->fr_symbol = NULL;
- symbolP->sy_frag = frag_now;
+ symbol_set_frag (symbolP, frag_now);
p = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP,
(offsetT) temp, (char *)0);
*p = 0;
diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c
index 49db23b..5e4e329 100644
--- a/gas/config/tc-mcore.c
+++ b/gas/config/tc-mcore.c
@@ -1668,7 +1668,7 @@ md_convert_frag (abfd, sec, fragP)
int targ_addr = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset;
buffer = (unsigned char *) (fragP->fr_fix + fragP->fr_literal);
- targ_addr += fragP->fr_symbol->sy_frag->fr_address;
+ targ_addr += symbol_get_frag (fragP->fr_symbol)->fr_address;
switch (fragP->fr_subtype)
{
diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c
index 6457aea..59f1467 100644
--- a/gas/config/tc-ns32k.c
+++ b/gas/config/tc-ns32k.c
@@ -1971,7 +1971,7 @@ md_convert_frag (abfd, sec, fragP)
/* The displacement of the address, from current location. */
disp = (S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset) - object_address;
#ifdef BFD_ASSEMBLER
- disp += fragP->fr_symbol->sy_frag->fr_address;
+ disp += symbol_get_frag (fragP->fr_symbol)->fr_address;
#endif
disp += md_pcrel_adjust(fragP);
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 1ed91f5..fe8c890 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3462,7 +3462,7 @@ s_common (ignore)
S_SET_EXTERNAL (symbolP);
#endif
}
- know (symbolP->sy_frag == &zero_address_frag);
+ know (symbol_get_frag (symbolP) == &zero_address_frag);
if (*input_line_pointer != ',')
{
as_bad (_("Expected comma after common length"));
diff --git a/gas/config/tc-v850.c b/gas/config/tc-v850.c
index 32d20af..7d4a91f 100644
--- a/gas/config/tc-v850.c
+++ b/gas/config/tc-v850.c
@@ -297,7 +297,7 @@ v850_comm (area)
}
}
- know (symbolP->sy_frag == & zero_address_frag);
+ know (symbol_get_frag (symbolP) == & zero_address_frag);
if (*input_line_pointer != ',')
have_align = 0;
@@ -421,24 +421,24 @@ v850_comm (area)
{
case AREA_SDA:
if (S_GET_SEGMENT (symbolP) == sbss_section)
- symbolP->sy_frag->fr_symbol = 0;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
break;
case AREA_ZDA:
if (S_GET_SEGMENT (symbolP) == zbss_section)
- symbolP->sy_frag->fr_symbol = 0;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
break;
case AREA_TDA:
if (S_GET_SEGMENT (symbolP) == tbss_section)
- symbolP->sy_frag->fr_symbol = 0;
+ symbol_get_frag (symbolP)->fr_symbol = 0;
break;
default:
abort();
}
- symbolP->sy_frag = frag_now;
+ symbol_set_frag (symbolP, frag_now);
pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP,
(offsetT) size, (char *) 0);
*pfrag = 0;