2013-11-03 23:08:33 +00:00
|
|
|
Enable the workaround for the Loongson 2F bug by default.
|
|
|
|
|
|
|
|
Patch by Mark H Weaver <mhw@netris.org>.
|
|
|
|
|
|
|
|
--- binutils/gas/config/tc-mips.c.orig 2012-09-04 10:21:03.000000000 -0400
|
|
|
|
+++ binutils/gas/config/tc-mips.c 2013-10-06 02:23:21.651983768 -0400
|
2021-07-19 18:44:27 +00:00
|
|
|
@@ -934,10 +934,10 @@ enum fix_vr4120_class
|
2013-11-03 23:08:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* ...likewise -mfix-loongson2f-jump. */
|
2021-07-19 18:44:27 +00:00
|
|
|
-static bool mips_fix_loongson2f_jump;
|
|
|
|
+static bool mips_fix_loongson2f_jump = FALSE;
|
2013-11-03 23:08:33 +00:00
|
|
|
|
|
|
|
/* ...likewise -mfix-loongson2f-nop. */
|
2021-07-19 18:44:27 +00:00
|
|
|
-static bool mips_fix_loongson2f_nop;
|
2021-07-27 10:32:31 +00:00
|
|
|
+static bool mips_fix_loongson2f_nop = TRUE;
|
2013-11-03 23:08:33 +00:00
|
|
|
|
|
|
|
/* True if -mfix-loongson2f-nop or -mfix-loongson2f-jump passed. */
|
2021-07-19 18:44:27 +00:00
|
|
|
static bool mips_fix_loongson2f;
|
2013-11-03 23:08:33 +00:00
|
|
|
--- binutils/gas/testsuite/gas/mips/mips.exp.orig 2012-09-04 10:17:13.000000000 -0400
|
|
|
|
+++ binutils/gas/testsuite/gas/mips/mips.exp 2013-10-06 02:23:21.663983768 -0400
|
2021-07-19 18:44:27 +00:00
|
|
|
@@ -110,6 +110,12 @@ proc mips_arch_init {} {
|
2013-11-03 23:08:33 +00:00
|
|
|
|
|
|
|
# Catch because the variable won't be set the first time through.
|
|
|
|
catch {unset mips_arches}
|
|
|
|
+
|
|
|
|
+ # Disable the loongson2f nop fix by default, because most of the
|
|
|
|
+ # existing test cases for mips will fail otherwise.
|
|
|
|
+ global ASFLAGS
|
|
|
|
+ set old_ASFLAGS "$ASFLAGS"
|
|
|
|
+ set ASFLAGS "$ASFLAGS -mno-fix-loongson2f-nop"
|
|
|
|
}
|
|
|
|
|
|
|
|
# mips_arch_create ARCH GPRSIZE EXTENDS PROPS AS_FLAGS OBJDUMP_FLAGS \
|