diff options
author | Ian Jiang <ianjiang.ict@gmail.com> | 2019-11-15 10:07:06 +0800 |
---|---|---|
committer | Ian Jiang <ianjiang.ict@gmail.com> | 2019-11-25 01:26:08 +0000 |
commit | 27b5e32e94cf79c065a49d184b5a0dcad83399c3 (patch) | |
tree | 4a883fda004496cf712656efd3fd278eb0aea68e /src/systemc | |
parent | 0b39303f1c4dae8cb933e3eeac1a7e4be0cfe3ce (diff) | |
download | gem5-27b5e32e94cf79c065a49d184b5a0dcad83399c3.tar.xz |
arch-riscv: Fix disassembling of immediate for U-type instructions
For U-type instructions auipc and lui, the 20-bit immediate is left-shifted
by 12 bits in decoding. While the original Gem5 gives the left-shifted
value directly in disassembly.
This patch fixes the problem by
- Assign the original 20-bit immediate to internal variable "imm".
- Output "imm" directly in disassembly, as how the original Gem5 does.
- Do the left-shift to "imm" later in the function defining of each
instruction, rather than in decoding.
Change-Id: I300e26fd9c79478783c39fcd6ff70ea06db88884
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22564
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Alec Roelke <alec.roelke@gmail.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/systemc')
0 files changed, 0 insertions, 0 deletions