FloatArrayPlugin & 64bitting

Dave Mason dmason at sarg.ryerson.ca
Fri Apr 29 16:08:40 UTC 2005

>>>>> On Thu, 28 Apr 2005 18:12:05 -0700, Tim Rowledge <tim at rowledge.org> said:

> FloatArrayPlugin doesn't feel well when we generate it from the
> 64bit VMMaker alpha. It has a clause:

>	argPtr = ((float *) (interpreterProxy->firstIndexableField(arg)));
>	for (i = 0; i <= (length - 1); i += 1) {
>		if ((longAt(argPtr + i)) == 0) {
>			return interpreterProxy->primitiveFail();
>		}

> which upsets the typing of longAt since it expects an sqInt. I can
> trivially alter it to cast the rcvrPtr to an sqInt for the use of
> the longAt and it compiles/runs ok.

> I have no idea if a 64bit machine will have floats of 64 bits (ie
> the same as sqInt) or if they stay 32bit (ie we have to use plain
> int, which may upset longAt on a 64bit machine) or what.

This is a float* (i.e. a pointer) not a float.  I assume that sqInt is
defined as equivalent in size to a pointer (since that is the point),
so casting it to an sqInt should be exactly correct.  I also assume
that firstIndexableField returns a type that is compatible with sqInt.

> And since I have no 64bit setup, I can't say I'm massively bothered
> right now.

I haven't yet started poking at this (I have a HP/Compaq/DEC Alpha
that I'm going to be running a production squeak/seaside server on, so
I'm keen on the 64-bit stuff, but haven't quite got the time yet).


More information about the Vm-dev mailing list