On Monday, December 8, 2003, at 10:03 , Dan Sugalski wrote:
At 1:21 PM -0500 12/3/03, Melvin Smith wrote:We should have 1 recommended way for testing NULL registers.
If we support get_bool() then lets make sure it works for REAL NULL pmc registers as well as PMCNULL.
If not, code will appear to work correctly on a "safe" core but will seg fault on some other. Also, I see no reason not to use PMCNULL in all cores now.
Okay, lets do this:
Add an isnull branch op:
isnull Px, destination
How about this to test if Px is really null?
null Py eq_addr Px, Py
That involves explicitly doing things with PMCs we've just decared are bogus. Seems a little backwards. :)
I think I'd prefer the check for explicit bogusness be a separate opcode, that way it can also check for real NULLs.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk