This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Attachment: binutils-master-aarch64-features-only.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]