arch-riscv: Add xret instructions
authorAlec Roelke <alec.roelke@gmail.com>
Sun, 10 Jun 2018 22:41:34 +0000 (18:41 -0400)
committerAlec Roelke <alec.roelke@gmail.com>
Sat, 28 Jul 2018 18:49:16 +0000 (18:49 +0000)
commita27ce59a39ec8fa20a3c4e9fa53e9b3db1199e91
treed230b106cca136fba2b559ceb8f17843798eaa69
parent76e7aec54256696dfdc9567c7ea325fb07c48ef1
arch-riscv: Add xret instructions

This patch adds the uret, sret, and mret instructions for use with
returning from user-, supervisor-, and machine-level code, respectively.
These instructions read the STATUS register to determine the previous
privilege level and modify it to re-enable interrupts at the old
privilege level. These instructions can only be executed at the
corresponding privilege level or higher.

Change-Id: I6125c31cb2fdcc3f83eca86910519e81ffbbbfc9
Reviewed-on: https://gem5-review.googlesource.com/11136
Maintainer: Alec Roelke <alec.roelke@gmail.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Robert Scheffel <robert.scheffel1@tu-dresden.de>
src/arch/riscv/faults.hh
src/arch/riscv/isa/decoder.isa
src/arch/riscv/registers.hh