m68k: tag floating-point ABI used
[deliverable/binutils-gdb.git] / gas / config / tc-m68k.c
index cbb227a333dfa930cb31e535e2b8e64272b1d8ff..6ffc9432855ec080606b182eb40e3d4c09355bc5 100644 (file)
@@ -30,6 +30,7 @@
 #include "elf/m68k.h"
 
 static void m68k_elf_cons (int);
+static void m68k_elf_gnu_attribute (int);
 
 /* This string holds the chars that always start a comment.  If the
    pre-processor is disabled, these aren't very useful.  The macro
@@ -889,6 +890,7 @@ const pseudo_typeS md_pseudo_table[] =
 
   {"arch", s_m68k_arch, 0},
   {"cpu", s_m68k_cpu, 0},
+  {"gnu_attribute", m68k_elf_gnu_attribute, 0},
 
   /* The following pseudo-ops are supported for MRI compatibility.  */
   {"chip", s_chip, 0},
@@ -7951,6 +7953,24 @@ m68k_elf_cons (int nbytes /* 4=.long */)
   demand_empty_rest_of_line ();
 }
 
+/* Parse a .gnu_attribute directive.  */
+static void
+m68k_elf_gnu_attribute (int ignored ATTRIBUTE_UNUSED)
+{
+  int tag = obj_elf_vendor_attribute (OBJ_ATTR_GNU);
+
+  /* Check validity of defined m68k tags.  */
+  if (tag == Tag_GNU_M68K_ABI_FP)
+    {
+      unsigned int val;
+
+      val = bfd_elf_get_obj_attr_int (stdoutput, OBJ_ATTR_GNU, tag);
+
+      if (tag == Tag_GNU_M68K_ABI_FP && val > 2)
+       as_warn (_("unknown .gnu_attribute value"));
+    }
+}
+
 int
 tc_m68k_regname_to_dw2regnum (const char *regname)
 {
This page took 0.023566 seconds and 4 git commands to generate.