* found cause of cgen gas-test failures in list-ref
@ 2008-12-04 2:05 Alan Lehotsky
0 siblings, 0 replies; only message in thread
From: Alan Lehotsky @ 2008-12-04 2:05 UTC (permalink / raw)
To: cgen
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-04 2:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-04 2:05 found cause of cgen gas-test failures in list-ref Alan Lehotsky
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).