From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQAQS-0004Xu-IE for qemu-devel@nongnu.org; Tue, 24 Feb 2015 03:01:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQAQO-0007zv-FQ for qemu-devel@nongnu.org; Tue, 24 Feb 2015 03:01:04 -0500 Received: from out1134-226.mail.aliyun.com ([42.120.134.226]:29292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQAQO-0007zM-2q for qemu-devel@nongnu.org; Tue, 24 Feb 2015 03:01:00 -0500 Message-ID: <54EC312A.7000906@sunrus.com.cn> Date: Tue, 24 Feb 2015 16:07:06 +0800 From: Chen Gang S MIME-Version: 1.0 References: <54EC2DEE.8050809@sunrus.com.cn> In-Reply-To: <54EC2DEE.8050809@sunrus.com.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Richard Henderson , Chris Metcalf , "walt@tilera.com" , Riku Voipio Cc: qemu-devel On 2/24/15 15:53, Chen Gang S wrote: [...] > diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c > index 5131fa7..82c751e 100644 > --- a/target-tilegx/translate.c > +++ b/target-tilegx/translate.c > @@ -25,18 +25,880 @@ > #include "exec/cpu_ldst.h" > #include "exec/helper-gen.h" > > +#define TILEGX_BUNDLE_SIZE 8 /* Each bundle size in bytes */ > +#define TILEGX_BUNDLE_INSNS 3 /* Maximized insns per bundle */ > +#define TILEGX_BUNDLE_OPCS 10 /* Assume maximized opcs per bundle */ > + > +/* Check Bundle whether is Y type, else is X type */ > +#define TILEGX_BUNDLE_TYPE_MASK 0xc000000000000000ULL > +#define TILEGX_BUNDLE_TYPE_Y(bundle) ((bundle) & TILEGX_BUNDLE_TYPE_MASK) > +#define TILEGX_BUNDLE_TYPE_X(bundle) (!TILEGX_BUNDLE_TYPE_Y(bundle)) > + > +/* Bundle pipe mask, still remain the bundle type */ Oh, this comment is incorrect, it should be: "Bundle pipe mask without bundle type". > +#define TILEGX_PIPE_X0(bundle) ((bundle) & 0x000000007fffffffULL) > +#define TILEGX_PIPE_X1(bundle) ((bundle) & 0x3fffffff80000000ULL) > +#define TILEGX_PIPE_Y0(bundle) ((bundle) & 0x00000000780fffffULL) > +#define TILEGX_PIPE_Y1(bundle) ((bundle) & 0x3c07ffff80000000ULL) > +#define TILEGX_PIPE_Y2(bundle) ((bundle) & 0x03f8000007f00000ULL) > + [...] Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed