diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Headers/arm_acle.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h index 8238323f5e1..814df2c3d78 100644 --- a/clang/lib/Headers/arm_acle.h +++ b/clang/lib/Headers/arm_acle.h @@ -111,15 +111,15 @@ static __inline__ void __attribute__((always_inline, nodebug)) __nop(void) { /* ROR */ static __inline__ uint32_t __attribute__((always_inline, nodebug)) __ror(uint32_t x, uint32_t y) { - if (y == 0) return y; - if (y >= 32) y %= 32; + y %= 32; + if (y == 0) return x; return (x >> y) | (x << (32 - y)); } static __inline__ uint64_t __attribute__((always_inline, nodebug)) __rorll(uint64_t x, uint32_t y) { - if (y == 0) return y; - if (y >= 64) y %= 64; + y %= 64; + if (y == 0) return x; return (x >> y) | (x << (64 - y)); } |

