From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26646 invoked by alias); 12 Jun 2002 02:09: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 26611 invoked from network); 12 Jun 2002 02:09:36 -0000 Received: from unknown (HELO mf2.bredband.net) (195.54.122.120) by sources.redhat.com with SMTP; 12 Jun 2002 02:09:36 -0000 Received: from cockmaster ([213.112.126.65]) by mf2.bredband.net with ESMTP id <20020612021006.NAIQ12689.mf2@cockmaster> for ; Wed, 12 Jun 2002 04:10:06 +0200 Date: Tue, 11 Jun 2002 19:09:00 -0000 From: Johan Rydberg To: cgen@sources.redhat.com Subject: adjusting cgen Message-ID: <20020612041320.C16968@cockmaster.bredbandsbolaget.se> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-q2/txt/msg00017.txt.bz2 Hi! I'm hacking my way through the CGEN sources to adopt them to generate targets to a simulator I'm working on. What I have done is to clone the SID-part of CGEN and adjust it to generate code that suits my simulator. I better let you know that I know neither Scheme or Lisp. And I have some questions; 1) Is it possible to adjust CGEN to recognize on-page branches? This could be a huge optimization for me, since this will eliminate the full tlb+mmu lookup for (near) branches. 2) Is it possible to adjust the -gen-argbuf-elm fn in sid-decode.scm to generate bit fields instead of full integers? Currently it generates code similar to this; struct { /* */ UINT f_rd; UINT f_sr; } sfmt_mfsr; What I would like to do is to reduce the size of the sem_fields union to a total of 32-bits (for a 32-bit architecture). I guess this is best done by emitting bit fields, like; struct { /* */ UINT f_rd : 8; UINT f_sr : 8; } sfmt_mfsr; The bit field size should be the length of the ifield, rounded up to the next multiple of eight, but only for fields longer than 3 bits. (I assume that fields longer than 3 bits is normally either used as indexes in for example the register file, or immediates) Is this possible? I hope some of you understand what I'm trying to communicate (it's 4 am here). If you're intressted in the simulator, you can find information (ie the sources) at http://savannah.gnu.org/projects/guss/ . regards johan