From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3400 invoked by alias); 7 Aug 2006 14:53:40 -0000 Received: (qmail 3392 invoked by uid 22791); 7 Aug 2006 14:53:39 -0000 X-Spam-Check-By: sourceware.org Received: from mailrelay1.uni-rostock.de (HELO antivirus.uni-rostock.de) (139.30.8.201) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 07 Aug 2006 14:53:38 +0000 Received: from antivirus.exch.rz.uni-rostock.de ([127.0.0.1]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Aug 2006 16:53:35 +0200 Received: from antivirus.uni-rostock.de (unverified) by antivirus.exch.rz.uni-rostock.de (Content Technologies SMTPRS 4.3.20) with ESMTP id for ; Mon, 7 Aug 2006 16:53:35 +0200 Received: from mail pickup service by antivirus.uni-rostock.de with Microsoft SMTPSVC; Mon, 7 Aug 2006 16:53:35 +0200 X-SCL: 5 69.47% Received: from mail.uni-rostock.de ([139.30.8.11]) by antivirus.uni-rostock.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Aug 2006 16:53:20 +0200 Received: from conversion-daemon.mail2.uni-rostock.de by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) id <0J3M00D01TJPTW@mail.uni-rostock.de> (original mail from ronald.hecht@uni-rostock.de) for cgen@sourceware.org; Mon, 07 Aug 2006 16:53:19 +0200 (MEST) Received: from [139.30.201.25] (pike.e-technik.uni-rostock.de [139.30.201.25]) by mail2.uni-rostock.de (iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)) with ESMTPS id <0J3M002J1UOPAC@mail.uni-rostock.de>; Mon, 07 Aug 2006 16:53:14 +0200 (MEST) Date: Mon, 07 Aug 2006 14:53:00 -0000 From: Ronald Hecht Subject: Re: Simulator: base_insn and insn in decode.c In-reply-to: <44D273E8.4040006@redhat.com> To: Dave Brolley Cc: cgen@sourceware.org Message-id: <44D7549A.7000201@uni-rostock.de> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT User-Agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501) References: <44CDF0AC.6070707@uni-rostock.de> <44D270CF.30506@redhat.com> <44D273E8.4040006@redhat.com> X-IsSubscribed: yes Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2006-q3/txt/msg00024.txt.bz2 I switched to the SID framework. I found it easier to create a new target. The disassemby works better as it calls this disassembler code in src/opcodes. But I'm still in trouble with decode.cxx. It looks the same as in sim. I'n my opinion the entire_insn should alwasy be left aligned and not right_aligned as it is now. Base_insn should have the same alignment. I think this way it is easier to support variable sized instructions. Best Regards Ronald Dave Brolley wrote: > I forgot to address your other question which was about the difficulty > of setting entire_insn before decoding. It's a bit of a chicken and > egg situation isnt'y it? You can't set entire insn properly until you > know something about the insn, but you can't call decode without > setting entire_insn properly. > > Your method of calling decode twice won't work because of this. > > Most existing ports determine the insn length by looking at a few bits > in base_insn and use this information to fill entire_insn. > > I'm wondering if the decoder shouldn't be redesigned so that all it > takes is base_insn, which should be all that is necessary to identify > the insn. The extractors for each format would then read any > additional bytes as needed. There is already support for this for ISAs > with insns which are longer than an insn word. > > Dave >