Bryan --

> I got most of the casting and arithmetic problems patched [1], but am running
> into alignment problems with the bytecode because it currently expects 
> sizeof(opcode_t) == sizeof(IV).  (Or something, I can't tell quite yet 
> whether the problems in the assembler or the _unpack function.)  In either 
> case, I know that we'll still have alignment problems once we hit runops 
> land.

> What are we going to do about this?

The stuff I'm about to check in that allows NVs to move to the constant
table is set up to also allow IVs to live there, too. I haven't made
the assembler and the ops do that yet, but it is possible. I thought we
were going to have sizeof(IV) == sizeof(OP), and handle larger integers
via PMCs. But if we are going to have the possiblity that sizeof(IV) !=
sizeof(OP), then we probably do need to move IV constants out of the
bytecode stream.

Heck, for really compact stuff, we could use a type so that sizeof(OP)
== 2 instead of 4. That still gives us 16 bit opcodes, 16 bits worth
of constant indexes, and 11 more bits than we need for register numbers.

If we knew we were going to have no more than 256 active ops in a
program, and no more than 256 constants, we could even use an 8-bit
type for opcode_t. At least then we'd only be wasting three bits per
register operand...


Regards,

-- Gregor
 _____________________________________________________________________ 
/     perl -e 'srand(-2091643526); print chr rand 90 for (0..4)'      \

   Gregor N. Purdy                          [EMAIL PROTECTED]
   Focus Research, Inc.                http://www.focusresearch.com/
   8080 Beckett Center Drive #203                   513-860-3570 vox
   West Chester, OH 45069                           513-860-3579 fax
\_____________________________________________________________________/

Reply via email to