[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*LDB, *DBP



    Date: 18 SEP 1980 0947-EDT
    From: JONL at MIT-MC (Jon L White)

        Date: 18 September 1980 04:06-EDT
        BTW I notice that the functions *ldb and *dpb take the byte
        specifcation shifted left by 30 (octal).  This causes (ldb x y)
        to expand into (*ldb (lsh x 30) y).  This seems pretty gratuitous
        to me since it only takes one instruction to have *ldb and *dpb
        do the lsh themselves.  (*ldb contains an unnecessary move anyway!)
    *LDB and *DPB take a pre-shifted argument so that when, for example,
    "x" is a constant, the call becomes  (*ldb <x>_30 y), and the executable
    sequence then doesn't include the LSH;  this in fact is the case worth
    optimizing.
In fact when X is a constant (LDB X Y) expands into (BOOLE 1 (LSH Y ...) ...)
So where is the gain?  In fact I would argue that the right solution
is to make LDB and DPB be subrs (you remember them?  You can funcall them?)
and have the compiler understand them (there is a LDB instruction...).
This would be compatable as we could keep *ldb and *dpb araound.