From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37997) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aku6V-00015k-Vj for qemu-devel@nongnu.org; Tue, 29 Mar 2016 09:54:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aku6Q-0006fy-Ec for qemu-devel@nongnu.org; Tue, 29 Mar 2016 09:54:43 -0400 Received: from out21.biz.mail.alibaba.com ([205.204.114.132]:40405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aku6Q-0006fJ-0V for qemu-devel@nongnu.org; Tue, 29 Mar 2016 09:54:38 -0400 Message-ID: <56FA88E8.1060206@emindsoft.com.cn> Date: Tue, 29 Mar 2016 21:53:44 +0800 From: Chen Gang MIME-Version: 1.0 References: <1457992308-2136-1-git-send-email-chengang@emindsoft.com.cn> <56F7AB79.8010403@emindsoft.com.cn> <56F9AD90.4090106@vivier.eu> <56F9B6E1.7080004@emindsoft.com.cn> In-Reply-To: <56F9B6E1.7080004@emindsoft.com.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] linux-user/signal.c: Generate opcode data for restorer in setup_rt_frame List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , rth@twiddle.net, peter.maydell@linaro.org, cmetcalf@ezchip.com Cc: walt@tilera.com, qemu-devel@nongnu.org On 3/29/16 06:57, Chen Gang wrote: > On 3/29/16 06:17, Laurent Vivier wrote: >> >> The address of retcode in host and guest can differ. >> You need something like: >> >> restorer = (unsigned long)(frame_addr + offsetof(struct >> target_rt_sigframe, retcode)); >> >> I've experienced this on sh4 (see commit 2a0fa68) >> > > OK, thanks. What you said above sounds reasonable to me. :-) > > I shall send patch v2 for it (although tilegx is a pure 64-bit target, > with this patch, I guess, tilegx target should still run correctly under > 32-bit host). > > By the way, it looks that s390x and microblaze targets also have the > same issue. It looks the alpha target may also need consider about retcode, for "r26 = frame_addr" in setup_rt_frame(). Thanks. -- Chen Gang (陈刚) Managing Natural Environments is the Duty of Human Beings.