aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-05-18 00:30:47 +0000
committerAlan Modra <amodra@gmail.com>2012-05-18 00:30:47 +0000
commit98c76446ea6bc1223c314500d3e11178e4911018 (patch)
treea2bf4258d5b17090967befe633dcc4ce12f92454
parent682c7f7b28c3ac2509864f3504550bc29b7a72a6 (diff)
downloadbinutils-98c76446ea6bc1223c314500d3e11178e4911018.zip
binutils-98c76446ea6bc1223c314500d3e11178e4911018.tar.gz
binutils-98c76446ea6bc1223c314500d3e11178e4911018.tar.bz2
* ppc-opc.c (extract_sprg): Use ALLOW8_SPRG to include VLE.
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/ppc-opc.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 4d1b6c9..05b792a 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-17 James Lemke <jwlemke@codesourcery.com>
+
+ * ppc-opc.c (extract_sprg): Use ALLOW8_SPRG to include VLE.
+
2012-05-17 Daniel Richard G. <skunk@iskunk.org>
Nick Clifton <nickc@redhat.com>
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index f92979c..74fba68 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -1825,8 +1825,7 @@ insert_sprg (unsigned long insn,
const char **errmsg)
{
if (value > 7
- || (value > 3
- && (dialect & ALLOW8_SPRG) == 0))
+ || (value > 3 && (dialect & ALLOW8_SPRG) == 0))
*errmsg = _("invalid sprg number");
/* If this is mfsprg4..7 then use spr 260..263 which can be read in
@@ -1845,8 +1844,8 @@ extract_sprg (unsigned long insn,
unsigned long val = (insn >> 16) & 0x1f;
/* mfsprg can use 260..263 and 272..279. mtsprg only uses spr 272..279
- If not BOOKE or 405, then both use only 272..275. */
- if ((val - 0x10 > 3 && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_405)) == 0)
+ If not BOOKE, 405 or VLE, then both use only 272..275. */
+ if ((val - 0x10 > 3 && (dialect & ALLOW8_SPRG) == 0)
|| (val - 0x10 > 7 && (insn & 0x100) != 0)
|| val <= 3
|| (val & 8) != 0)