On 07/12/18 16:32, Richard Sandiford wrote: > "Kyrill Tkachov" writes: >> @@ -10834,6 +10836,34 @@ aarch64_parse_tune_string (const char *tune_string, >> "tune="); >> } >> >> +/* Parse the sve_width tuning moverride string in TUNE_STRING. >> + Accept the valid SVE vector widths allowed by >> + aarch64_sve_vector_bits_enum and use it to override sve_width >> + in TUNE. */ >> + >> +static void >> +aarch64_parse_sve_width_string (const char *tune_string, >> + struct tune_params *tune) >> +{ >> + int width = -1; >> + >> + int n = sscanf (tune_string, "%d", &width); >> + if (n == EOF) >> + error ("invalid format for sve_width"); > Should probably return here, otherwise we'll report a second > error for width == -1. > >> + switch (width) >> + { >> + case SVE_128: >> + case SVE_256: >> + case SVE_512: >> + case SVE_1024: >> + case SVE_2048: >> + break; >> + default: >> + error ("invalid sve_width value: %d", width); >> + } >> + tune->sve_width = (enum aarch64_sve_vector_bits_enum) width; >> +} > Formatting nit: cases should line up with the "{". > > OK with those changes, thanks. Thanks Richard. This is what I've committed with r266898. Kyrill > Richard