Revision 7487953d target-ppc/exec.h

b/target-ppc/exec.h
51 51
# define RETURN() __asm__ __volatile__("" : : : "memory");
52 52
#endif
53 53

  
54
static always_inline target_ulong rotl8 (target_ulong i, int n)
55
{
56
    return (((uint8_t)i << n) | ((uint8_t)i >> (8 - n)));
57
}
58

  
59
static always_inline target_ulong rotl16 (target_ulong i, int n)
60
{
61
    return (((uint16_t)i << n) | ((uint16_t)i >> (16 - n)));
62
}
63

  
64
static always_inline target_ulong rotl32 (target_ulong i, int n)
65
{
66
    return (((uint32_t)i << n) | ((uint32_t)i >> (32 - n)));
67
}
68

  
69
#if defined(TARGET_PPC64)
70
static always_inline target_ulong rotl64 (target_ulong i, int n)
71
{
72
    return (((uint64_t)i << n) | ((uint64_t)i >> (64 - n)));
73
}
74
#endif
75

  
76 54
#if !defined(CONFIG_USER_ONLY)
77 55
#include "softmmu_exec.h"
78 56
#endif /* !defined(CONFIG_USER_ONLY) */

Also available in: Unified diff