target/openrisc: implement shadow registers
authorStafford Horne <shorne@gmail.com>
Wed, 5 Apr 2017 21:44:56 +0000 (06:44 +0900)
committerStafford Horne <shorne@gmail.com>
Thu, 4 May 2017 00:39:01 +0000 (09:39 +0900)
commitd89e71e873dca0ca6d3b3adab283045a03f4ca99
tree1aa8a808dd445d9f57a65affc72a3b03d3e93cbe
parent4597992f624c015ceb51fedb4628b3fdb1e5bbaa
target/openrisc: implement shadow registers

Shadow registers are part of the openrisc spec along with sr[cid], as
part of the fast context switching feature.  When exceptions occur,
instead of having to save registers to the stack if enabled the CID will
increment and a new set of registers will be available.

This patch only implements shadow registers which can be used as extra
scratch registers via the mfspr and mtspr if required.  This is
implemented in a way where it would be easy to add on the fast context
switching, currently cid is hardcoded to 0.

This is need for openrisc linux smp kernels to boot correctly.

Signed-off-by: Stafford Horne <shorne@gmail.com>
linux-user/elfload.c
linux-user/main.c
linux-user/openrisc/target_cpu.h
linux-user/openrisc/target_signal.h
linux-user/signal.c
target/openrisc/cpu.c
target/openrisc/cpu.h
target/openrisc/gdbstub.c
target/openrisc/machine.c
target/openrisc/sys_helper.c
target/openrisc/translate.c