mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-13 12:23:33 +08:00
* ppc-opc.c (extract_sprg): Correct operand range check.
This commit is contained in:
parent
c332165e45
commit
e1c93c699b
@ -1,3 +1,7 @@
|
||||
2008-11-27 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ppc-opc.c (extract_sprg): Correct operand range check.
|
||||
|
||||
2008-11-26 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* m68k-dis.c (NEXTBYTE, NEXTWORD, NEXTLONG, NEXTULONG, NEXTSINGLE)
|
||||
|
@ -1281,10 +1281,10 @@ extract_sprg (unsigned long insn,
|
||||
|
||||
/* 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 <= 3
|
||||
|| (val < 0x10 && (insn & 0x100) != 0)
|
||||
|| (val - 0x10 > 3
|
||||
&& (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_403)) == 0))
|
||||
if ((val - 0x10 > 3 && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_405)) == 0)
|
||||
|| (val - 0x10 > 7 && (insn & 0x100) != 0)
|
||||
|| val <= 3
|
||||
|| (val & 8) != 0)
|
||||
*invalid = 1;
|
||||
return val & 7;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user