summaryrefslogtreecommitdiff
path: root/src/cpu/SConscript
diff options
context:
space:
mode:
authorIan Jiang <ianjiang.ict@gmail.com>2019-11-25 11:30:41 +0800
committerIan Jiang <ianjiang.ict@gmail.com>2019-11-26 03:38:22 +0000
commitca5e9c22708f6142c70d0c141a8d489bb345100a (patch)
treedd291e841f667560543a4622592dcc6cdedc01a7 /src/cpu/SConscript
parent390f7b917757887674ab441979f36bffeedb646a (diff)
downloadgem5-ca5e9c22708f6142c70d0c141a8d489bb345100a.tar.xz
arch-riscv: Fix immediate decoding for integer shift immediate instructions
The "shamt" in integer shift immediate instructions is an unsigned immediate encoded in bits[25:20]. While the original Gem5 uses bits[31:20] as an int64_t. This patch fixes the problem by: - Adding a new parameter "imm_code" for format IOp and use the correct bitfields SHAMT5 or SHAMT6 to assign "imm_code" for each instruction. - Use uint64_t instead of default int64_t to assign parameter "imm_type" of format IOp. The instructions affected include: - Shift Left Logical Immediate, slli - Shift Right Logical Immediate, srli - Shift Right Arithmetic Immediate, srai - Shift Left Logical Word Immediate, slliw - Shift Right Logical Word Immediate, srliw - Shift Right Arithmetic Word Immediate, sraiw Change-Id: Iad34ccd036c11630409f84f6de2b939224e100e6 Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22563 Reviewed-by: Alec Roelke <alec.roelke@gmail.com> Maintainer: Alec Roelke <alec.roelke@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/cpu/SConscript')
0 files changed, 0 insertions, 0 deletions