Mail Archives: djgpp/1998/07/26/00:16:38
On Sat, 25 Jul 1998 16:40:49 -0700, Nate Eldredge <nate AT cartsys DOT com>
wrote:
>Assuming it does something similar to what it did in Turbo C:
>
>/* Non-portable version */
>
>inline unsigned long _lrotl(unsigned long n, int c)
>{
> asm("roll %b2, %0"
> : "=g" (n)
> : "0" (n), "ci" (c));
> return n;
>}
Wow! Thanks, thats look good. Meanwhile i write own version which is
look like:
inline int _lrotl
(
int iValue,
int iRotate
)
{
asm
(
"rol %%cl, %0 \n"
: "=r" (iValue)
: "c" (iRotate), "0" (iValue)
);
return iValue;
}
So my questions is:
> asm("roll %b2, %0"
a) That is %b2 mean?
> : "0" (n), "ci" (c));
b) That is "ci" mean?
Vladimir
- Raw text -