target-openrisc: bugfix for dec_sys to decode instructions correctly

Fixed the decoding of "system" instructions (starting with 0x2)
in dec_sys() in translate.c.  In particular, the l.trap instruction
is now correctly decoded, which enables for singlestepping and
breakpoints to be set in GDB.

Signed-off-by: David R. Morrison <dmorrison@invlim.com>
Acked-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
David Morrison 2015-01-06 09:06:18 -08:00 committed by Michael Tokarev
parent fac6688a18
commit 3d59b6808b
1 changed files with 1 additions and 1 deletions

View File

@ -1320,7 +1320,7 @@ static void dec_sys(DisasContext *dc, uint32_t insn)
#ifdef OPENRISC_DISAS
uint32_t K16;
#endif
op0 = extract32(insn, 16, 8);
op0 = extract32(insn, 16, 10);
#ifdef OPENRISC_DISAS
K16 = extract32(insn, 0, 16);
#endif