From: Dave Brolley <brolley@redhat.com>
To: cgen@sources.redhat.com
Subject: [patch][commit] New (if (...) (...) (...)) Test Allowed at Top Level of the Input
Date: Wed, 10 May 2006 17:57:00 -0000 [thread overview]
Message-ID: <44622986.3090309@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
Hi,
I've committed the attach patch. I allows the psecification of
(if (application-is? <appname>)
(true expr)
(false expr))
at the top level of the CGEN input. This test corresponds to (eq?
application <appname>) 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
[-- Attachment #2: cgen-if.ChangeLog --]
[-- Type: text/plain, Size: 179 bytes --]
2006-05-10 Dave Brolley <brolley@redhat.com>
* read.scm (cmd-if): Provide the correct argument to reader-error. Add
support for (if (application-is? <appname>) (...) (...)).
[-- Attachment #3: cgen-if.patch.txt --]
[-- Type: text/plain, Size: 1330 bytes --]
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))))))
)
next reply other threads:[~2006-05-10 17:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-10 17:57 Dave Brolley [this message]
2006-05-10 18:11 ` Doug Evans
2006-05-11 11:52 ` Thien-Thi Nguyen
2006-05-11 14:12 ` Dave Brolley
2006-05-11 16:45 ` Jim Blandy
2006-05-11 20:52 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44622986.3090309@redhat.com \
--to=brolley@redhat.com \
--cc=cgen@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).