On Sun, Sep 30, 2001 at 11:31:21AM -0400, Gregor N. Purdy wrote:
> And, BTW, the current PackFile_Constant type isn't using a union.
> It has separate members for each type of constant. This could be
> changed once things are working. There's probably a few other
> things that could use some cleanup/refinement too, such as
> documentation.
Here is a patch for macros for accessing constants from ops. This uses
(INT|STR|NUM)_PCONST(i) for the relevant types. Best to avoid filling opcode
definitions with manual structure dereferences.
/* SET Nx, CONSTANT */
AUTO_OP set_n_nc {
NUM_REG(P1) = PCONST(P2)->number;
}
is now
/* SET Nx, CONSTANT */
AUTO_OP set_n_nc {
NUM_REG(P1) = NUM_PCONST(P2);
}
--
Jason
Thread Previous
|
Thread Next