summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2016-02-29 18:26:54 +0000
committer Roland Levillain <rpl@google.com> 2016-02-29 18:26:54 +0000
commit42ad288254e660ad091d03fad8c8fbad1d34ec89 (patch)
tree6b5707f3d407f240b8e9df61c28b03f64d320c5b
parentc3bcf40e905c53ec857ec40a9ae45f4c86738929 (diff)
Fix the signature of the IndexOf entry point.
The IndexOf entry point was declared as taking four arguments (void*, uint32_t, uint32_t, uint32_t) whereas all actual implementations use three arguments (void*, uint32_t, uint32_t). As that fourth argument is not documented, drop it from the intrinsic declaration to have it match the implementations. Change-Id: I65d747033192025ccd2b9a5e8f8ed05b77a21941
-rwxr-xr-xcompiler/dex/quick/gen_invoke.cc1
-rw-r--r--compiler/optimizing/intrinsics_arm.cc1
-rw-r--r--compiler/optimizing/intrinsics_arm64.cc1
-rw-r--r--compiler/optimizing/intrinsics_mips64.cc1
-rw-r--r--runtime/entrypoints/quick/quick_default_externs.h2
-rw-r--r--runtime/entrypoints/quick/quick_entrypoints_list.h2
6 files changed, 6 insertions, 2 deletions
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc
index 422d82ffa2..fe85555bc4 100755
--- a/compiler/dex/quick/gen_invoke.cc
+++ b/compiler/dex/quick/gen_invoke.cc
@@ -1357,6 +1357,7 @@ bool Mir2Lir::GenInlinedIndexOf(CallInfo* info, bool zero_based) {
LoadValueDirectFixed(rl_start, reg_start);
}
RegStorage r_tgt = LoadHelper(kQuickIndexOf);
+ CheckEntrypointTypes<kQuickIndexOf, int32_t, void*, uint32_t, uint32_t>();
GenExplicitNullCheck(reg_ptr, info->opt_flags);
LIR* high_code_point_branch =
rl_char.is_const ? nullptr : OpCmpImmBranch(kCondGt, reg_char, 0xFFFF, nullptr);
diff --git a/compiler/optimizing/intrinsics_arm.cc b/compiler/optimizing/intrinsics_arm.cc
index 4ce919ee39..a9da5fa696 100644
--- a/compiler/optimizing/intrinsics_arm.cc
+++ b/compiler/optimizing/intrinsics_arm.cc
@@ -1151,6 +1151,7 @@ static void GenerateVisitStringIndexOf(HInvoke* invoke,
__ LoadFromOffset(kLoadWord, LR, TR,
QUICK_ENTRYPOINT_OFFSET(kArmWordSize, pIndexOf).Int32Value());
+ CheckEntrypointTypes<kQuickIndexOf, int32_t, void*, uint32_t, uint32_t>();
__ blx(LR);
if (slow_path != nullptr) {
diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc
index 4be1695a94..ce595c54e0 100644
--- a/compiler/optimizing/intrinsics_arm64.cc
+++ b/compiler/optimizing/intrinsics_arm64.cc
@@ -1301,6 +1301,7 @@ static void GenerateVisitStringIndexOf(HInvoke* invoke,
}
__ Ldr(lr, MemOperand(tr, QUICK_ENTRYPOINT_OFFSET(kArm64WordSize, pIndexOf).Int32Value()));
+ CheckEntrypointTypes<kQuickIndexOf, int32_t, void*, uint32_t, uint32_t>();
__ Blr(lr);
if (slow_path != nullptr) {
diff --git a/compiler/optimizing/intrinsics_mips64.cc b/compiler/optimizing/intrinsics_mips64.cc
index ca2652b74a..0f98549716 100644
--- a/compiler/optimizing/intrinsics_mips64.cc
+++ b/compiler/optimizing/intrinsics_mips64.cc
@@ -1636,6 +1636,7 @@ static void GenerateStringIndexOf(HInvoke* invoke,
TMP,
TR,
QUICK_ENTRYPOINT_OFFSET(kMips64DoublewordSize, pIndexOf).Int32Value());
+ CheckEntrypointTypes<kQuickIndexOf, int32_t, void*, uint32_t, uint32_t>();
__ Jalr(TMP);
__ Nop();
diff --git a/runtime/entrypoints/quick/quick_default_externs.h b/runtime/entrypoints/quick/quick_default_externs.h
index fbf028d882..4e01d80312 100644
--- a/runtime/entrypoints/quick/quick_default_externs.h
+++ b/runtime/entrypoints/quick/quick_default_externs.h
@@ -93,7 +93,7 @@ extern "C" uint64_t art_quick_shr_long(uint64_t, uint32_t);
extern "C" uint64_t art_quick_ushr_long(uint64_t, uint32_t);
// Intrinsic entrypoints.
-extern "C" int32_t art_quick_indexof(void*, uint32_t, uint32_t, uint32_t);
+extern "C" int32_t art_quick_indexof(void*, uint32_t, uint32_t);
extern "C" int32_t art_quick_string_compareto(void*, void*);
extern "C" void* art_quick_memcpy(void*, const void*, size_t);
diff --git a/runtime/entrypoints/quick/quick_entrypoints_list.h b/runtime/entrypoints/quick/quick_entrypoints_list.h
index faa4747ec3..79d1c1377b 100644
--- a/runtime/entrypoints/quick/quick_entrypoints_list.h
+++ b/runtime/entrypoints/quick/quick_entrypoints_list.h
@@ -119,7 +119,7 @@
V(ShrLong, uint64_t, uint64_t, uint32_t) \
V(UshrLong, uint64_t, uint64_t, uint32_t) \
\
- V(IndexOf, int32_t, void*, uint32_t, uint32_t, uint32_t) \
+ V(IndexOf, int32_t, void*, uint32_t, uint32_t) \
V(StringCompareTo, int32_t, void*, void*) \
V(Memcpy, void*, void*, const void*, size_t) \
\