MEMACCESS macro for NaCL Arm
BUG=333
TESTED=validator passes
R=jfb@chromium.org, tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/13649004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1012 16f28f9a-4ce2-e073-06de-1de4eb20be90
diff --git a/README.chromium b/README.chromium
index 1905093..22c107b 100644
--- a/README.chromium
+++ b/README.chromium
@@ -1,6 +1,6 @@
 Name: libyuv
 URL: http://code.google.com/p/libyuv/
-Version: 1011
+Version: 1012
 License: BSD
 License File: LICENSE
 
diff --git a/include/libyuv/row.h b/include/libyuv/row.h
index 7a54e4a..cdb6eea 100644
--- a/include/libyuv/row.h
+++ b/include/libyuv/row.h
@@ -427,7 +427,7 @@
     "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" \
     #opcode " (%%r15,%%r14),%" #arg "\n" \
     BUNDLEUNLOCK
-#else
+#else  // defined(__native_client__) && defined(__x86_64__)
 #define BUNDLEALIGN "\n"
 #define MEMACCESS(base) "(%" #base ")"
 #define MEMACCESS2(offset, base) #offset "(%" #base ")"
@@ -444,6 +444,15 @@
     #opcode " %%" #reg ","#offset "(%" #base ",%" #index "," #scale ")\n"
 #define MEMOPARG(opcode, offset, base, index, scale, arg) \
     #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n"
+#endif  // defined(__native_client__) && defined(__x86_64__)
+
+#if defined(__arm__)
+#undef MEMACCESS
+#if defined(__native_client__)
+#define MEMACCESS(base) "bic %" #base ", #0xc0000000\n"
+#else
+#define MEMACCESS(base) "\n"
+#endif
 #endif
 
 void I444ToARGBRow_NEON(const uint8* src_y,
diff --git a/include/libyuv/version.h b/include/libyuv/version.h
index e4534ca..fd47537 100644
--- a/include/libyuv/version.h
+++ b/include/libyuv/version.h
@@ -11,6 +11,6 @@
 #ifndef INCLUDE_LIBYUV_VERSION_H_  // NOLINT
 #define INCLUDE_LIBYUV_VERSION_H_
 
-#define LIBYUV_VERSION 1011
+#define LIBYUV_VERSION 1012
 
 #endif  // INCLUDE_LIBYUV_VERSION_H_  NOLINT
diff --git a/source/compare_neon.cc b/source/compare_neon.cc
index 77f42f4..5e7b8e4 100644
--- a/source/compare_neon.cc
+++ b/source/compare_neon.cc
@@ -9,6 +9,7 @@
  */
 
 #include "libyuv/basic_types.h"
+#include "libyuv/row.h"
 
 #ifdef __cplusplus
 namespace libyuv {
@@ -27,14 +28,9 @@
 
     ".p2align  2                               \n"
   "1:                                          \n"
-    // TODO(fbarchard): Define a macro for clearing address bits for NaCL.
-#if defined(__native_client__)
-    "bic        %0, #0xc0000000                \n"
-#endif
+    MEMACCESS(0)
     "vld1.8     {q0}, [%0]!                    \n"
-#if defined(__native_client__)
-    "bic        %1, #0xc0000000                \n"
-#endif
+    MEMACCESS(1)
     "vld1.8     {q1}, [%1]!                    \n"
     "subs       %2, %2, #16                    \n"
     "vsubl.u8   q2, d0, d2                     \n"