+2014-05-08 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * config/tc-mips.c (streq): Define.
+ (mips_convert_symbolic_attribute): New function.
+ * config/tc-mips.h (CONVERT_SYMBOLIC_ATTRIBUTE): Define.
+ (mips_convert_symbolic_attribute): New prototype.
+
2014-05-02 Max Filippov <jcmvbkbc@gmail.com>
* config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF*
#define DBG(x)
#endif
+#define streq(a, b) (strcmp (a, b) == 0)
+
#define SKIP_SPACE_TABS(S) \
do { while (*(S) == ' ' || *(S) == '\t') ++(S); } while (0)
return regnum;
}
+
+/* Implement CONVERT_SYMBOLIC_ATTRIBUTE.
+ Given a symbolic attribute NAME, return the proper integer value.
+ Returns -1 if the attribute is not known. */
+
+int
+mips_convert_symbolic_attribute (const char *name)
+{
+ static const struct
+ {
+ const char * name;
+ const int tag;
+ }
+ attribute_table[] =
+ {
+#define T(tag) {#tag, tag}
+ T (Tag_GNU_MIPS_ABI_FP),
+ T (Tag_GNU_MIPS_ABI_MSA),
+#undef T
+ };
+ unsigned int i;
+
+ if (name == NULL)
+ return -1;
+
+ for (i = 0; i < ARRAY_SIZE (attribute_table); i++)
+ if (streq (name, attribute_table[i].name))
+ return attribute_table[i].tag;
+
+ return -1;
+}
64-bit form for n64 CFIs. */
#define CFI_DIFF_EXPR_OK 0
+#define CONVERT_SYMBOLIC_ATTRIBUTE(name) mips_convert_symbolic_attribute (name)
+extern int mips_convert_symbolic_attribute (const char *);
+
#endif /* TC_MIPS */
+2014-05-08 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * gas/mips/attr-gnu-abi-fp-1.s: New.
+ * gas/mips/attr-gnu-abi-fp-1.d: New.
+ * gas/mips/attr-gnu-abi-msa-1.s: New.
+ * gas/mips/attr-gnu-abi-msa-1.d: New.
+ * gas/mips/mips.exp: Add new tests.
+
2014-05-07 Andrew Bennett <andrew.bennett@imgtec.com>
* gas/mips/mips.exp: Add MIPS32r5 tests. Also add the mips32r3,
--- /dev/null
+#as: -32
+#source: attr-gnu-abi-fp-1.s
+#readelf: -A
+#name: MIPS gnu_attribute Tag_GNU_MIPS_ABI_FP,1
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_FP: Hard float \(double precision\)
--- /dev/null
+.gnu_attribute Tag_GNU_MIPS_ABI_FP,1
--- /dev/null
+#source: attr-gnu-abi-msa-1.s
+#readelf: -A
+#name: MIPS gnu_attribute Tag_GNU_MIPS_ABI_MSA,1
+
+Attribute Section: gnu
+File Attributes
+ Tag_GNU_MIPS_ABI_MSA: 128-bit MSA
--- /dev/null
+.gnu_attribute Tag_GNU_MIPS_ABI_MSA,1
run_dump_test "pcrel-4-n32"
run_dump_test "pcrel-4-64"
}
+
+ run_dump_test "attr-gnu-abi-fp-1"
+ run_dump_test "attr-gnu-abi-msa-1"
}