At 10:17 PM 9/12/2001 +0100, Philip Kendall wrote:
>On Wed, Sep 12, 2001 at 07:21:06PM +0100, Philip Kendall wrote:
>
>[Coredumps on Alpha]
>
> > Quick research reveals the obvious problem: even when IVs are 64 bit,
> > assemble.pl is still 32 bit (as $pack_types{i} is the 32-bit type 'l').
> > Changing this over to 'q' means I get further, but it's still
> > segfaulting further in, which I'll look at in a bit.
>
>OK... further research reveals more assembler problems, one 64 bit
>problem and something I'm not sure about...
>
>* Assembler: the `l' in %pack_type, all the `i's in %real_type and the
>   `l' on line 86 all need to be `q' to give us 64 bit words everywhere.
>   This is just a bodge fix as it breaks 32 bit stuff.

We actually want 32-bit words everywhere, so an alternate fixup's needed. 
I'll go hack the code to treat the bytecode as a stream of 32-bit words. 
(The embedded doubles in the bytecode stream are a mess too)

>* 64 bit problem: in config.h, MASK_CHUNK_LOW_BITS is defined as
>   0xfffff000, which isn't going to work for machines with 64 bit
>   pointers. Is (~(IV)0x0fff) a portable replacement?

Yup.

>* The trickier one: with the above two changes, test and test2 work,
>   but test3 tries to pop a non-existent stack frame. In Parrot_pop_i,
>   should the fragment:
>
>       if (chunk_base->prev) {
>         /* Do so. We don't need to adjust used/free, since they're
>            already OK for the "We're full" case */
>         chunk_base = chunk_base->prev;
>         interpreter->int_reg = &chunk_base->IReg[chunk_base->used];
>        }
>
>   actually be:
>
>       if (chunk_base->prev) {
>         /* Do so. We don't need to adjust used/free, since they're
>            already OK for the "We're full" case */
>         chunk_base = chunk_base->prev;
>         interpreter->int_reg = &chunk_base->IReg[chunk_base->used - 1];
>        }
>
>   If chunk_base->used == 1, I think we want chunk_base->IReg[0], not
>   chunk_base->IReg[1]?? (but I'll happily admit I haven't got my head
>   around the memory management yet). Similar considerations apply to the
>   other Parrot_pop_? functions.

That may well fix a problem that's been here. I'll go poke around and see 
if its right. (I think it is...)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to