projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ARC] Use FOR_EACH_DISASSEMBLER_OPTION to iterate over options
[deliverable/binutils-gdb.git]
/
opcodes
/
arc-dis.c
diff --git
a/opcodes/arc-dis.c
b/opcodes/arc-dis.c
index b46424a7c5ff40552a9225097d75e19950017555..addd75c467681ae901c433f7b9604f6c40faa3c0 100644
(file)
--- a/
opcodes/arc-dis.c
+++ b/
opcodes/arc-dis.c
@@
-823,6
+823,8
@@
parse_cpu_option (const char *option)
static void
parse_disassembler_options (const char *options)
{
static void
parse_disassembler_options (const char *options)
{
+ const char *option;
+
if (options == NULL)
return;
if (options == NULL)
return;
@@
-832,25
+834,15
@@
parse_disassembler_options (const char *options)
CPU when new options are being parsed. */
enforced_isa_mask = ARC_OPCODE_NONE;
CPU when new options are being parsed. */
enforced_isa_mask = ARC_OPCODE_NONE;
-
while (*
options)
+
FOR_EACH_DISASSEMBLER_OPTION (option,
options)
{
{
- /* Skip empty options. */
- if (*options == ',')
- {
- ++ options;
- continue;
- }
-
/* A CPU option? Cannot use STRING_COMMA_LEN because strncmp is also a
preprocessor macro. */
/* A CPU option? Cannot use STRING_COMMA_LEN because strncmp is also a
preprocessor macro. */
- if (strncmp (option
s
, "cpu=", 4) == 0)
+ if (strncmp (option, "cpu=", 4) == 0)
/* Strip leading `cpu=`. */
/* Strip leading `cpu=`. */
- enforced_isa_mask = parse_cpu_option (option
s
+ 4);
+ enforced_isa_mask = parse_cpu_option (option + 4);
else
else
- parse_option (options);
-
- while (*options != ',' && *options != '\0')
- ++ options;
+ parse_option (option);
}
}
}
}
This page took
0.025347 seconds
and
4
git commands to generate.