Yes, there is such an instruction. Something like __rol() and __ror().
It's in the docs...
By the way, of what use is masking "a" with 0xffffffff? That changes no
bits in "a". Does it have the effect of making "a" unsigned? If so, then
why not just cast it to an "unsigned long" or "UInt32"?
-- Keith
-----Original Message-----
From: Ioi Lam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 5:53 PM
To: Palm Developer Forum
Subject: How to for CodeWarrior to generate ROL/ROR op code?
Hi,
I am in a situation where using direct asm code is not feasible. I have
a macro like this:
#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
Which CodeWarrior apparently doesn't compile into thr ROL/ROR op code.
Is there a compiler directive or special macro that can tell CodeWarrior
to do that? My ROTATE macro is buried inside a lot of C code and it's
hard to rewrite all of it to asm code.
Thanks!
- Ioi
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/