diff options
author | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-05-28 22:31:07 -0400 |
---|---|---|
committer | Trevor Saunders <tbsaunde+binutils@tbsaunde.org> | 2016-06-05 23:27:41 -0400 |
commit | c4212e111cdd46d3b7da8b60c5adf39b8654e3c6 (patch) | |
tree | 28a0450d38cf8f93ba98c135f9672b93705d283e /gas/config/tc-sh64.c | |
parent | b5966800eaa13f4b886f94fed01a7fdfac2b3965 (diff) | |
download | gdb-c4212e111cdd46d3b7da8b60c5adf39b8654e3c6.zip gdb-c4212e111cdd46d3b7da8b60c5adf39b8654e3c6.tar.gz gdb-c4212e111cdd46d3b7da8b60c5adf39b8654e3c6.tar.bz2 |
sh{,64}: make arg type enum
The values are always members of the enum, except the two places -1 is assigned
only to playcate -Wuninitialized because gcc isn't or at least didn't used to
be smart enough to figure out its only used if it was set.
gas/ChangeLog:
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.
Diffstat (limited to 'gas/config/tc-sh64.c')
-rw-r--r-- | gas/config/tc-sh64.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/config/tc-sh64.c b/gas/config/tc-sh64.c index 4de044c..d4627f8 100644 --- a/gas/config/tc-sh64.c +++ b/gas/config/tc-sh64.c @@ -133,7 +133,8 @@ static const unsigned char shmedia_little_nop_pattern[4] = }; 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); @@ -1611,7 +1612,8 @@ shmedia_immediate_op (char *where, shmedia_operand_info *op, int pcrel, 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; @@ -2222,7 +2224,7 @@ shmedia_get_operand (char **ptr, shmedia_operand_info *op, 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); |