Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: src/core/SkMath.cpp

Issue 21122005: fold SK_CPU_HAS_CONDITION_INSTR through as always defined (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: typo Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmapProcState_matrixProcs.cpp ('k') | src/core/SkMathPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMath.cpp
diff --git a/src/core/SkMath.cpp b/src/core/SkMath.cpp
index 0efedd727b08d87562fd9105422b3e14da39d533..2693e5c13c15389fb2de10e75c52bc316e7259b5 100644
--- a/src/core/SkMath.cpp
+++ b/src/core/SkMath.cpp
@@ -27,7 +27,6 @@ int SkCLZ_portable(uint32_t x) {
return 32;
}
-#ifdef SK_CPU_HAS_CONDITIONAL_INSTR
int zeros = 31;
if (x & 0xFFFF0000) {
sub_shift(zeros, x, 16);
@@ -44,24 +43,6 @@ int SkCLZ_portable(uint32_t x) {
if (x & 0x2) {
sub_shift(zeros, x, 1);
}
-#else
- int zeros = ((x >> 16) - 1) >> 31 << 4;
- x <<= zeros;
-
- int nonzero = ((x >> 24) - 1) >> 31 << 3;
- zeros += nonzero;
- x <<= nonzero;
-
- nonzero = ((x >> 28) - 1) >> 31 << 2;
- zeros += nonzero;
- x <<= nonzero;
-
- nonzero = ((x >> 30) - 1) >> 31 << 1;
- zeros += nonzero;
- x <<= nonzero;
-
- zeros += (~x) >> 31;
-#endif
return zeros;
}
« no previous file with comments | « src/core/SkBitmapProcState_matrixProcs.cpp ('k') | src/core/SkMathPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698