[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making MIPS vsn, Volatile, Top Level Forms

r /usr/users/ajb/qakcl
[Our mail has been destroying messages, sorry if these issues
have been delt with previously, but a new reply would be appretiated.]

AKCL 1.478 won't make.

I am trying to make AKcl verion 1.478 on a MIPS/RISCOS version 4.50 (June 90)
(CC version 2.11) using sgi4d.defs and it don't go.

The make chugs along until it trys to initialise defstruct.o on the Second
pass, at which point it crashes with a Segmentation Violation, dbx
reveals the following dubious trace back:-

   0 .(0xa6da14, 0x31, 0xa2cdb8, 0xa6bef0, 0x1) []
   1 assignment.setf(place = 0xd, form = 0x1) ["../c/assignment.c":344, 0x41857c]
   2 array_allocself(x = 0xa174e0, staticp = 10581216, dflt = 0x1) ["../c/array.c":311, 0x4572d4]

Adding trace to defstruct.lsp and recompiling using make saved_kcl_boot
reveals that it crashes in the (defstruct S-Data ...) code.

The whole thing had been compiled using sgi4d.defs
   CC = cc -O0 -g -G 80 -I${AKCLDIR}/o  -I/usr/include/bsd
-O0 to try to stop any optimiser bugs and volatility problems (see below).

My nasty fix was to twiddle sys_kcn.c so that it loaded defstruct.lsp, not
.o, which would have been all right given that the functions are not speed
critical.  The make now finished successfully but not surpisingly another
problem arose, namely that Load and Require give 
Error: The function ALLOCATE-RELOCATABLE-PAGES is undefined.
Although (dotimes (i 1000) (push (make-string 100) L)) worked fine.

I tried making 1.478 with the old 2.0 compliler that had successfully
compiled 1.257, and the problem still arose.  Mips are fairly good with
their compilers and the new compiler does successfully compile our main
product, a relational data base package.  I have not done the final test
of trying to compile 1.257 on the new compiler.

By the way functions to interogate and manipulate arbitrary structures seem
to be missing from CLtL, they would have made some of my debugging routines
easier to write.  Are there plans to include these in the future?


A problem noted with AKCL 1.257 is that it generates code like this
from a With-Open-File (I assume the Unwind-Protect triggers it):-

	typedef union lispunion *object;
	static L77()
	{register object *VOL base=vs_base;
		{object V39;
		base[6]= (V39);

Which in the new 2.11 CC generates the following error:-

ccom: Error: iew-in.c, line 2821: operands of = have incompatible types
      	base[6]= (V39);

I have not found any litterature or met anyone that knows what Volatile
REALY means, is base a volatile pointer to a pointer to an object,
or a pointer to a volatile pointer to an object?  I would have though 
assigning a pointer to a non-volatile object to a volatile pointer should
have been alright, but not visa versa.
In any case this code don't work on the new 2.11 mips compiler.

Top Level Confusion

Having read all the AKCL provided documentation on top level form
processing I am still confused.  For example I cannot see what is wrong
        (defmacro foo (x) `(car ,x))
        (eval-when (eval compile load)
            (print (foo '(a b c))))
Surely in Eval or Load the defmacro is seen first during the load, and
the text seems to say that macro definitions are available to Compiler,
I would hope so.  Does anybody have any clarifying documentation?


Has anybody successfully ported 1.478 or a simmilar version to the Mips?
Robert Boyer kindly sent me this and version 1.473 as I do not have direct
access to the internet, but I do not understand the significance of this.
If not, any ideas about what I should look for?