BSD 4_4 development
[unix-history] / usr / src / old / lisp / Notes.tahoe
CommitLineData
b3f33e78
C
1The following was a change log of the CCI "tahoe" porting.
2
3
404/27 Rewrote fixmask.c to properly preserve r6 and r7. This method used should
5have been used for the Vax; as it was, one had to count the number of register
6variables declared in a function, and fixmask rebuilt the savemask from
7scratch. This was a little bit kludgey; the new version simply OR's in
8the two registers into the mask.
9
1004/29 Replaced assembly version of exarith() with exarith.c from the 68k port,
11with the call to emul() replaced my an asm(). Still slower than original vax.
12
1305/02 Repaired fixpbig.e, the sed(1) script that replaces certain function
14calls with inline code and fast subroutine calls (the vax "jsb"), as well
15as changing all references to "np" and "lbot" to r6 and r7. The fast calls
16are gone, because the tahoe isn't capable of such things. The rest were
17changed to reflect different calling strategies.
18
1908/29 Added an "#ifdef tahoe" to alloc.c which uses the original "ftstbit"
20and "setbit" macros included in the source. The vax version uses asm()'s,
21but I don't know the instruction set of the tahoe well enough to improve
22on the macros' code.
23
2409/04-09/08 Replaced more functions from bigmath.c with C versions from the
2568k port. ediv() and emul() calls were replaced with more asm's. Others were
26moved into their own source files and used as they were.
27
2809/10 Replaced Pushframe() and Iretfromfr(). The original Pushframe depended
29on being called by a jsb. The new version makes the best of what it can
30get from the standard call frame, and changes it around to match what's needed
31(as specified in frame.h). Iretfromfr() was moved from frame.c, and had
32asm's added to replace the qfunction it called. This basically just undoes
33Pushframe().
34
3509/10 GOT RAWLISP RUNNING! Version as of this afternoon would print a banner
36and allow one to eval a few S-expressions. Problems seem to include: stringing
37back through the stack frames, ediv reserved opperands, who knows what else.
38
3909/18 Ediv requires that all of its arguments be registers. (Except for the
40divisor, I think.) Very poorly documented. (as(1) doesn't compain. adb(1)
41disassembles it properly. The architecture manual gives no indication of this.)
42Now one can type numbers into the reader without getting a core dump, and
43even do simple fixnum arithmetic.
44
4509/18 Due to a typo Iretfromfr() was putting the old value of fp into r12
46and not restoring fp at all. I don't yet know what problems this was causing.
47
4809/18 /lib/c2 is optimizing away the "fixpbig.e" substitution of
49calls to sp() ==> "movl sp,d0". Since "sp" is not a valid second
50argument to subl3 (again no assembler complaints), another illegal instruction
51core dump occurrs. Fixed by replacing "movl sp,d0" with "moval (sp),d0".
52
5309/18 I can't figure out WHAT ediv's opperands are allowed to be. I'll
54just fix those asm()'s until everyting works.
55
5609/18 Bignum division problems:
57;; On a vax:
58Franz Lisp, Opus 38.79
59-> (quotient 999999999999 25)
6039999999999
61->
62;; On the tahoe:
63Franz Lisp, Opus 38
64-> (quotient 999999999999 25)
65198085033769738295431766579
66->
67
6809/18 /lib/c2 was optimizing away another set of asm() constructs - in
69this case the setting of r0 to the error frame location. "retfrom.s" is
70the new, replaced version of Iretfromfr().
71
7209/23 the ER% variables are not being correctly set to nil.
73Cf. "sysat.c". Created raw.l to setq them, and discovered in
74the process that semicolon hasn't got its readmacro properties
75set up right. Flonums don't print correctly (always as ".0")
76but seem to be capable of being added and comparred correctly.
77
7809/24 Went through lots of code and found that the ER% variables
79ARE being set correctly. The garbage collector, however, seems to be
80trying to trash them and return them to the freelist, therefore their
81value cells are being turned into freelist pointers. Removing the sweep
82phase from gc1() seems to remove both this problem and the spontaneous
83readtable disappearance. The 'ftstbit' and 'setbit' macros are suspected
84as being the culprits.
85
8609/24 Still suspecting something about the marking phase of gc1(). The
87dumps looked awfully suspicious.
88
8909/25 The marking phase, and in particular the bitset macros, were probably
90indeed at fault. The macros used the ordinary Motorola-type non-reversed
91byte order, while the code that read the bitmaps had been rewritten since
92they had, and used the Vax reversed byte order. Rewrote the macros to
93no longer use bytes.
94
9509/25 Created "snlisp", the totally interpreted version of Franz. Works
96fine except for the previously known bignum division bug and for cfasl'd
97functions.
98
9909/26 Fixed cfasl'd function error. callg_() was pushing its arglist
100onto the stack in reverse order.
101
10209/30 Reworked int:showstack, and added it to snlisp. A real mess (even
103worse than it was before for the vax).
104
10509/30 Fixed the bignum division bug. In mlsb() a function call was incorrectly
106translated into an asm("ediv..."). This is the last known Franz bug as
107of now.
108
10910/23 RCS'd Liszt, and conditionalized it for the tahoe. Should work
110identically as before, as a VAX cross-compiler. As a tahoe native compiler,
111it still needs some work.
112
11311/08 Discovered that a problem with Liszt was that fixnum subtractions were
114not being done properly due to a ***SEVERELY BRAIN DAMAGED BROKEN EMUL
115INSTRUCTION***. Turned faulty emul instructions into calls to emul()
116which replaces the sign-extend-and-add functionality of the emul instruction
117with a manual 64-bit add. Bignum divisions resulting in a negative number
118were broken too.
119
12011/10 Changed predecrement and postincrement modes in the compiler to make
121up for the lack of same in the Tahoe instruction set.
122
12311/13 ** Found that the emul instruction problem was present only in the old
124WCS**. When the machine was rebooted this afternoon the problem went away.
125Calls to emul() will be turned back into asm's.
126
12711/14 Changed Lfasl() so that relocation of addresses works when an address
128is not longword aligned. Also cleaned up the indentation.
129
13011/16 Fixed Liszt and changed qlinker() to change the method of function
131linkage, again because of alignment problems.
132
13311/18 General repairs to fasl.c, and fixed a stupid quotemark typo (on my
134part) in Liszt. Tried to port /usr/lib/lisp/autorun/tahoe.
135
13612/5 Made various changes to liszt. Output works mostly most of the time,
137but some things (read: nliszt) dump core.
138
13912/8 Fixed liszt and qfuncl.c to remove shal instrucitons with negative
140arguments, since these indescriminately mess up their opperands somehow.
141Also changed subl2 in /usr/lib/lisp/autorun/tahoe with destination
142sp, because subl2 doesn't seem to work on r14. r14 doesn't work as a source
143opperand to movl either. Beats me why, I just fix 'em 'till they work.
144
14512/11 Looking for a bug which causes nliszt to bomb on any functions with
146more than one argument.
147
14812/13 Above bug was caused by yet another missed postincrement instance.
149Moved the postincrement handling around. Also ported code to handle &form
150variable arguments.
151
15212/14 Repaired code for (\\ x y)... compiled output did an ashq and an ediv
153on an odd register.
154
15512/16 Fixed a missed register save mask in one of the qfuncls. Added a missed
156".align" to the code that handles &forms.
157
15812/17 Added r12 to qlinker's save mask. Added register mask for local functions
159since they are now being called with calls's.
160
16112/18 Added register save masks to local functions.
162
16301/12 The _tynames table didn't have a necessary ".align 2" before it. This
164was messing up compiled functions that called typep (causing align faults).
165
166