From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6950 invoked by alias); 28 Oct 2009 16:40:17 -0000 Received: (qmail 6940 invoked by uid 22791); 28 Oct 2009 16:40:16 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,DNS_FROM_RFC_BOGUSMX X-Spam-Check-By: sourceware.org Received: from sebabeach.org (HELO sebabeach.org) (64.165.110.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Oct 2009 16:40:10 +0000 Received: from sspiff.sspiff.org (seba.sebabeach.org [10.8.159.10]) by sebabeach.org (Postfix) with ESMTP id DFE9A6E3D4; Wed, 28 Oct 2009 09:40:08 -0700 (PDT) Message-ID: <4AE873E8.6030909@sebabeach.org> Date: Wed, 28 Oct 2009 16:40:00 -0000 From: Doug Evans User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Dmitry Eremin-Solenikov CC: Dave Korn , cgen Subject: Re: cgen->sim question References: <4AE59913.5040402@gmail.com> <4AE5CA87.5030500@sebabeach.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00029.txt.bz2 Dmitry Eremin-Solenikov wrote: > Hello, > > On Mon, Oct 26, 2009 at 7:12 PM, Doug Evans wrote: > >> Dave Korn wrote: >> >>> Dmitry Eremin-Solenikov wrote: >>> >>> >>>> Hello, >>>> >>>> I have a question regarding generating sim code from cgen description. >>>> >>>> I have an instruction operand instantiated from field with type h-addr. >>>> If in the semantics part of the instruction I try to access the operandr >>>> as an address: '(mem QI ddaddr)', I get an error from cgen: >>>> >>>> simplify.inc:131:3: op:new-mode: invalid mode for operand `ddaddr': USI >>>> >>>> This is the definition of ddaddr: >>>> >>>> (dif f-dd-1 "1-byte direct address at 1 position" (ABS-ADDR) 8 8 0 8 UINT >>>> #f #f) >>>> (dno ddaddr "direct address" () h-addr f-dd-1) >>>> > > >> What does the instruction definition look like? >> > > Please see the attachment. The stamp-cpu (cgen-cpu-decode) fails on > this CPU file. > > I checked in this patch. 2009-10-28 Doug Evans * cos.scm (object-assign!): New function. * mode.scm (/mode-set-word-params!): Call it.