AArch64: Fix art_quick_string_compareto.
Though __memcmp16() is implemented in the same module as the caller, it
is still possible that the toolchain would put __memcmp16() into plt. In
that case, IP registers can be trashed when loading the function address.
Use x14/x15 to replace IP0/IP1.
Bug: 16974467
Change-Id: Ica7294b9bf90342031efa5fd51a86a6fcab5852b
diff --git a/runtime/arch/arm64/quick_entrypoints_arm64.S b/runtime/arch/arm64/quick_entrypoints_arm64.S
index 04be4a2..62ae099 100644
--- a/runtime/arch/arm64/quick_entrypoints_arm64.S
+++ b/runtime/arch/arm64/quick_entrypoints_arm64.S
@@ -1843,17 +1843,17 @@
ret
.Ldo_memcmp16:
- mov xIP0, x0 // Save x0 and LR. __memcmp16 does not use these temps.
- mov xIP1, xLR // TODO: Codify and check that?
+ mov x14, x0 // Save x0 and LR. __memcmp16 does not use these temps.
+ mov x15, xLR // TODO: Codify and check that?
mov x0, x2
uxtw x2, w3
bl __memcmp16
- mov xLR, xIP1 // Restore LR.
+ mov xLR, x15 // Restore LR.
cmp x0, #0 // Check the memcmp difference.
- csel x0, x0, xIP0, ne // x0 := x0 != 0 ? xIP0(prev x0=length diff) : x1.
+ csel x0, x0, x14, ne // x0 := x0 != 0 ? x14(prev x0=length diff) : x1.
ret
END art_quick_string_compareto