/* sys/rotate.h (emx+gcc) */

#if !defined (_SYS_ROTATE_H)
#define _SYS_ROTATE_H

#if defined (__cplusplus)
extern "C" {
#endif

__inline__ unsigned char _rotr8 (unsigned char value, int shift)
{
  unsigned char result;

  __asm__ volatile ("movb %b1, %b0; rorb %b2, %b0"
                    : "=a"(result) : "g"(value), "c"(shift));
  return result;
}

#if defined (__cplusplus)
}
#endif

#endif /* !defined (_SYS_ROTATE_H) */
