* 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.
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.
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. */
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 ();
}
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)
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 ();
}
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"));
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;
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 ();
}
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;
}
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
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 ();
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;
}
}
{
/* 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;
}
/* 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.
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)
| ((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)
/* 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.
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)
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;
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)
{
/* 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);
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"));
}
}
- know (symbolP->sy_frag == & zero_address_frag);
+ know (symbol_get_frag (symbolP) == & zero_address_frag);
if (*input_line_pointer != ',')
have_align = 0;
{
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;