From patchwork Tue Mar 29 14:01:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 602938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qZCCQ0stdz9s9Z for ; Wed, 30 Mar 2016 01:02:41 +1100 (AEDT) Received: from localhost ([::1]:47185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuEC-0000bl-04 for incoming@patchwork.ozlabs.org; Tue, 29 Mar 2016 10:02:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuDu-0000Fg-K0 for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:02:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akuDp-0008Kf-30 for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:02:22 -0400 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:58070 helo=us-alimail-mta2.hst.scl.en.alidc.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuDo-0008Ja-Iz for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:02:17 -0400 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.138857|-1; FP=0|0|0|0|0|-1|-1|-1; HT=e02c03291; MF=chengang@emindsoft.com.cn; NM=1; PH=DS; RN=10; RT=9; SR=0; TI=SMTPD_----4ee8wOE_1459260109; Received: from localhost.localdomain(mailfrom:chengang@emindsoft.com.cn ip:223.72.89.125) by smtp.aliyun-inc.com(10.147.43.230); Tue, 29 Mar 2016 22:01:55 +0800 From: chengang@emindsoft.com.cn To: rth@twiddle.net, peter.maydell@linaro.org, cmetcalf@ezchip.com, laurent@vivier.eu Date: Tue, 29 Mar 2016 22:01:45 +0800 Message-Id: <1459260105-5536-1-git-send-email-chengang@emindsoft.com.cn> X-Mailer: git-send-email 1.9.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 205.204.113.249 Cc: walt@tilera.com, Chen Gang , riku.voipio@iki.fi, qemu-devel@nongnu.org, Chen Gang Subject: [Qemu-devel] [PATCH] linux-user/signal.c: Use frame->retcode instead of frame address for alpha target restorer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Chen Gang The restorer needs the return code address which is frame->retcode, not frame itself. Signed-off-by: Chen Gang --- linux-user/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index e487f9e..4157154 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -5455,7 +5455,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, &frame->retcode[1]); __put_user(INSN_CALLSYS, &frame->retcode[2]); /* imb(); */ - r26 = frame_addr; + r26 = frame_addr + offsetof(struct target_rt_sigframe, retcode); } if (err) {