summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorAlec Roelke <ar4jc@virginia.edu>2017-01-27 15:05:01 -0600
committerAlec Roelke <ar4jc@virginia.edu>2017-01-27 15:05:01 -0600
commite4c57275d38c864798cb04a4644bac90a83572fd (patch)
tree3f26d0e4e89347a9bbead74471e4a16a00695659 /src/python
parentc5df9308c99bd4af41b24119e2d86bde9eafdfa4 (diff)
downloadgem5-e4c57275d38c864798cb04a4644bac90a83572fd.tar.xz
riscv: Fix crash when syscall argument reg index is too high
By default, doSyscall gets the values of six registers to be used for system call arguments. RISC-V, by convention, only has four. Because RISC-V's implementation of these indices is as arrays of integers rather than as base indices plus offsets, trying to get the fifth argument register's value will cause a crash. This patch fixes that by returning 0 for any index higher than 3. Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/python')
0 files changed, 0 insertions, 0 deletions