From b3f33e78fbaadf791949919f9275943c6fd97e36 Mon Sep 17 00:00:00 2001 From: CSRG Date: Tue, 13 Jan 1987 16:08:00 -0800 Subject: [PATCH] BSD 4_4 development Work on file usr/src/old/lisp/Notes.tahoe Synthesized-from: CSRG/cd3/4.4 --- usr/src/old/lisp/Notes.tahoe | 166 +++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 usr/src/old/lisp/Notes.tahoe diff --git a/usr/src/old/lisp/Notes.tahoe b/usr/src/old/lisp/Notes.tahoe new file mode 100644 index 0000000000..4ce48618e8 --- /dev/null +++ b/usr/src/old/lisp/Notes.tahoe @@ -0,0 +1,166 @@ +The following was a change log of the CCI "tahoe" porting. + + +04/27 Rewrote fixmask.c to properly preserve r6 and r7. This method used should +have been used for the Vax; as it was, one had to count the number of register +variables declared in a function, and fixmask rebuilt the savemask from +scratch. This was a little bit kludgey; the new version simply OR's in +the two registers into the mask. + +04/29 Replaced assembly version of exarith() with exarith.c from the 68k port, +with the call to emul() replaced my an asm(). Still slower than original vax. + +05/02 Repaired fixpbig.e, the sed(1) script that replaces certain function +calls with inline code and fast subroutine calls (the vax "jsb"), as well +as changing all references to "np" and "lbot" to r6 and r7. The fast calls +are gone, because the tahoe isn't capable of such things. The rest were +changed to reflect different calling strategies. + +08/29 Added an "#ifdef tahoe" to alloc.c which uses the original "ftstbit" +and "setbit" macros included in the source. The vax version uses asm()'s, +but I don't know the instruction set of the tahoe well enough to improve +on the macros' code. + +09/04-09/08 Replaced more functions from bigmath.c with C versions from the +68k port. ediv() and emul() calls were replaced with more asm's. Others were +moved into their own source files and used as they were. + +09/10 Replaced Pushframe() and Iretfromfr(). The original Pushframe depended +on being called by a jsb. The new version makes the best of what it can +get from the standard call frame, and changes it around to match what's needed +(as specified in frame.h). Iretfromfr() was moved from frame.c, and had +asm's added to replace the qfunction it called. This basically just undoes +Pushframe(). + +09/10 GOT RAWLISP RUNNING! Version as of this afternoon would print a banner +and allow one to eval a few S-expressions. Problems seem to include: stringing +back through the stack frames, ediv reserved opperands, who knows what else. + +09/18 Ediv requires that all of its arguments be registers. (Except for the +divisor, I think.) Very poorly documented. (as(1) doesn't compain. adb(1) +disassembles it properly. The architecture manual gives no indication of this.) +Now one can type numbers into the reader without getting a core dump, and +even do simple fixnum arithmetic. + +09/18 Due to a typo Iretfromfr() was putting the old value of fp into r12 +and not restoring fp at all. I don't yet know what problems this was causing. + +09/18 /lib/c2 is optimizing away the "fixpbig.e" substitution of +calls to sp() ==> "movl sp,d0". Since "sp" is not a valid second +argument to subl3 (again no assembler complaints), another illegal instruction +core dump occurrs. Fixed by replacing "movl sp,d0" with "moval (sp),d0". + +09/18 I can't figure out WHAT ediv's opperands are allowed to be. I'll +just fix those asm()'s until everyting works. + +09/18 Bignum division problems: +;; On a vax: +Franz Lisp, Opus 38.79 +-> (quotient 999999999999 25) +39999999999 +-> +;; On the tahoe: +Franz Lisp, Opus 38 +-> (quotient 999999999999 25) +198085033769738295431766579 +-> + +09/18 /lib/c2 was optimizing away another set of asm() constructs - in +this case the setting of r0 to the error frame location. "retfrom.s" is +the new, replaced version of Iretfromfr(). + +09/23 the ER% variables are not being correctly set to nil. +Cf. "sysat.c". Created raw.l to setq them, and discovered in +the process that semicolon hasn't got its readmacro properties +set up right. Flonums don't print correctly (always as ".0") +but seem to be capable of being added and comparred correctly. + +09/24 Went through lots of code and found that the ER% variables +ARE being set correctly. The garbage collector, however, seems to be +trying to trash them and return them to the freelist, therefore their +value cells are being turned into freelist pointers. Removing the sweep +phase from gc1() seems to remove both this problem and the spontaneous +readtable disappearance. The 'ftstbit' and 'setbit' macros are suspected +as being the culprits. + +09/24 Still suspecting something about the marking phase of gc1(). The +dumps looked awfully suspicious. + +09/25 The marking phase, and in particular the bitset macros, were probably +indeed at fault. The macros used the ordinary Motorola-type non-reversed +byte order, while the code that read the bitmaps had been rewritten since +they had, and used the Vax reversed byte order. Rewrote the macros to +no longer use bytes. + +09/25 Created "snlisp", the totally interpreted version of Franz. Works +fine except for the previously known bignum division bug and for cfasl'd +functions. + +09/26 Fixed cfasl'd function error. callg_() was pushing its arglist +onto the stack in reverse order. + +09/30 Reworked int:showstack, and added it to snlisp. A real mess (even +worse than it was before for the vax). + +09/30 Fixed the bignum division bug. In mlsb() a function call was incorrectly +translated into an asm("ediv..."). This is the last known Franz bug as +of now. + +10/23 RCS'd Liszt, and conditionalized it for the tahoe. Should work +identically as before, as a VAX cross-compiler. As a tahoe native compiler, +it still needs some work. + +11/08 Discovered that a problem with Liszt was that fixnum subtractions were +not being done properly due to a ***SEVERELY BRAIN DAMAGED BROKEN EMUL +INSTRUCTION***. Turned faulty emul instructions into calls to emul() +which replaces the sign-extend-and-add functionality of the emul instruction +with a manual 64-bit add. Bignum divisions resulting in a negative number +were broken too. + +11/10 Changed predecrement and postincrement modes in the compiler to make +up for the lack of same in the Tahoe instruction set. + +11/13 ** Found that the emul instruction problem was present only in the old +WCS**. When the machine was rebooted this afternoon the problem went away. +Calls to emul() will be turned back into asm's. + +11/14 Changed Lfasl() so that relocation of addresses works when an address +is not longword aligned. Also cleaned up the indentation. + +11/16 Fixed Liszt and changed qlinker() to change the method of function +linkage, again because of alignment problems. + +11/18 General repairs to fasl.c, and fixed a stupid quotemark typo (on my +part) in Liszt. Tried to port /usr/lib/lisp/autorun/tahoe. + +12/5 Made various changes to liszt. Output works mostly most of the time, +but some things (read: nliszt) dump core. + +12/8 Fixed liszt and qfuncl.c to remove shal instrucitons with negative +arguments, since these indescriminately mess up their opperands somehow. +Also changed subl2 in /usr/lib/lisp/autorun/tahoe with destination +sp, because subl2 doesn't seem to work on r14. r14 doesn't work as a source +opperand to movl either. Beats me why, I just fix 'em 'till they work. + +12/11 Looking for a bug which causes nliszt to bomb on any functions with +more than one argument. + +12/13 Above bug was caused by yet another missed postincrement instance. +Moved the postincrement handling around. Also ported code to handle &form +variable arguments. + +12/14 Repaired code for (\\ x y)... compiled output did an ashq and an ediv +on an odd register. + +12/16 Fixed a missed register save mask in one of the qfuncls. Added a missed +".align" to the code that handles &forms. + +12/17 Added r12 to qlinker's save mask. Added register mask for local functions +since they are now being called with calls's. + +12/18 Added register save masks to local functions. + +01/12 The _tynames table didn't have a necessary ".align 2" before it. This +was messing up compiled functions that called typep (causing align faults). + + -- 2.20.1