From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24082 invoked by alias); 15 Oct 2009 23:10:03 -0000 Received: (qmail 24034 invoked by uid 22791); 15 Oct 2009 23:10:02 -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; Thu, 15 Oct 2009 23:09:58 +0000 Received: from sspiff.sspiff.org (seba.sebabeach.org [10.8.159.10]) by sebabeach.org (Postfix) with ESMTP id 9B0EA6E3D5; Thu, 15 Oct 2009 16:09:56 -0700 (PDT) Message-ID: <4AD7ABC4.3080105@sebabeach.org> Date: Thu, 15 Oct 2009 23:10:00 -0000 From: Doug Evans User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Dmitry Eremin-Solenikov CC: cgen@sources.redhat.com Subject: Re: Instruction w/ prefix References: 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/msg00012.txt.bz2 Dmitry Eremin-Solenikov wrote: > Hello, > > I'm using cgen to create binutils port for the CISC architecture > (M68HC(S)08 if somebody cares). I've stumbled upon one problem: the is > an instruction prefix which can change meaning > of the next instruction (basically it then uses SP register instead of IX one). > > What is the most clean way to do this w/ cgen? I can of course > duplicate instruction fields, counting another byte in the beginning, > instructions, etc.. This will permit me to catch illegal combinations. > OTOH it doesn' look like completely clean idea. > > What would you suggest? > > Hi. Sorry for the slow reply. I think the right solution (which I wouldn't wait for) is to extend cgen to handle instruction prefixes. In the meantime, I would treat the prefix as its own instruction.