Review Board 2.0.15


riscv: Fix crash when syscall argument reg index is too high

Review Request #3780 - Created Jan. 12, 2017 and submitted

Information
Alec Roelke
gem5
default
Reviewers
Default
Changeset 11795:3ac8305dbf60
---------------------------
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.

   

Issue Summary

1 0 1 0
Review request changed
Updated (Feb. 7, 2017, 8:58 a.m.)

Status: Closed (submitted)