]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user/signal.c: Use target address instead of host address for microblaze restorer
authorChen Gang <chengang@emindsoft.com.cn>
Tue, 29 Mar 2016 14:13:45 +0000 (22:13 +0800)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 27 May 2016 11:50:40 +0000 (14:50 +0300)
The return address is in target space, so the restorer address needs to
be target space, too.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/signal.c

index a072fa6efd0a5805ed3c246b75c393aee486a548..c75fb4895332a8d3c4af39bb2eea79a1787f522a 100644 (file)
@@ -3573,7 +3573,8 @@ static void setup_frame(int sig, struct target_sigaction *ka,
 
         /* Return from sighandler will jump to the tramp.
            Negative 8 offset because return is rtsd r15, 8 */
-        env->regs[15] = ((unsigned long)frame->tramp) - 8;
+        env->regs[15] = frame_addr + offsetof(struct target_signal_frame, tramp)
+                                   - 8;
     }
 
     /* Set up registers for signal handler */