From: david DOT stegbauer AT cz DOT opel DOT com X-Lotus-FromDomain: GMCZECHIA AT EDSHUBEUROPE Sender: david DOT stegbauer AT cz DOT opel DOT com To: djgpp AT delorie DOT com Message-ID: <41256740.00467923.00@derumg01.cyberlink.eds.com> Date: Fri, 26 Mar 1999 14:03:03 +0100 Subject: Re: Inline assembly - rotate left Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline Reply-To: djgpp AT delorie DOT com Nate Eldredge and Michael Bukin gave me some hints to improve, so there is better version: #ifdef __DJGPP__ #define roll(val,cnt) asm volatile (\ "roll %%cl, %1" \ :"=r" (val) \ :"0"(val), "c"(cnt)) #endif /*__DJGPP__*/ Unfortunately statement-as-expression extension of gcc is unusable for me, because this macro has to be used with Borland C++ with the same syntax as with djgpp (but another definition, of course) Thanks for your improvements, roll macro is used in inner loop of MD5 hashing and any speedup is very good. By the way, isn't a pity that gcc nor libc doesn't offer rotating, is it? David