On Mon, 2001-09-10 at 20:52, Dan Sugalski wrote:
> At 07:25 PM 9/10/2001 -0400, Bryan C. Warnock wrote:
> >I think Dan mentioned this,  but it looks like the suffixes can be derived
> >from the args being passed in.  That would greatly simply the assembler to
> >just the function names: set, eq, add, branch.
> >
> >Were there problems with the scheme, is someone working on it, or did it
> >fall through the cracks?  (I'm very much in favor of such a change, and will
> >pick it up if no one else is working on it.)
> 
> No, I dont' think so, and yes, respectively. (Or, rather, we did the easy 
> literal stuff first and planned on smartening up the assembler later. It's 
> in the TODO even... :)
> 
> 

Hint, Nudge, Wink:  the last patch I sent that hits on the assembler
should make it very easy to add better assembly checking

For example, register checking could be done like this:

if($rtype eq "I" || $rtype eq "N" || $rtype eq "P" || $rtype eq "S") {
    # its a register argument
    if($args[$_]=~m/^[INPS](\d+)$/) {
        my($arg_num)=$1;
        if($arg_num > 32) {
                # bad register number
        } else {
                $args[$_]=$arg_num;
        }
    } else {
        # non-register being used!
    }
} ...

Brian

Reply via email to