Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/binutils/dist/gas/config try to fix loongson h...
details: https://anonhg.NetBSD.org/src/rev/ba5031d7da7c
branches: trunk
changeset: 343312:ba5031d7da7c
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 29 17:01:55 2016 +0000
description:
try to fix loongson hacks.
diffstat:
external/gpl3/binutils/dist/gas/config/tc-mips.c | 34 ++++++++++++++++++++---
1 files changed, 29 insertions(+), 5 deletions(-)
diffs (72 lines):
diff -r 1ddaeb46fc15 -r ba5031d7da7c external/gpl3/binutils/dist/gas/config/tc-mips.c
--- a/external/gpl3/binutils/dist/gas/config/tc-mips.c Fri Jan 29 16:23:51 2016 +0000
+++ b/external/gpl3/binutils/dist/gas/config/tc-mips.c Fri Jan 29 17:01:55 2016 +0000
@@ -1488,6 +1488,8 @@
OPTION_NAN,
OPTION_ODD_SPREG,
OPTION_NO_ODD_SPREG,
+ OPTION_FIX_LOONGSON2F_BTB,
+ OPTION_NO_FIX_LOONGSON2F_BTB,
OPTION_END_OF_ENUM
};
@@ -1559,6 +1561,8 @@
{"mno-fix-loongson2f-jump", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_JUMP},
{"mfix-loongson2f-nop", no_argument, NULL, OPTION_FIX_LOONGSON2F_NOP},
{"mno-fix-loongson2f-nop", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_NOP},
+ {"mfix-loongson2f-btb", no_argument, NULL, OPTION_FIX_LOONGSON2F_BTB},
+ {"mno-fix-loongson2f-btb", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_BTB},
{"mfix-vr4120", no_argument, NULL, OPTION_FIX_VR4120},
{"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120},
{"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130},
@@ -5596,11 +5600,6 @@
| (frame_size & 0x0f));
}
- if (mips_fix_loongson2f)
- fix_loongson2f (ip);
- if (mips_trap_zero_jump)
- trap_zero_jump (ip);
-
/* If the branch is itself the target of a branch, we can not swap.
We cheat on this; all we check for is whether there is a label on
this instruction. If there are any branches to anything other than
@@ -6682,6 +6681,11 @@
if (mips_opts.mips16 && history[0].fixp[0])
return FALSE;
+ if (mips_fix_loongson2f)
+ fix_loongson2f (ip);
+ if (mips_trap_zero_jump)
+ trap_zero_jump (ip);
+
/* If the branch is itself the target of a branch, we can not swap.
We cheat on this; all we check for is whether there is a label on
this instruction. If there are any branches to anything other than
@@ -11011,6 +11015,26 @@
macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", op[0], tempreg, breg);
break;
+ case M_JR_S:
+ macro_build_jrpatch (&expr1, op[2]);
+ macro_build (NULL, "jr", "s", op[2]);
+ return; /* didn't modify $at */
+
+ case M_J_S:
+ macro_build_jrpatch (&expr1, op[2]);
+ macro_build (NULL, "j", "s", op[2]);
+ return; /* didn't modify $at */
+
+ case M_JALR_S:
+ macro_build_jrpatch (&expr1, op[2]);
+ macro_build (NULL, "jalr", "s", op[2]);
+ return; /* didn't modify $at */
+
+ case M_JALR_DS:
+ macro_build_jrpatch (&expr1, op[2]);
+ macro_build (NULL, "jalr", "d,s", op[0], op[2]);
+ return; /* didn't modify $at */
+
case M_MSGSND:
gas_assert (!mips_opts.micromips);
macro_build (NULL, "c2", "C", (op[0] << 16) | 0x01);
Home |
Main Index |
Thread Index |
Old Index