+2017-06-29 Anton Kolesov <Anton.Kolesov@synopsys.com>
+
+ * arc-dis.c (parse_disassembler_options): Use
+ FOR_EACH_DISASSEMBLER_OPTION.
+
2017-06-29 Anton Kolesov <Anton.Kolesov@synopsys.com>
* arc-dis.c (parse_option): Use disassembler_options_cmp to compare
static void
parse_disassembler_options (const char *options)
{
+ const char *option;
+
if (options == NULL)
return;
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. */
- if (strncmp (options, "cpu=", 4) == 0)
+ if (strncmp (option, "cpu=", 4) == 0)
/* Strip leading `cpu=`. */
- enforced_isa_mask = parse_cpu_option (options + 4);
+ enforced_isa_mask = parse_cpu_option (option + 4);
else
- parse_option (options);
-
- while (*options != ',' && *options != '\0')
- ++ options;
+ parse_option (option);
}
}