From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25096 invoked by alias); 4 Dec 2008 02:05:44 -0000 Received: (qmail 25081 invoked by uid 22791); 4 Dec 2008 02:05:42 -0000 X-Spam-Check-By: sourceware.org Received: from elasmtp-dupuy.atl.sa.earthlink.net (HELO elasmtp-dupuy.atl.sa.earthlink.net) (209.86.89.62) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Dec 2008 02:05:02 +0000 Received: from [209.128.140.171] (helo=[10.0.1.14]) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1L83aO-0002zf-AB for cgen@sourceware.org; Wed, 03 Dec 2008 21:05:00 -0500 Message-Id: <9A2D366F-C0CA-4C7F-9E24-CA5EEF1FD011@earthlink.net> From: Alan Lehotsky To: cgen@sourceware.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: found cause of cgen gas-test failures in list-ref Date: Thu, 04 Dec 2008 02:05:00 -0000 X-ELNK-Trace: 9e0cfd4f457cc6ab94f5150ab1c16ac0eafd45f126befae220fbbd167662cced459a9745535df67b350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c 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: 2008-q4/txt/msg00015.txt.bz2 I found the source of the problem. And since I've seen mail from others who seemed confused by similar problems I'll share my methodology and results.... I had a register file with only 8 entries, indexed by an external- keyword with 8 entries; but the instruction field holding these values was 6 bits (allowing potentially 64 registers to be physically addressed. This caused the keyword operand generation in gas-test.scm ~line 40 to try and index into the define-keyword table beyond the end. I found this with a combination of the magical (logit 1 .......) function to print out trace messages and eventually by replacing the failing call (list-ref test-cases n) by (list-maybe-ref test-cases n) and instrumenting the else-clause of the (if (< n (length l)) to print out the last good index value. No real idea how best to fix this in the source -- I'm pretty rusty as a lisp programmer (although I have used the IBM 7094 responsible for the CAR and CDR acronyms....) If I had to guess, it would be to avoid map-ing elements that are short.... I decided to work around it by not allowing a 6 bit instruction field.