From: Cary R. <cy...@ya...> - 2008-01-12 02:24:43
|
--- Stephen Williams <st...@ic...> wrote: > There are a handful of instructions in the vvp opcodes set that > are really pressed for operands. They are reduced to using implicit > index variables to carry operands that really can generally be > immediate. > > So I'm wondering aloud if maybe it *is* time to extend the size > of the opcode space. In particular, I've been thinking of > adding to the second union a pointer to a vvp_code_extend_s > struct. This struct can be *much* more liberal, and can carry > more number values. This may wind up allowing us to replace > several hackish instructions with instructions with longer > operand lists. Should this be done with the second argument or should it be collapsed down to a single argument. Something like: struct vvp_code_s { vvp_code_fun opcode; /* This determines the number/type of arguments. */ union { some_inclusive_arg_type_union single_arg; some_inclusive_arg_type_union *array_of_args; } } There is probably a trade off somewhere based on the argument distribution which may change as the opcodes are reviewed. Having a larger/arbitrary number of arguments would allow us to build more complex opcodes that should help performance (both speed and memory). Cary ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |