On Tue, Aug 31, 2004 at 06:58:02PM +0200, Leopold Toetsch wrote: : 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
Well, I'm just one datapoint, and maybe I'm a VHLL designer rather than an HLL designer, but with those caveats, it's my impression that most HLL designers these days don't much care about rotate at all. About the only people who do care nowadays are the crypto folks, and they could probably throw in a pasm() or some such if they need to get down to the porvair metal. Crypto folks tend to care about fixed sizes of integer, so I'd aim some ops at low-level types of known size and leave it at that. That also probably means that they'd prefer 1 over 2 just because crypto guys are usually into speed, but maybe someone here can speak with more authority on that subject. Seems to me the important thing from their viewpoint is that there be efficient ways of of doing things like extracting various chunks of n bits from an I register. If that's the case it may not much matter what you do with the high bits. I suppose another way to look at it is that they'll just want ops that'll JIT well, which usually means to make the ops work on the natural datatype sizes of the machine. But that fights against the fact that most crypto algorithms do their commutations based on a known number of bits. Larry