Skip to content

Commit

Permalink
target-openrisc: bugfix for dec_sys to decode instructions correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Morrison authored and Michael Tokarev committed Jan 15, 2015
1 parent fac6688 commit 3d59b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target-openrisc/translate.c
Expand Up @@ -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
Expand Down

0 comments on commit 3d59b68

Please sign in to comment.