From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16770 invoked by alias); 9 May 2008 09:40:03 -0000 Received: (qmail 16758 invoked by uid 22791); 9 May 2008 09:40:02 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 May 2008 09:39:34 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m499cbk3004320; Fri, 9 May 2008 05:38:37 -0400 Received: from zebedee.pink (vpn-14-20.rdu.redhat.com [10.11.14.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m499cZO0000602; Fri, 9 May 2008 05:38:36 -0400 Message-ID: <48241B9A.4030705@redhat.com> Date: Fri, 09 May 2008 10:35:00 -0000 From: Andrew Haley User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Ganesh CC: gcc-help@gcc.gnu.org Subject: Re: Porting GCC to 8051 Microcontroller References: <017101c8b014$16001dc0$c301a8c0@Ganesh> <48216518.2050204@redhat.com> <022f01c8b028$511cee10$c301a8c0@Ganesh> <48217EC9.1080307@redhat.com> In-Reply-To: <48217EC9.1080307@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg00096.txt.bz2 Andrew Haley wrote: > Ganesh wrote: >> I haven't said that I don't understand the steps involved. I have just >> now started to work on it. I want to check whether if anyone have ever >> tried this port and successfully completed it. > > It's very unlikely. It's not completely impossible to do it, but > code quality would probably be poor. > > See http://gcc.gnu.org/ml/gcc/2003-07/msg00890.html > http://gcc.gnu.org/ml/gcc/2003-07/msg01167.html I've been thinking about this some more. I suspect you could get good results by generating not 8051 assembly language, which would be gross, but a simple bytecode engine. It wouldn't be at all fast, but it would be possible to generate some native code sequences and intermix them with the bytecode. This would be a reasonable compromise between speed and code density. Andrew.