diff options
author | Nick Clifton <nickc@redhat.com> | 2009-08-29 22:11:02 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-08-29 22:11:02 +0000 |
commit | d3ce72d070fa3a519388b0eca00d6cb45d337071 (patch) | |
tree | 104599ed64e14c9642bc50cde90b3ed942cf7653 /gas/config/tc-score7.c | |
parent | 0aec8eb1b5dae3bf88546abd22dbdffc7888b747 (diff) | |
download | binutils-d3ce72d070fa3a519388b0eca00d6cb45d337071.zip binutils-d3ce72d070fa3a519388b0eca00d6cb45d337071.tar.gz binutils-d3ce72d070fa3a519388b0eca00d6cb45d337071.tar.bz2 |
Updated sources to avoid using the identifier name "new", which is a
keyword in c++.
* bfd/aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
new to new_symbol.
* bfd/coffgen.c (coff_make_empty_symbol)
(coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
* bfd/cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
new to new_insn.
* bfd/doc/chew.c (newentry, add_intrinsic): Rename variable new to
new_d.
* bfd/ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
to new_symbol.
* bfd/elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
new to new_reloc.
* bfd/hash.c (bfd_hash_lookup): Rename variable new to new_string.
* bfd/ieee.c (ieee_make_empty_symbol): Rename variable new to
new_symbol.
* bfd/linker.c (bfd_new_link_order): Rename variable new to
new_lo.
* bfd/mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
symbol.
* bfd/oasys.c (oasys_make_empty_symbol): Rename variable new to
new_symbol_type.
* bfd/pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
new to new_symbol_type.
* bfd/plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
to new_symbol.
* bfd/rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
new_dump.
(read_hdr, rs6000coff_core_p)
(rs6000coff_core_file_matches_executable_p)
(rs6000coff_core_file_failing_command)
(rs6000coff_core_file_failing_signal): Updated function to use new
union member name.
* bfd/som.c (som_make_empty_symbol): Rename variable new to
new_symbol_type.
* bfd/syms.c (_bfd_generic_make_empty_symbol): Rename variable new
to new_symbol.
* bfd/tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
variable new to new_symbol.
* binutils/nlmconv.c (main): Rename variable new to new_name.
* gas/config/tc-arm.c (insert_reg_alias): Rename variable new to
new_reg.
* gas/config/tc-dlx.c (parse_operand): Rename variable new to
new_pos.
* gas/config/tc-ia64.c (ia64_gen_real_reloc_type): Rename variable
new to newr.
* gas/config/tc-mcore.c (parse_exp, parse_imm): Rename variable
new to new_pointer.
* gas/config/tc-microblaze.c (parse_exp, parse_imm, check_got):
Change name from new to new_pointer.
* gas/config/tc-or32.c (parse_operand): Rename variable new to
new_pointer.
* gas/config/tc-pdp11.c (md_assemble): Rename variable new to
new_pointer.
* gas/config/tc-pj.c (alias): Change argument new to new_name.
* gas/config/tc-score.c (s3_build_score_ops_hsh): Rename variable
new to new_opcode. (s3_build_dependency_insn_hsh) Rename variable
new to new_i2n. (s3_convert): Rename variables old and new to
r_old and r_new.
* gas/config/tc-score7.c (s7_build_score_ops_hsh): Rename variable
new to new_opcode. (s7_build_dependency_insn_hsh): Rename variable
new to new_i2d. (s7_b32_relax_to_b16, s7_convert_frag): Rename
variables old and new to r_old and r_new.
* gas/config/tc-sh.c (parse_exp): Rename variable new to
new_pointer.
* gas/config/tc-sh64.c (shmedia_parse_exp): Rename variable new to
new_pointer.
* gas/config/tc-tic4x.c (tic4x_operand_parse): Rename variable new
to new_pointer.
* gas/config/tc-z8k.c (parse_exp): Rename variable new to
new_pointer.
* gas/listing.c (listing_newline): Rename variable new to new_i.
* ld/ldexp.c (exp_intop, exp_bigintop, exp_relop, exp_binop)
(exp_trinop, exp_unop, exp_nameop, exp_assop): Rename variable new
to new_e.
* ld/ldfile.c (ldfile_add_library_path): Rename variable new to
new_dirs. (ldfile_add_arch): Rename variable new to new_arch.
* ld/ldlang.c (new_statement, lang_final, lang_add_wild)
(lang_target, lang_add_fill, lang_add_data, lang_add_assignment)
(lang_add_insert): Rename variable new to new_stmt. (new_afile):
Added missing cast. (lang_memory_region_lookup): Rename variable
new to new_region. (init_os): Rename variable new to
new_userdata. (lang_add_section): Rename variable new to
new_section. (ldlang_add_undef): Rename variable new to
new_undef. (realsymbol): Rename variable new to new_name.
* opcodes/z8kgen.c (internal, gas): Rename variable new to new_op.
Updated sources to avoid using the identifier name "template",
which is a keyword in c++.
* bfd/elf32-arm.c (struct stub_def): Rename member template to
template_sequence. (arm_build_one_stub,
find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
Rename variable template to template_sequence.
* bfd/elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
Rename variable template to template_val.
* gas/config/tc-arm.c (struct asm_cond, struct asm_psr, struct
asm_barrier_opt): Change member template to
template_name. (md_begin): Update code to reflect new member
names.
* gas/config/tc-i386.c (struct templates, struct _i386_insn)
(match_template, cpu_flags_match, match_reg_size, match_mem_size)
(operand_size_match, md_begin, i386_print_statistics, pi)
(build_vex_prefix, md_assemble, parse_insn, optimize_imm)
(optimize_disp): Updated code to use new names. (parse_insn):
Added casts.
* gas/config/tc-ia64.c (dot_template, emit_one_bundle): Updated
code to use new names.
* gas/config/tc-score.c (struct s3_asm_opcode): Renamed member
template to template_name. (s3_parse_16_32_inst, s3_parse_48_inst,
s3_do_macro_ldst_label, s3_build_score_ops_hsh): Update code to
use new names.
* gas/config/tc-score7.c (struct s7_asm_opcode): Renamed member
template to template_name. (s7_parse_16_32_inst,
s7_do_macro_ldst_label, s7_build_score_ops_hsh): Update code to
use new names.
* gas/config/tc-tic30.c (md_begin, struct tic30_insn)
(md_assemble): Update code to use new names.
* gas/config/tc-tic54x.c (struct _tic54x_insn, md_begin)
(optimize_insn, tic54x_parse_insn, next_line_shows_parallel):
Update code to use new names.
* include/opcode/tic30.h (template): Rename type template to
insn_template. Updated code to use new name.
* include/opcode/tic54x.h (template): Rename type template to
insn_template.
* opcodes/cris-dis.c (bytes_to_skip): Update code to use new name.
* opcodes/i386-dis.c (putop): Update code to use new name.
* opcodes/i386-gen.c (process_i386_opcodes): Update code to use
new name.
* opcodes/i386-opc.h (struct template): Rename struct template to
insn_template. Update code accordingly.
* opcodes/i386-tbl.h (i386_optab): Update type to use new name.
* opcodes/ia64-dis.c (print_insn_ia64): Rename variable template
to template_val.
* opcodes/tic30-dis.c (struct instruction, get_tic30_instruction):
Update code to use new name.
* opcodes/tic54x-dis.c (has_lkaddr, get_insn_size)
(print_parallel_instruction, print_insn_tic54x, tic54x_get_insn):
Update code to use new name.
* opcodes/tic54x-opc.c (tic54x_unknown_opcode, tic54x_optab):
Update type to new name.
Diffstat (limited to 'gas/config/tc-score7.c')
-rw-r--r-- | gas/config/tc-score7.c | 81 |
1 files changed, 44 insertions, 37 deletions
diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c index 30b1128..c263353 100644 --- a/gas/config/tc-score7.c +++ b/gas/config/tc-score7.c @@ -597,7 +597,7 @@ static struct s7_datafield_range s7_score_df_range[] = struct s7_asm_opcode { /* Instruction name. */ - const char *template; + const char *template_name; /* Instruction Opcode. */ bfd_vma value; @@ -2804,7 +2804,7 @@ s7_parse_16_32_inst (char *insnstr, bfd_boolean gen_frag_p) s7_inst.size = s7_GET_INSN_SIZE (s7_inst.type); s7_inst.relax_size = 0; s7_inst.bwarn = 0; - sprintf (s7_inst.name, "%s", opcode->template); + sprintf (s7_inst.name, "%s", opcode->template_name); strcpy (s7_inst.reg, ""); s7_inst.error = NULL; s7_inst.reloc.type = BFD_RELOC_NONE; @@ -4789,7 +4789,8 @@ s7_do_macro_ldst_label (char *str) { int ldst_idx = 0; ldst_idx = s7_inst.instruction & OPC_PSEUDOLDST_MASK; - s7_build_lwst_pic (reg_rd, s7_inst.reloc.exp, s7_score_ldst_insns[ldst_idx * 3 + 0].template); + s7_build_lwst_pic (reg_rd, s7_inst.reloc.exp, + s7_score_ldst_insns[ldst_idx * 3 + 0].template_name); return; } else @@ -5092,20 +5093,22 @@ s7_build_score_ops_hsh (void) for (i = 0; i < sizeof (s7_score_insns) / sizeof (struct s7_asm_opcode); i++) { const struct s7_asm_opcode *insn = s7_score_insns + i; - unsigned len = strlen (insn->template); - struct s7_asm_opcode *new; - char *template; - new = obstack_alloc (&insn_obstack, sizeof (struct s7_asm_opcode)); - template = obstack_alloc (&insn_obstack, len + 1); - - strcpy (template, insn->template); - new->template = template; - new->parms = insn->parms; - new->value = insn->value; - new->relax_value = insn->relax_value; - new->type = insn->type; - new->bitmask = insn->bitmask; - hash_insert (s7_score_ops_hsh, new->template, (void *) new); + unsigned len = strlen (insn->template_name); + struct s7_asm_opcode *new_opcode; + char *template_name; + new_opcode = (struct s7_asm_opcode *) + obstack_alloc (&insn_obstack, sizeof (struct s7_asm_opcode)); + template_name = (char *) obstack_alloc (&insn_obstack, len + 1); + + strcpy (template_name, insn->template_name); + new_opcode->template_name = template_name; + new_opcode->parms = insn->parms; + new_opcode->value = insn->value; + new_opcode->relax_value = insn->relax_value; + new_opcode->type = insn->type; + new_opcode->bitmask = insn->bitmask; + hash_insert (s7_score_ops_hsh, new_opcode->template_name, + (void *) new_opcode); } } @@ -5120,14 +5123,18 @@ s7_build_dependency_insn_hsh (void) { const struct s7_insn_to_dependency *tmp = s7_insn_to_dependency_table + i; unsigned len = strlen (tmp->insn_name); - struct s7_insn_to_dependency *new; + struct s7_insn_to_dependency *new_i2d; - new = obstack_alloc (&dependency_obstack, sizeof (struct s7_insn_to_dependency)); - new->insn_name = obstack_alloc (&dependency_obstack, len + 1); + new_i2d = (struct s7_insn_to_dependency *) + obstack_alloc (&dependency_obstack, + sizeof (struct s7_insn_to_dependency)); + new_i2d->insn_name = (char *) obstack_alloc (&dependency_obstack, + len + 1); - strcpy (new->insn_name, tmp->insn_name); - new->type = tmp->type; - hash_insert (s7_dependency_insn_hsh, new->insn_name, (void *) new); + strcpy (new_i2d->insn_name, tmp->insn_name); + new_i2d->type = tmp->type; + hash_insert (s7_dependency_insn_hsh, new_i2d->insn_name, + (void *) new_i2d); } } @@ -5238,8 +5245,8 @@ s7_b32_relax_to_b16 (fragS * fragp) { int grows = 0; int relaxable_p = 0; - int old; - int new; + int r_old; + int r_new; int frag_addr = fragp->fr_address + fragp->insn_addr; addressT symbol_address = 0; @@ -5253,8 +5260,8 @@ s7_b32_relax_to_b16 (fragS * fragp) so in relax stage , it may be wrong to calculate the symbol's offset when the frag's section is different from the symbol's. */ - old = s7_RELAX_OLD (fragp->fr_subtype); - new = s7_RELAX_NEW (fragp->fr_subtype); + r_old = s7_RELAX_OLD (fragp->fr_subtype); + r_new = s7_RELAX_NEW (fragp->fr_subtype); relaxable_p = s7_RELAX_OPT (fragp->fr_subtype); s = fragp->fr_symbol; @@ -6575,28 +6582,28 @@ s7_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, fragS * fragp) { - int old; - int new; + int r_old; + int r_new; char backup[20]; fixS *fixp; - old = s7_RELAX_OLD (fragp->fr_subtype); - new = s7_RELAX_NEW (fragp->fr_subtype); + r_old = s7_RELAX_OLD (fragp->fr_subtype); + r_new = s7_RELAX_NEW (fragp->fr_subtype); /* fragp->fr_opcode indicates whether this frag should be relaxed. */ if (fragp->fr_opcode == NULL) { - memcpy (backup, fragp->fr_literal, old); - fragp->fr_fix = old; + memcpy (backup, fragp->fr_literal, r_old); + fragp->fr_fix = r_old; } else { - memcpy (backup, fragp->fr_literal + old, new); - fragp->fr_fix = new; + memcpy (backup, fragp->fr_literal + r_old, r_new); + fragp->fr_fix = r_new; } fixp = fragp->tc_frag_data.fixp; - while (fixp && fixp->fx_frag == fragp && fixp->fx_where < old) + while (fixp && fixp->fx_frag == fragp && fixp->fx_where < r_old) { if (fragp->fr_opcode) fixp->fx_done = 1; @@ -6605,7 +6612,7 @@ s7_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, while (fixp && fixp->fx_frag == fragp) { if (fragp->fr_opcode) - fixp->fx_where -= old + fragp->insn_addr; + fixp->fx_where -= r_old + fragp->insn_addr; else fixp->fx_done = 1; fixp = fixp->fx_next; |