projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c779c0
)
[X86][compiler-rt] Attempt to fix a warning about a shift amount being negative in...
author
Craig Topper
<craig.topper@intel.com>
Sat, 24 Nov 2018 20:14:03 +0000
(20:14 +0000)
committer
Craig Topper
<craig.topper@intel.com>
Sat, 24 Nov 2018 20:14:03 +0000
(20:14 +0000)
llvm-svn: 347516
compiler-rt/lib/builtins/cpu_model.c
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/builtins/cpu_model.c
b/compiler-rt/lib/builtins/cpu_model.c
index
54f1add
..
239122f
100644
(file)
--- 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;
\
- else if (F < 64) \
- Features2 |= 1 << (F
- 32);
\
+#define setFeature(F)
\
+ do {
\
+ if (F < 32)
\
+ Features |= 1 <<
(F & 0x1f)
\
+ else if (F < 64)
\
+ Features2 |= 1 << (F
& 0x1f);
\
} while (0)
if ((EDX >> 15) & 1)