X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gas%2Fconfig%2Ftc-sh.c;h=55966e0376cdd0423e8b6d5a21d1dbc610bf06c3;hb=feb4bea70a297eb6316d1b0685bbbb8095b7fb29;hp=1bb6d7179cf69e4fb17c0529e983b28fbb788697;hpb=e1fa0163505af867009ea73fc5f705162120e795;p=deliverable%2Fbinutils-gdb.git diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index 1bb6d7179c..55966e0376 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -987,7 +987,7 @@ static int reg_b; /* Try to parse a reg name. Return the number of chars consumed. */ static unsigned int -parse_reg_without_prefix (char *src, int *mode, int *reg) +parse_reg_without_prefix (char *src, sh_arg_type *mode, int *reg) { char l0 = TOLOWER (src[0]); char l1 = l0 ? TOLOWER (src[1]) : 0; @@ -1346,7 +1346,7 @@ parse_reg_without_prefix (char *src, int *mode, int *reg) $-prefixed register names if enabled by the user. */ static unsigned int -parse_reg (char *src, int *mode, int *reg) +parse_reg (char *src, sh_arg_type *mode, int *reg) { unsigned int prefix; unsigned int consumed; @@ -1411,7 +1411,7 @@ static char * parse_at (char *src, sh_operand_info *op) { int len; - int mode; + sh_arg_type mode; src++; if (src[0] == '@') { @@ -1583,7 +1583,7 @@ static void get_operand (char **ptr, sh_operand_info *op) { char *src = *ptr; - int mode = -1; + sh_arg_type mode = (sh_arg_type) -1; unsigned int len; if (src[0] == '#') @@ -2235,7 +2235,8 @@ get_specific (sh_opcode_info *opcode, sh_operand_info *operands) } static void -insert (char *where, int how, int pcrel, sh_operand_info *op) +insert (char *where, bfd_reloc_code_real_type how, int pcrel, + sh_operand_info *op) { fix_new_exp (frag_now, where - frag_now->fr_literal, @@ -2246,7 +2247,8 @@ insert (char *where, int how, int pcrel, sh_operand_info *op) } static void -insert4 (char * where, int how, int pcrel, sh_operand_info * op) +insert4 (char * where, bfd_reloc_code_real_type how, int pcrel, + sh_operand_info * op) { fix_new_exp (frag_now, where - frag_now->fr_literal, @@ -2412,11 +2414,13 @@ build_Mytes (sh_opcode_info *opcode, sh_operand_info *operand) break; case IMM0_3s: nbuf[indx] |= 0x08; + /* Fall through. */ case IMM0_3c: insert (output + low_byte, BFD_RELOC_SH_IMM3, 0, operand); break; case IMM0_3Us: nbuf[indx] |= 0x80; + /* Fall through. */ case IMM0_3Uc: insert (output + low_byte, BFD_RELOC_SH_IMM3U, 0, operand); break; @@ -3089,7 +3093,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED) /* Various routines to kill one day. */ -char * +const char * md_atof (int type, char *litP, int *sizeP) { return ieee_md_atof (type, litP, sizeP, target_big_endian); @@ -3180,7 +3184,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) { @@ -4424,8 +4428,8 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) arelent *rel; bfd_reloc_code_real_type r_type; - rel = (arelent *) xmalloc (sizeof (arelent)); - rel->sym_ptr_ptr = (asymbol **) 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;