Dan Sugalski <[EMAIL PROTECTED]> wrote:

> Rotates on bools are meaningless (nothing happens), ints rotate at 32
> or 64 bits depending on the native word size

First: we don't have any rotate vtables or opcodes. Shall these be
considered as a TODO?

> ... (and yeah, I know this
> is going to be an issue), and bignums rotate assuming they're binary
> numbers some multiple of 8 bits (minimum 64 bits).

And that as well as the above int rotate seems to make these operations
rather arbitrary. What about:

  rotl Pdest, Psrc, 32  # rotate left by 1 32-bitwise
  rotr Pdest, Psrc, 64  # rotate right by 1 64-bitwise, expand if needed

or/and:

  rotl Pdest, Psrc, n, 32  # rotate left by n 32-bitwise
  rotl Pdest, n, 32        # rotate left in place by n 32-bitwise

leo

Reply via email to