TBR i#1551 Port DynamoRIO to ARM: fix minor ATOMIC_COMPARE_EXCHANGE_suffix bug

TBR=bruening@google.com
BUG=1551

Review URL: https://codereview.appspot.com/181830043

git-svn-id: https://dynamorio.googlecode.com/svn/trunk@3016 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6
diff --git a/core/arch/arch_exports.h b/core/arch/arch_exports.h
index 12afc0c..52341ef 100644
--- a/core/arch/arch_exports.h
+++ b/core/arch/arch_exports.h
@@ -532,7 +532,7 @@
 #  define ATOMIC_COMPARE_EXCHANGE_suffix(suffix, var, compare, exchange) \
      __asm__ __volatile__(                                            \
        "   ldrex" suffix " r2, %0       \n\t"                         \
-       "   cmp"   suffix " r2, %2       \n\t"                         \
+       "   cmp"   suffix " r2, %1       \n\t"                         \
        "   bne    1f                    \n\t"                         \
        "   strex" suffix " r3, %2, %0   \n\t"                         \
        "1: clrex                        \n\t"                         \