linux-user: Set r14 on exit from microblaze syscall
commitd7749ab770601258be7ae862b5827c42bb35e44c
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 12 May 2016 17:47:43 +0000 (12 18:47 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 27 May 2016 11:49:50 +0000 (27 14:49 +0300)
tree9bc9c6149d3be9c77676a83d60cd8ad6cba510d3
parenta9175169cc55ecff23a158dfee7d9cbb0b75d185
linux-user: Set r14 on exit from microblaze syscall

All syscall exits on microblaze result in r14 being equal to the
PC we return to, because the kernel syscall exit instruction "rtbd"
does this. (This is true even for sigreturn(); note that r14 is
not a userspace-usable register as the kernel may clobber it at
any point.)

Emulate the setting of r14 on exit; this isn't really a guest
visible change for valid guest code because r14 isn't reliably
observable anyway. However having the code and the comment helps
to explain why it's ok for the ERESTARTSYS handling not to undo
the changes to r14 that happen on syscall entry.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/main.c