In a recent note John Gilmore said:

> Date:         Mon, 26 Sep 2005 02:18:15 +0000
>
> Meanwhile, I have found the new FLOGR instruction---It finds the leftmost
> instance of a '1'b bit in a register doubleword---very convenient indeed for
> scanning bit tables; and I have elected to use it when possible asnd to
> provide an eponymous macro that does the same thing, albeit much more
> slowly, on platforms that do not make FLOGR available.
>
Ah!  The JFFO instruction which appeared on the decsystem KA-10 in
1968 (according to an unscientific Google search).  I suppose it's
OK for IBM to use it now, since any patent has presumably expired.

But I'm curious how to do it.  Binary search with CLR, shifting a
mask bit around?  Novel use of TR and TRT?  Alas, it's far easier
to find the rightmost '1'b bit than the leftmost.

Can your macro use FLOGR when available, possibly by setting a SPIE
emulating FLOGR when it causes an operation exception?

"Eponymous"?  I had thought the adjective applied to the source of
the name, rather than the recipient.  A Google search has convinced
me both usages prevail.

-- gil
--
StorageTek
INFORMATION made POWERFUL

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to