+2016-06-05  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+       * config/tc-sh.c (parse_reg): Change type of mode argument to
+       sh_arg_type.
+       (get_operand): Adjust.
+       (insert): Change type of how to bfd_reloc_code_real_type.
+       (insert4): Likewise.
+       * config/tc-sh64.c (shmedia_get_operand): Adjust.
+       (shmedia_parse_reg): Change type of mode to shmedia_arg_type.
+
 2016-06-05  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
        * config/tc-nds32.c (nds32_parse_option): Make the type of ptr_arg
 
 /* 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;
    $-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;
 parse_at (char *src, sh_operand_info *op)
 {
   int len;
-  int mode;
+  sh_arg_type mode;
   src++;
   if (src[0] == '@')
     {
 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] == '#')
 }
 
 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,
 }
 
 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,
 
  };
 
 static void shmedia_md_begin (void);
-static int shmedia_parse_reg (char *, int *, int *, shmedia_arg_type);
+static int shmedia_parse_reg (char *, shmedia_arg_type *, int *,
+                             shmedia_arg_type);
 static void shmedia_md_assemble (char *);
 static void shmedia_md_apply_fix (fixS *, valueT *);
 static int shmedia_md_estimate_size_before_relax (fragS *, segT);
    chars consumed.  */
 
 static int
-shmedia_parse_reg (char *src, int *mode, int *reg, shmedia_arg_type argtype)
+shmedia_parse_reg (char *src, shmedia_arg_type *mode, int *reg,
+                  shmedia_arg_type argtype)
 {
   int l0 = TOLOWER (src[0]);
   int l1 = l0 ? TOLOWER (src[1]) : 0;
                     shmedia_arg_type argtype)
 {
   char *src = *ptr;
-  int mode = -1;
+  shmedia_arg_type mode = (shmedia_arg_type) -1;
   unsigned int len;
 
   len = shmedia_parse_reg (src, &mode, &(op->reg), argtype);