From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28684 invoked by alias); 11 Dec 2002 18:08:39 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 28671 invoked from network); 11 Dec 2002 18:08:38 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 11 Dec 2002 18:08:38 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id KAA08320; Wed, 11 Dec 2002 10:08:35 -0800 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma008306; Wed, 11 Dec 02 10:08:26 -0800 Received: from xris-athlon.transmeta.com (xris-athlon.transmeta.com [10.10.25.96]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id gBBI8SR10638; Wed, 11 Dec 2002 10:08:28 -0800 (PST) Received: (from dje@localhost) by xris-athlon.transmeta.com (8.9.3/8.7.3) id KAA25670; Wed, 11 Dec 2002 10:08:28 -0800 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15863.32540.535836.871324@xris-athlon.transmeta.com> Date: Wed, 11 Dec 2002 10:08:00 -0000 To: Manuel Kessler Cc: cgen@sources.redhat.com Subject: Re: make CGEN a less moving target? In-Reply-To: References: <15862.9492.864974.265990@xris-athlon.transmeta.com> X-SW-Source: 2002-q4/txt/msg00070.txt.bz2 Manuel Kessler writes: > Is "better" the correct term here? Or is x86 supposed to be working (at > least the partially implemented add instruction) at all, or to be seen as > how to do a CISC example? You're basically in new territory with any CISC port. > As said before, I am not (yet) capable of interpreting this error > correctly, but it seems to me that non-contiguous ifields are currently > not really supported. Is this correct, or how can I achieve the desired > effect? Certainly some forms of non-contiguous fields are supported. Examples would help us provide better answers. > I am not quite sure how to correctly set the different *-bitsize values in > define-isa. The architecture is 16 bits (little endian), but the smallest > instruction is 8 bits long. So 8 should be a reasonable value. However, > many instructions are 16 bits or longer. Therefore I have to spefify > several instruction fields (for example a second operand field) with bit > numbers above 8. Will CGEN detect such cases and behave properly? Well, I > tried and it does generate some code, but as I am not yet at the stage of > building a complete application as gas or objdump, I can't really tell > whether the result is correct. CGEN will handle such cases properly. [At least it has with other existing in-use ports with variable-sized instruction sets.] > A more minor point: The architecture features some address registers, > which may be 16 or 24 bits wide, depending on the model, otherwise being > 16 bit. Therefore I tried to describe these in define-hardware as of mode > AI (address integer), as described in the manual, section 3.15 (Modes). > However, this was rejected as "mode AI not supported". Is this just an > oversight, not supported or am I simply off track here? For now, I > replaced it with SI and mask the superfluous bits, but AI would be more > descriptive and accurate. If you send me your .cpu file I can help with this part. Clearly you want to get this resolved sooner rather than later. The short answer is you have to treat the models with 16 bits separately from the one with 24 bits. > Finally: The architecture allows additional indirect addressing by using a > special prefix byte, i.e. if you want to negate a register, you write > neg.w r0 > but if you want to negate the memory value pointed to by the register > neg.w [r0] > the same opcode is used, prefixed by an additional byte marking the > indirect addressing of the following instruction. Clear? Is there any > chance to specify this addressing-fiddling with prefixes in CGEN? For the time being what if you treat them as individual insns (recognizing all the pitfalls) and see if you can make forward progress on your port? Ignore the error cases (e.g. illegal pairings) for now. Ultimately I think we need to extend cgen to handle them. There's just too many in x86-land. Handling them with the current design is untenable.