OSDN Git Service

Fix the signature of the IndexOf entry point.
authorRoland Levillain <rpl@google.com>
Mon, 29 Feb 2016 18:26:54 +0000 (18:26 +0000)
committerRoland Levillain <rpl@google.com>
Mon, 29 Feb 2016 18:26:54 +0000 (18:26 +0000)
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

compiler/dex/quick/gen_invoke.cc
compiler/optimizing/intrinsics_arm.cc
compiler/optimizing/intrinsics_arm64.cc
compiler/optimizing/intrinsics_mips64.cc
runtime/entrypoints/quick/quick_default_externs.h
runtime/entrypoints/quick/quick_entrypoints_list.h

index 422d82f..fe85555 100755 (executable)
@@ -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);
index 4ce919e..a9da5fa 100644 (file)
@@ -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) {
index 4be1695..ce595c5 100644 (file)
@@ -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) {
index ca2652b..0f98549 100644 (file)
@@ -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();
 
index fbf028d..4e01d80 100644 (file)
@@ -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);
 
index faa4747..79d1c13 100644 (file)
   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) \
 \