char saved_char;
name = input_line_pointer;
-
- while (*input_line_pointer != 0
- && *input_line_pointer != ' '
- && *input_line_pointer != '\n')
- ++input_line_pointer;
-
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
default:
as_bad (_("invalid operand to .code directive (%d) (expecting 16 or 32)"), temp);
}
+ demand_empty_rest_of_line ();
}
static void
static void
s_thumb_func (int ignore ATTRIBUTE_UNUSED)
{
- s_thumb (0);
+ s_thumb (0); /* Will check for end-of-line. */
/* The following label is the name/address of the start of a Thumb function.
We need to know this for the interworking support. */
literal_pool * pool;
char sym_name[20];
+ demand_empty_rest_of_line ();
pool = find_literal_pool ();
if (pool == NULL
|| pool->symbol == NULL
char saved_char;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
+ if (!*name)
+ {
+ as_bad (_(".cpu: missing cpu name"));
+ *input_line_pointer = saved_char;
+ return;
+ }
+
/* Skip the first "all" entry. */
for (opt = arm_cpus + 1; opt->name != NULL; opt++)
if (streq (opt->name, name))
}
as_bad (_("unknown cpu `%s'"), name);
*input_line_pointer = saved_char;
- ignore_rest_of_line ();
}
/* Parse a .arch directive. */
char *name;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
+ if (!*name)
+ {
+ as_bad (_(".arch: missing architecture name"));
+ *input_line_pointer = saved_char;
+ return;
+ }
+
/* Skip the first "all" entry. */
for (opt = arm_archs + 1; opt->name != NULL; opt++)
if (streq (opt->name, name))
char *name;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
+ if (!*name)
+ {
+ as_bad (_(".object_arch: missing architecture name"));
+ *input_line_pointer = saved_char;
+ return;
+ }
+
/* Skip the first "all" entry. */
for (opt = arm_archs + 1; opt->name != NULL; opt++)
if (streq (opt->name, name))
int adding_value = 1;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
+ if (!*name)
+ {
+ as_bad (_(".arch_extension: missing architecture extension"));
+ *input_line_pointer = saved_char;
+ return;
+ }
+
if (strlen (name) >= 2
&& startswith (name, "no"))
{
as_bad (_("unknown architecture extension `%s'\n"), name);
*input_line_pointer = saved_char;
- ignore_rest_of_line ();
}
/* Parse a .fpu directive. */
char *name;
name = input_line_pointer;
- while (*input_line_pointer && !ISSPACE (*input_line_pointer))
- input_line_pointer++;
+ input_line_pointer = find_end_of_line (input_line_pointer, flag_m68k_mri);
saved_char = *input_line_pointer;
*input_line_pointer = 0;
+ if (!*name)
+ {
+ as_bad (_(".fpu: missing fpu name"));
+ *input_line_pointer = saved_char;
+ return;
+ }
+
for (opt = arm_fpus; opt->name != NULL; opt++)
if (streq (opt->name, name))
{
#endif
ARM_MERGE_FEATURE_SETS (cpu_variant, selected_cpu, selected_fpu);
*input_line_pointer = saved_char;
- demand_empty_rest_of_line ();
return;
}