From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27419 invoked by alias); 19 Aug 2009 03:41:55 -0000 Received: (qmail 27411 invoked by uid 22791); 19 Aug 2009 03:41:54 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,FB_WORD1_END_DOLLAR,SPF_PASS X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Aug 2009 03:41:47 +0000 Received: by ey-out-1920.google.com with SMTP id 5so1097761eyb.24 for ; Tue, 18 Aug 2009 20:41:43 -0700 (PDT) Received: by 10.210.115.10 with SMTP id n10mr1678491ebc.53.1250653303286; Tue, 18 Aug 2009 20:41:43 -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 5sm1982532eyh.36.2009.08.18.20.41.41 (version=SSLv3 cipher=RC4-MD5); Tue, 18 Aug 2009 20:41:42 -0700 (PDT) Message-ID: <4A8B77A1.8020501@gmail.com> Date: Wed, 19 Aug 2009 03:41:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Doug Evans CC: Dave Korn , cgen@sourceware.org Subject: Re: "make gas-test" broken? References: <4A6B1A40.1020405@gmail.com> <4A8AD9F7.30605@sebabeach.org> In-Reply-To: <4A8AD9F7.30605@sebabeach.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00058.txt.bz2 Doug Evans wrote: > btw, here's how I'm testing gas-test. > > bash$ cd src/cgen > bash$ guile > guile> (load "dev.scm") > guile> (load-gtest) > guile> (cload #:arch "../cpu/m32r.cpu") ; replace with path to your cpu > file of course > guile> (cgen-build.sh) > guile> (cgen-all-insn.exp) > > That should run without any errors. Hmm. Not for me it doesn't: cgen-build.sh give me: > Backtrace: > In ./gas-test.scm: > 57: 0* [list-ref ((a0 0) (a1 1)) {3}] > 57: 1* [car ... > 57: 2* [->string ... > 52: {3}* [string-append "" "" ... > In unknown file: > ?: 4* [# {3}] > In ./gas-test.scm: > 51: 5 [map # (0 {3} 2 1 1 1 2 0)] > ... > In ./cos.scm: > 1106: 6 (if class-desc.meth (apply (cdr class-desc.meth) (cons # args)) ...) > 1104: 7 (let* ((class-desc.meth #)) (if class-desc.meth (apply # #) ...)) > In ./gas-test.scm: > 132: 8 [send #(#("object" # h-accums ...) (# #f # ...)) test-data ...] > In unknown file: > ?: 9 [# #(#("object" # accs ...) (# #f # ...)) 8] > In ./cos.scm: > 1107: 10 [apply # (#(#("object" # accs ...) (# #f # ...) > ) 8)] > 1106: 11 (if class-desc.meth (apply (cdr class-desc.meth) (cons # args)) ...) > 1104: 12 (let* ((class-desc.meth #)) (if class-desc.meth (apply # #) ...)) > In ./gas-test.scm: > 140: 13 [send #(#("object" # accs ...) (# #f # ...)) test-data ...] > 172: 14* [operand-test-data #(#("object" # accs ...) (# #f # ...)) 8] > In unknown file: > ?: 15* [# #(#("object" # accs ...) (# #f # ...))] > In ./gas-test.scm: > 172: 16* [map # (#(# #) #(# #))] > 172: 17 (let ((test-data #) (len #)) (cond (# #) (else #))) > 204: 18* [build-test-set (#(# #) #(# #)) 8] > 202: 19* (let* (# # #) (string-map # test-set)) > 198: 20 [string-append "\x09.text > " "\x09.global " ... ... > 285: 21* [gen-gas-test #(#("object" # mvfachi-a "mvfachi-a" ...) (# #f # #f ... > ))] > In unknown file: > ?: 22* [# #(#("object" # mvfachi-a ...) (# #f # ...))] > ?: 23* [map # (#(# #) #(# #) #(# #) #(# #) ...)] > ?: 24 [map] > In ./utils.scm: > 100: 25* [apply # (# (# # # # ...)) > ] > 100: 26 [apply # ... > In ./gas-test.scm: > 284: 27* [string-map # (#(# #) #(# #) #(# #) #(# #) ...)] > 229: 28 [string-append "#/bin/sh > # Generate test result data for " m32r ... ... > In standard input: > 4: 29* [cgen-build.sh] > > ./gas-test.scm:57:29: In procedure list-ref in expression (list-ref test-cases n > ): > ./gas-test.scm:57:29: Argument 2 out of range: 3 > ABORT: (out-of-range) > guile> And my own target seems to fall at the first hurdle: > Backtrace: > In ./gas-test.scm: > 229: 0 [string-append "#/bin/sh > # Generate test result data for " ...] > In standard input: > 4: 1* [cgen-build.sh] > > ./gas-test.scm:229:3: In procedure string-append in expression (string-append "# > /bin/sh > # Generate test result data for " (current-arch-name) ...): > ./gas-test.scm:229:3: Wrong type (expecting string): foobararch > ABORT: (wrong-type-arg) > guile> ... where 'foobararch' is the name attribute from my define-arch: > (define-arch > (name "foobararch") > (comment "Example") > (default-alignment aligned) > (insn-lsb0? #t) > (machs foobar24) > (isas foobarisa) > ) It doesn't make any difference whether or not I quote 'foobararch' in that definition. What can I do next to find out why the m32r regeneration doesn't work for me? I'm using Guile 1.8.2 (on Cygwin) and I updated cgen from CVS earlier today; I have no significant local diffs, just this in Makefile.am/in: -ARCHFILE = $(srcroot)/cpu/$(ARCH).cpu +ARCHFILE = $(word 1,$(wildcard $(srcroot)/cpu/$(ARCH).cpu $(srcroot)/cgen/cpu/$(ARCH).cpu)) and this in mode.scm: (dfm 'HI "16 bit int" '() 'INT 16 2 "int" "'x'" #f #f #f) + (dfm 'TQI "24 bit int" '() 'INT 24 3 "int" "'x'" #f #f #f) (dfm 'SI "32 bit int" '() 'INT 32 4 "int" "'x'" #f #f #f) (dfm 'DI "64 bit int" '(FN-SUPPORT) 'INT 64 8 "" "'D'" #f #f #f) @@ -517,6 +518,8 @@ Define a mode, all arguments specified. 8 1 "unsigned int" "'x'" (mode:lookup 'QI) #f #f) (dfm 'UHI "16 bit unsigned int" '() 'UINT 16 2 "unsigned int" "'x'" (mode:lookup 'HI) #f #f) + (dfm 'UTQI "24 bit unsigned int" '() 'UINT + 24 3 "unsigned int" "'x'" (mode:lookup 'TQI) #f #f) ... neither of which I'd expect to cause this kind of problem. I guess I'll try it on a linux vm tomorrow morning and see what happens there. cheers, DaveK