[PATCH] aarch64: allow adding/removing just feature flags via .arch

Jan Beulich JBeulich@suse.com
Mon Oct 20 09:23:00 GMT 2014
Rather than requiring to always also set/change the base architecture,
allow that part to be omitted, making it possible to en-/disabled and
then dis-/enable again just certain of the architecture extensions.

Supporting the same for .cpu seemed questionable to me, so is not
being done here.

gas/
2014-10-20  Jan Beulich <jbeulich@suse.com>

	* config/tc-aarch64.c (s_aarch64_arch): .

--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -7611,6 +7611,21 @@ s_aarch64_arch (int ignored ATTRIBUTE_UN
   else
     optlen = strlen (name);
 
+  if ( ext == name )
+    {
+      aarch64_feature_set extra = cpu_variant;
+
+      mcpu_cpu_opt = &extra;
+      if (!aarch64_parse_features (ext, &mcpu_cpu_opt))
+	return;
+
+      cpu_variant = *mcpu_cpu_opt;
+
+      *input_line_pointer = saved_char;
+      demand_empty_rest_of_line ();
+      return;
+    }
+
   /* Skip the first "all" entry.  */
   for (opt = aarch64_archs + 1; opt->name != NULL; opt++)
     if (strlen (opt->name) == optlen



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-master-aarch64-features-only.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20141020/8b84f717/attachment.ksh>


More information about the Binutils mailing list