diff options
| author | Craig Topper <craig.topper@intel.com> | 2018-11-24 20:25:45 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2018-11-24 20:25:45 +0000 |
| commit | 428caa398c8be2ffb6c4da6d0153faa669fbc142 (patch) | |
| tree | d1257fcd3a3817f3c271112895de98a3913a99b6 /compiler-rt/lib/builtins | |
| parent | 62e5924dd6c17eb92b368c3cbf35ef6c84eac892 (diff) | |
| download | bcm5719-llvm-428caa398c8be2ffb6c4da6d0153faa669fbc142.tar.gz bcm5719-llvm-428caa398c8be2ffb6c4da6d0153faa669fbc142.zip | |
[X86] Make conversion of feature bits into a mask explicitly unsigned by using 1U instead of 1.
llvm-svn: 347517
Diffstat (limited to 'compiler-rt/lib/builtins')
| -rw-r--r-- | compiler-rt/lib/builtins/cpu_model.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler-rt/lib/builtins/cpu_model.c b/compiler-rt/lib/builtins/cpu_model.c index 239122ffb60..c0354a8bd68 100644 --- a/compiler-rt/lib/builtins/cpu_model.c +++ b/compiler-rt/lib/builtins/cpu_model.c @@ -462,12 +462,12 @@ static void getAvailableFeatures(unsigned ECX, unsigned EDX, unsigned MaxLeaf, unsigned Features2 = 0; unsigned EAX, EBX; -#define setFeature(F) \ - do { \ - if (F < 32) \ - Features |= 1 << (F & 0x1f) \ - else if (F < 64) \ - Features2 |= 1 << (F & 0x1f); \ +#define setFeature(F) \ + do { \ + if (F < 32) \ + Features |= 1U << (F & 0x1f) \ + else if (F < 64) \ + Features2 |= 1U << ((F - 32) & 0x1f); \ } while (0) if ((EDX >> 15) & 1) |

