From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25189 invoked by alias); 10 May 2006 18:11:10 -0000 Received: (qmail 25179 invoked by uid 22791); 10 May 2006 18:11:09 -0000 X-Spam-Check-By: sourceware.org Received: from neon-gw-l3.transmeta.com (HELO neon-gw.transmeta.com) (63.209.4.196) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 10 May 2006 18:11:00 +0000 Received: from victor.transmeta.com (victor.transmeta.com [10.0.2.120]) by neon-gw.transmeta.com (Postfix) with ESMTP id 8F17D5F8057; Wed, 10 May 2006 11:10:55 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by localhost.transmeta.com (Postfix) with ESMTP id 2E82B4F802D; Wed, 10 May 2006 11:10:57 -0700 (PDT) Received: from victor.transmeta.com ([127.0.0.1]) by localhost (victor [127.0.0.1]) (amavisd-new, port 10022) with LMTP id 19719-03-34; Wed, 10 May 2006 11:10:57 -0700 (PDT) Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by victor.transmeta.com (Postfix) with ESMTP id 14E924F802C; Wed, 10 May 2006 11:10:57 -0700 (PDT) Received: (from dje@localhost) by casey.transmeta.com (8.11.6/8.11.6) id k4AIAuo11872; Wed, 10 May 2006 11:10:56 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17506.11439.818364.259602@casey.transmeta.com> Date: Wed, 10 May 2006 18:11:00 -0000 To: Dave Brolley Cc: cgen@sources.redhat.com Subject: [patch][commit] New (if (...) (...) (...)) Test Allowed at Top Level of the Input In-Reply-To: <44622986.3090309@redhat.com> References: <44622986.3090309@redhat.com> X-Mailer: VM 6.72 under 21.1 (patch 8) "Bryce Canyon" XEmacs Lucid 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-q2/txt/msg00026.txt.bz2 Blech. Dave Brolley writes: > Hi, > > I've committed the attach patch. I allows the psecification of > > (if (application-is? ) > (true expr) > (false expr)) > > at the top level of the CGEN input. This test corresponds to (eq? > application ) which is found in many places in the CGEN source. > For example > > (if (application-is? SID-SIMULATOR) > (include "sid-macros.cpu") > (include "sim-macros.cpu")) > > Dave > > 2006-05-10 Dave Brolley > > * read.scm (cmd-if): Provide the correct argument to reader-error. Add > support for (if (application-is? ) (...) (...)). > Index: cgen/read.scm > =================================================================== > RCS file: /cvs/src/src/cgen/read.scm,v > retrieving revision 1.13 > diff -c -p -r1.13 read.scm > *** cgen/read.scm 10 May 2006 16:24:53 -0000 1.13 > --- cgen/read.scm 10 May 2006 17:45:17 -0000 > *************** Define a preprocessor-style macro. > *** 796,803 **** > (cons 'if (cons test (cons then else))) > "")) > ; ??? rtx-eval test > ! (if (not (memq (car test) '(keep-isa? keep-mach?))) > ! (reader-error "only (if (keep-mach?|keep-isa? ...) ...) is currently supported")) > (case (car test) > ((keep-isa?) > (if (keep-isa? (cadr test)) > --- 796,803 ---- > (cons 'if (cons test (cons then else))) > "")) > ; ??? rtx-eval test > ! (if (not (memq (car test) '(keep-isa? keep-mach? application-is?))) > ! (reader-error "only (if (keep-mach?|keep-isa?|application-is? ...) ...) are currently supported" test "")) > (case (car test) > ((keep-isa?) > (if (keep-isa? (cadr test)) > *************** Define a preprocessor-style macro. > *** 810,815 **** > --- 810,821 ---- > (eval1 then) > (if (null? else) > #f > + (eval1 (car else))))) > + ((application-is?) > + (if (eq? APPLICATION (cadr test)) > + (eval1 then) > + (if (null? else) > + #f > (eval1 (car else)))))) > ) >