Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: "for" loops in C ... Message-ID: <419@auspex.UUCP> Date: 9 Nov 88 18:23:49 GMT References: <867@cernvax.UUCP> <645@quintus.UUCP> <339@igor.Rational.COM> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 13 >I don't get it. The operator << is defined in C as a left shift, what >does that have to do with a particular VAX instruction, ASHL, that happens >to mask its operand to the low-order 5 bits. Doesn't this merely mean that >on the VAX when the argument of the left shift is not a known constant that >the single instruction ASH sequence must be replaced by a multiple instruction >sequence that does the right thing? More precisely, "<<" is defined as a left shift that does unspecified things if the shift count is larger than the size of the (appropriately promoted) left-hand operand. Thus, the single VAX ASHL instruction implements what various language specs say "<<" means, and a left-shift instruction that *didn't* mask the shift count would also do so.