AArch64: Add memcmp16() for Arm64; ensure xSELF not clobbered

This patch modifies memcmp() to memcmp16(). Please note that this
implementation of memcmp16() is based on the bionic's memcmp().

However, to reflect a recent specification change, the file has been
modified to respect the new String.compareTo() behavior.

A test for memcmp16() has been added. The string_compareto test in
stub_test has been changed to invoke __memcmp16 in assembly stubs.

Add artIsAssignableFromCode to the list of native downcalls to
store and reload x18. Remove CheckSuspendFromCode, as it is unused.

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Change-Id: Ie0b5425ecfb62906d29a5d02e84c7e07ffb34a11
diff --git a/runtime/arch/stub_test.cc b/runtime/arch/stub_test.cc
index a31c08b..eb490eb 100644
--- a/runtime/arch/stub_test.cc
+++ b/runtime/arch/stub_test.cc
@@ -1222,8 +1222,12 @@
   // Use array so we can index into it and use a matrix for expected results
   // Setup: The first half is standard. The second half uses a non-zero offset.
   // TODO: Shared backing arrays.
-  static constexpr size_t kBaseStringCount  = 7;
-  const char* c[kBaseStringCount] = { "", "", "a", "aa", "ab", "aac", "aac" , };
+  static constexpr size_t kBaseStringCount  = 8;
+  const char* c[kBaseStringCount] = { "", "", "a", "aa", "ab",
+      "aacaacaacaacaacaac",  // This one's under the default limit to go to __memcmp16.
+      "aacaacaacaacaacaacaacaacaacaacaacaac",     // This one's over.
+      "aacaacaacaacaacaacaacaacaacaacaacaaca" };  // As is this one. We need a separate one to
+                                                  // defeat object-equal optimizations.
 
   static constexpr size_t kStringCount = 2 * kBaseStringCount;