Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote: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)
First, we should probably ask HLL designers. I can imagine two options: 1) rotate whatever is there - don't care about higher bits 2) if higher bits are non-zero, throw an exception
context->errors can hold a bit to turn on/off 2)
How about a context->freakish that would allow
rotl Pdest, n, 5 # rotate 5 lowest ordered bits leaving # the others untouched rotl Pdest, n, 5, 6 # skip 6 lowest order bits, rotating # next 5 lowest ordered bits, leaving # the others untouched
I'd offer a practical justification, but I have none. It just feels cool and still allows for optimizing the real world cases.
Dan