Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 84003 invoked from network); 29 Jan 2007 11:26:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jan 2007 11:26:37 -0000 Received: (qmail 23201 invoked by uid 500); 29 Jan 2007 11:26:40 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 23155 invoked by uid 500); 29 Jan 2007 11:26:40 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 23146 invoked by uid 99); 29 Jan 2007 11:26:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 03:26:39 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mike.fursov@gmail.com designates 209.85.132.247 as permitted sender) Received: from [209.85.132.247] (HELO an-out-0708.google.com) (209.85.132.247) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jan 2007 03:26:31 -0800 Received: by an-out-0708.google.com with SMTP id b2so449681ana for ; Mon, 29 Jan 2007 03:26:10 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=eAR2QbegxaOraWTZpuN968dCEEVwe/mPHL91rFeDjaIFkUUXuBEtWbJZTKRgDMI9ZvOw7RAJFtD1JUctNux8hFBNCRoK977d4GVF69BkJBS1wm1SwVZE1t9wM6DaWT0yJ+KEWCN6mSHW77+5O99Bg1utF5hk//hPGxRxKu7QK9U= Received: by 10.115.17.1 with SMTP id u1mr260192wai.1170069970090; Mon, 29 Jan 2007 03:26:10 -0800 (PST) Received: by 10.114.130.4 with HTTP; Mon, 29 Jan 2007 03:26:09 -0800 (PST) Message-ID: Date: Mon, 29 Jan 2007 17:26:10 +0600 From: "Mikhail Fursov" To: dev@harmony.apache.org Subject: Re: [Drlvm][Opt]Some Questions about LIR expressions In-Reply-To: <6342af3e0701272307r161cb1eaj7650f5ecc49700b@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_18491_13293196.1170069970062" References: <6342af3e0701272307r161cb1eaj7650f5ecc49700b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_18491_13293196.1170069970062 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline zouquiong, I think that the error with types. Check counter-access for for edge profile as example: uint32* ptr = key == 0 ? edgeProfile->getEntryCounter() : edgeProfile->getCounter(key ); assert( ptr != NULL /*&& *ptr == 0 if compilation is locked*/); Opnd* baseOpnd = irManager.newImmOpnd(typeManager.getUnmanagedPtrType( typeManager.getUIntPtrType()), (POINTER_SIZE_INT)ptr); Opnd* memOpnd = irManager.newMemOpnd(typeManager.getUIntPtrType(), MemOpndKind_Heap, baseOpnd, NULL, NULL, NULL); const Mnemonic mn = Mnemonic_ADD; Inst* inst = irManager.newInst(mn, memOpnd, irManager.newImmOpnd( typeManager.getUInt32Type(), 1)); The address of the counter has Pointer but but UInt32 type. On 1/28/07, zouqiong wrote: > > I add the following expression in InstCodeSelector::addElemIndex(): > > Opnd* current_buffer = irManager.newImmOpnd(typeManager.getInt32Type(), > (unsigned)¤t_obj_acc_record_pointer); > > Opnd * Ip_Opnd = irManager.newMemOpndAutoKind > (typeManager.getPrimitiveType(Type::UInt32), > current_buffer, irManager.newImmOpnd(typeManager.getInt32Type(), 8)); > > copyOpnd(Ip_Opnd, irManager.newImmOpnd(typeManager.getInt32Type(), > 0x19820514)); > > It seems that the constraints of the Opnds are wrong. Is it? > > current_obj_acc_record_pointer points to a buffer of type obj_acc_record > > typedef struct { > uint32 base; > uint32 offset; > uint32 ip; > uint32 other_info; > }obj_acc_record; > > > -- > Best Regards, > Qiong,Zou > > -- Mikhail Fursov ------=_Part_18491_13293196.1170069970062--