Teach as(1) to handle the arm .arch_extension pseudo-op, which accepts

the same values as the -march= command line option.  Add support for the
"sec" extension (security extensions).

We've been getting away without support for the sec extension because
it's bogusly enabled even on arches where its presence is optional.  This
support for .arch_extension is being added mainly so that we can use the
right directives in our source code, and that helps folks using external
toolchains (and will help us when we finally update our toolchain).
This commit is contained in:
Ian Lepore 2014-08-01 20:30:24 +00:00
parent b7ea64e98d
commit 2d0ef32f84
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269394

View file

@ -3837,6 +3837,7 @@ s_arm_eabi_attribute (int ignored ATTRIBUTE_UNUSED)
#endif /* OBJ_ELF */
static void s_arm_arch (int);
static void s_arm_arch_extension (int);
static void s_arm_object_arch (int);
static void s_arm_cpu (int);
static void s_arm_fpu (int);
@ -3891,6 +3892,7 @@ const pseudo_typeS md_pseudo_table[] =
{ "syntax", s_syntax, 0 },
{ "cpu", s_arm_cpu, 0 },
{ "arch", s_arm_arch, 0 },
{ "arch_extension", s_arm_arch_extension, 0 },
{ "object_arch", s_arm_object_arch, 0 },
{ "fpu", s_arm_fpu, 0 },
#ifdef OBJ_ELF
@ -20154,6 +20156,7 @@ static const struct arm_option_cpu_value_table arm_extensions[] =
{"xscale", ARM_FEATURE (0, ARM_CEXT_XSCALE)},
{"iwmmxt", ARM_FEATURE (0, ARM_CEXT_IWMMXT)},
{"iwmmxt2", ARM_FEATURE (0, ARM_CEXT_IWMMXT2)},
{"sec", ARM_FEATURE (ARM_EXT_V6Z, 0)},
{NULL, ARM_ARCH_NONE}
};
@ -20738,6 +20741,34 @@ s_arm_arch (int ignored ATTRIBUTE_UNUSED)
ignore_rest_of_line ();
}
/* Parse a .arch_extension directive. */
static void
s_arm_arch_extension (int ignored ATTRIBUTE_UNUSED)
{
const struct arm_option_cpu_value_table *opt;
char saved_char;
char *name;
name = input_line_pointer;
while (*input_line_pointer && !ISSPACE(*input_line_pointer))
input_line_pointer++;
saved_char = *input_line_pointer;
*input_line_pointer = 0;
for (opt = arm_extensions; opt->name != NULL; opt++)
if (streq (opt->name, name))
{
ARM_MERGE_FEATURE_SETS (cpu_variant, cpu_variant, opt->value);
*input_line_pointer = saved_char;
demand_empty_rest_of_line ();
return;
}
as_bad (_("unknown architecture `%s'\n"), name);
*input_line_pointer = saved_char;
ignore_rest_of_line ();
}
/* Parse a .object_arch directive. */