X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-pj.c;h=37fd4814977f8a66b3f07333baee2ba847a88912;hb=73b090a922a5f43931f0ec10b1b1b9507c819ebf;hp=9c3566f62ddd5474530cd3f0180b4199a0a9d0bc;hpb=9c2799c243988c1a6d3fe93c7c2c06599672068d;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-pj.c b/gas/config/tc-pj.c index 9c3566f62d..37fd481497 100644 --- a/gas/config/tc-pj.c +++ b/gas/config/tc-pj.c @@ -1,6 +1,5 @@ /* tc-pj.c -- Assemble code for Pico Java - Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2007 - Free Software Foundation, Inc. + Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -97,7 +96,8 @@ parse_exp_save_ilp (char *s, expressionS *op) we want to handle magic pending reloc expressions specially. */ void -pj_cons_fix_new_pj (fragS *frag, int where, int nbytes, expressionS *exp) +pj_cons_fix_new_pj (fragS *frag, int where, int nbytes, expressionS *exp, + bfd_reloc_code_real_type r ATTRIBUTE_UNUSED) { static int rv[5][2] = { { 0, 0 }, @@ -171,7 +171,7 @@ static void fake_opcode (const char *name, void (*func) (struct pj_opc_info_t *, char *)) { - pj_opc_info_t * fake = xmalloc (sizeof (pj_opc_info_t)); + pj_opc_info_t * fake = XNEW (pj_opc_info_t); fake->opcode = -1; fake->opcode_next = -1; @@ -183,9 +183,9 @@ fake_opcode (const char *name, can have another name. */ static void -alias (const char *new, const char *old) +alias (const char *new_name, const char *old) { - hash_insert (opcode_hash_control, new, + hash_insert (opcode_hash_control, new_name, (char *) hash_find (opcode_hash_control, old)); } @@ -261,6 +261,7 @@ md_assemble (char *str) return; } + dwarf2_emit_insn (0); if (opcode->opcode == -1) { /* It's a fake opcode. Dig out the args and pretend that was @@ -285,7 +286,7 @@ md_assemble (char *str) op_end++; if (*op_end == 0) - as_bad ("expected expresssion"); + as_bad (_("expected expression")); op_end = parse_exp_save_ilp (op_end, &arg); @@ -304,16 +305,15 @@ md_assemble (char *str) op_end++; if (*op_end != 0) - as_warn ("extra stuff on line ignored"); + as_warn (_("extra stuff on line ignored")); } if (pending_reloc) - as_bad ("Something forgot to clean up\n"); - + as_bad (_("Something forgot to clean up\n")); } -char * +const char * md_atof (int type, char *litP, int *sizeP) { return ieee_md_atof (type, litP, sizeP, target_big_endian); @@ -333,7 +333,7 @@ struct option md_longopts[] = size_t md_longopts_size = sizeof (md_longopts); int -md_parse_option (int c, char *arg ATTRIBUTE_UNUSED) +md_parse_option (int c, const char *arg ATTRIBUTE_UNUSED) { switch (c) { @@ -366,10 +366,8 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED) char *buf = fixP->fx_where + fixP->fx_frag->fr_literal; long val = *valP; long max, min; - int shift; max = min = 0; - shift = 0; switch (fixP->fx_r_type) { case BFD_RELOC_VTABLE_INHERIT: @@ -474,8 +472,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) arelent *rel; bfd_reloc_code_real_type r_type; - rel = xmalloc (sizeof (arelent)); - rel->sym_ptr_ptr = xmalloc (sizeof (asymbol *)); + rel = XNEW (arelent); + rel->sym_ptr_ptr = XNEW (asymbol *); *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); rel->address = fixp->fx_frag->fr_address + fixp->fx_where;