Count Leading Zeros (cntlzw)



I wanted to use this function -which is part of the PowerPC assembly
language- in a x86 architecture (prefered an Athlon).
This function calculates the leading zeros of a word.
I need this function to be really fast, so i thought to ask the basm group
:)

How should it be best implemented in order to be best optimised?

Thanks in advance
Kostas


.



Relevant Pages

  • Re: Count Leading Zeros (cntlzw)
    ... Kostas wrote: ... language- in a x86 architecture (prefered an Athlon). ... This function calculates the leading zeros of a word. ...
    (borland.public.delphi.language.basm)
  • Re: Count Leading Zeros (cntlzw)
    ... > language- in a x86 architecture (prefered an Athlon). ... Reverse) functions ... Prev by Date: ...
    (borland.public.delphi.language.basm)
  • Re: Count Leading Zeros (cntlzw)
    ... language- in a x86 architecture (prefered an Athlon). ... This function calculates the leading zeros of a word. ... mov cx,15 bsr ax,ax sub cx,ax mov ax,cx ...
    (borland.public.delphi.language.basm)
  • Re: Count Leading Zeros (cntlzw)
    ... Kostas ... > language- in a x86 architecture (prefered an Athlon). ... Prev by Date: ...
    (borland.public.delphi.language.basm)