From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14917 invoked by alias); 30 Aug 2009 05:26:32 -0000 Received: (qmail 14909 invoked by uid 22791); 30 Aug 2009 05:26:31 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f216.google.com (HELO mail-ew0-f216.google.com) (209.85.219.216) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 30 Aug 2009 05:26:26 +0000 Received: by ewy12 with SMTP id 12so2641083ewy.0 for ; Sat, 29 Aug 2009 22:26:22 -0700 (PDT) Received: by 10.216.7.133 with SMTP id 5mr802776wep.32.1251609982828; Sat, 29 Aug 2009 22:26:22 -0700 (PDT) Received: from ?192.168.2.99? (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id 10sm1437086eyd.1.2009.08.29.22.26.22 (version=SSLv3 cipher=RC4-MD5); Sat, 29 Aug 2009 22:26:22 -0700 (PDT) Message-ID: <4A9A10B9.2070802@gmail.com> Date: Sun, 30 Aug 2009 05:26:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cgen@sourceware.org Subject: [PATCH] fix sim-test likewise to gas-test Content-Type: multipart/mixed; boundary="------------080607080908020607010002" Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00084.txt.bz2 This is a multi-part message in MIME format. --------------080607080908020607010002 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 399 Hi CGEN, I think this patch is about right. It stringifies the test data at a handy point where it's all being mapped over a list anyway, and now I get a working sim-build.sh and a tmpdir/ full of *.cgs scripts. * sim-test.scm (build-sim-testcase): Convert test-data and syntax-list items to strings. (cgen-build.sh): Stringify current-arch-name throughout. cheers, DaveK --------------080607080908020607010002 Content-Type: text/x-c; name="sim-test-stringfix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sim-test-stringfix.diff" Content-length: 1921 Index: sim-test.scm =================================================================== --- sim-test.scm (revision 145) +++ sim-test.scm (working copy) @@ -128,14 +128,14 @@ (lambda () (display sl))))))) syntax-list) ", test data: " - (map (lambda (td) (list " " td)) + (map (lambda (td) (list " " (->string td))) test-data) "\n") (let loop ((result nil) (sl syntax-list) (td test-data)) ;(display (list result sl td "\n")) (cond ((null? sl) (string-append "\t" - (apply string-append (reverse result)) + (apply string-append (map (lambda (x) (->string x)) (reverse result))) "\n")) ((string? (car sl)) (loop (cons (car sl) result) (cdr sl) td)) @@ -175,7 +175,7 @@ (string-append "\ #/bin/sh -# Generate test result data for " (current-arch-name) " simulator testing. +# Generate test result data for " (->string (current-arch-name)) " simulator testing. # This script is machine generated. # It is intended to be run in the testsuite source directory. # @@ -191,7 +191,7 @@ cd tmpdir (string-append "cat < " (gen-file-name (obj:name insn)) ".cgs\n" ; FIXME: Need to record assembler line comment char in .cpu. - "# " (current-arch-name) " testcase for " (backslash "$" (insn-syntax insn)) " -*- Asm -*-\n" + "# " (->string (current-arch-name)) " testcase for " (backslash "$" (insn-syntax insn)) " -*- Asm -*-\n" "# mach: " (let ((machs (insn-machs insn))) (if (null? machs) @@ -215,9 +215,9 @@ cd tmpdir (logit 1 "Generating sim-allinsn.exp ...\n") (string-append "\ -# " (string-upcase (current-arch-name)) " simulator testsuite. +# " (string-upcase (->string (current-arch-name))) " simulator testsuite. -if [istarget " (current-arch-name) "*-*-*] { +if [istarget " (->string (current-arch-name)) "*-*-*] { # load support procs (none yet) # load_lib cgen.exp --------------080607080908020607010002--