aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMath.cpp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-30 13:16:29 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-30 13:16:29 +0000
commit38bad32cf5297ec6908620fd174cd08c937d331a (patch)
tree73e25dbca97c025c1bf563e25f8df66d9d53f172 /src/core/SkMath.cpp
parent5abacf672088bed1b6cd0d149aea0db1b8035dbc (diff)
fold SK_CPU_HAS_CONDITION_INSTR through as always defined
BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/21122005 git-svn-id: http://skia.googlecode.com/svn/trunk@10432 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkMath.cpp')
-rw-r--r--src/core/SkMath.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/core/SkMath.cpp b/src/core/SkMath.cpp
index 0efedd727b..2693e5c13c 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;
}