diff options
author | David Morrison <dmorrison@invlim.com> | 2015-01-06 09:06:18 -0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2015-01-15 10:44:13 +0300 |
commit | 3d59b6808bc5e0efbf1aee48d7f9ea96d19df05d (patch) | |
tree | 36b1f3b61ace900d5f9894de8785866d4d393c14 /target-openrisc | |
parent | fac6688a18574b6f2caa8c699a936e729ed53ece (diff) | |
download | qemu-3d59b6808bc5e0efbf1aee48d7f9ea96d19df05d.zip qemu-3d59b6808bc5e0efbf1aee48d7f9ea96d19df05d.tar.gz qemu-3d59b6808bc5e0efbf1aee48d7f9ea96d19df05d.tar.bz2 |
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>
Diffstat (limited to 'target-openrisc')
-rw-r--r-- | target-openrisc/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c index 7dea405..b90181d 100644 --- a/target-openrisc/translate.c +++ b/target-openrisc/translate.c @@ -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 |