This is the mail archive of the cgen@sourceware.org mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

found cause of cgen gas-test failures in list-ref


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]