|
|
a094f6 |
commit 8514e4db84ccafaf3be07e842be2fa2001ba876e
|
|
|
a094f6 |
Author: Alan Modra <amodra@gmail.com>
|
|
|
a094f6 |
Date: Fri Nov 28 13:21:52 2014 +1030
|
|
|
a094f6 |
|
|
|
a094f6 |
Don't deprecate powerpc mftb insn
|
|
|
a094f6 |
|
|
|
a094f6 |
mftb is marked phased out in the architecture manual, but we can keep
|
|
|
a094f6 |
it as an extended mnemonic for mftbl.
|
|
|
a094f6 |
|
|
|
a094f6 |
* ppc-opc.c (powerpc_opcodes <mftb>): Don't deprecate for power7.
|
|
|
a094f6 |
(TB): Delete.
|
|
|
a094f6 |
(insert_tbr, extract_tbr): Validate tbr number.
|
|
|
a094f6 |
|
|
|
a094f6 |
### a/opcodes/ChangeLog
|
|
|
a094f6 |
### b/opcodes/ChangeLog
|
|
|
a094f6 |
## -1,3 +1,9 @@
|
|
|
a094f6 |
+2014-11-28 Alan Modra <amodra@gmail.com>
|
|
|
a094f6 |
+
|
|
|
a094f6 |
+ * ppc-opc.c (powerpc_opcodes <mftb>): Don't deprecate for power7.
|
|
|
a094f6 |
+ (TB): Delete.
|
|
|
a094f6 |
+ (insert_tbr, extract_tbr): Validate tbr number.
|
|
|
a094f6 |
+
|
|
|
a094f6 |
2014-11-24 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
a094f6 |
|
|
|
a094f6 |
* configure: Regenerated.
|
|
|
a094f6 |
--- a/opcodes/ppc-opc.c
|
|
|
a094f6 |
+++ b/opcodes/ppc-opc.c
|
|
|
a094f6 |
@@ -1872,28 +1872,30 @@ extract_sprg (unsigned long insn,
|
|
|
a094f6 |
much, since the architecture manual does not define mftb as
|
|
|
a094f6 |
accepting any values other than 268 or 269. */
|
|
|
a094f6 |
|
|
|
a094f6 |
-#define TB (268)
|
|
|
a094f6 |
-
|
|
|
a094f6 |
static unsigned long
|
|
|
a094f6 |
insert_tbr (unsigned long insn,
|
|
|
a094f6 |
long value,
|
|
|
a094f6 |
ppc_cpu_t dialect ATTRIBUTE_UNUSED,
|
|
|
a094f6 |
- const char **errmsg ATTRIBUTE_UNUSED)
|
|
|
a094f6 |
+ const char **errmsg)
|
|
|
a094f6 |
{
|
|
|
a094f6 |
if (value == 0)
|
|
|
a094f6 |
- value = TB;
|
|
|
a094f6 |
+ value = 268;
|
|
|
a094f6 |
+ if (value != 268 && value != 269)
|
|
|
a094f6 |
+ *errmsg = _("invalid tbr number");
|
|
|
a094f6 |
return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
|
|
|
a094f6 |
}
|
|
|
a094f6 |
|
|
|
a094f6 |
static long
|
|
|
a094f6 |
extract_tbr (unsigned long insn,
|
|
|
a094f6 |
ppc_cpu_t dialect ATTRIBUTE_UNUSED,
|
|
|
a094f6 |
- int *invalid ATTRIBUTE_UNUSED)
|
|
|
a094f6 |
+ int *invalid)
|
|
|
a094f6 |
{
|
|
|
a094f6 |
long ret;
|
|
|
a094f6 |
|
|
|
a094f6 |
ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
|
|
|
a094f6 |
- if (ret == TB)
|
|
|
a094f6 |
+ if (ret != 268 && ret != 269)
|
|
|
a094f6 |
+ *invalid = 1;
|
|
|
a094f6 |
+ if (ret == 268)
|
|
|
a094f6 |
ret = 0;
|
|
|
a094f6 |
return ret;
|
|
|
a094f6 |
}
|
|
|
a094f6 |
@@ -5051,7 +5053,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
|
|
|
a094f6 |
|
|
|
a094f6 |
{"mftbl", XSPR(31,371,268), XSPR_MASK, PPC, NO371, {RT}},
|
|
|
a094f6 |
{"mftbu", XSPR(31,371,269), XSPR_MASK, PPC, NO371, {RT}},
|
|
|
a094f6 |
-{"mftb", X(31,371), X_MASK, PPC|PPCA2, NO371|POWER7, {RT, TBR}},
|
|
|
a094f6 |
+{"mftb", X(31,371), X_MASK, PPC|PPCA2, NO371, {RT, TBR}},
|
|
|
a094f6 |
|
|
|
a094f6 |
{"lwaux", X(31,373), X_MASK, PPC64|PPCVLE, PPCNONE, {RT, RAL, RB}},
|
|
|
a094f6 |
|