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?
Yes. It's been floating around but never did get formally added.
> ... (and yeah, I know thisis 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.
Yep. That got hashed out later in the thread, for the most part. But...
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
These have merit. The only question then is what happens with the rest of the bits. (If one rotates a 64 bit quantity with a 32-bit rotate)
--
Dan
--------------------------------------it's like this------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk