Message ID | 20180416111132.GP8577@tucnak |
---|---|
State | New |
Headers | show |
Series | Fix libgcc/config/i386/cpuinfo.c warnings (PR target/84945) | expand |
--- libgcc/config/i386/cpuinfo.c.jj 2018-03-30 20:37:37.683185248 +0200 +++ libgcc/config/i386/cpuinfo.c 2018-04-16 13:04:45.239490344 +0200 @@ -275,7 +275,14 @@ get_available_features (unsigned int ecx } #define set_feature(f) \ - if (f < 32) features |= (1U << f); else features2 |= (1U << (f - 32)) + do \ + { \ + if (f < 32) \ + features |= (1U << (f & 31)); \ + else \ + features2 |= (1U << ((f - 32) & 31)); \ + } \ + while (0) if (edx & bit_CMOV) set_feature (FEATURE_CMOV);