diff options
Diffstat (limited to 'compiler/dex/quick/x86/call_x86.cc')
-rw-r--r-- | compiler/dex/quick/x86/call_x86.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/compiler/dex/quick/x86/call_x86.cc b/compiler/dex/quick/x86/call_x86.cc index 2495757..43167a1 100644 --- a/compiler/dex/quick/x86/call_x86.cc +++ b/compiler/dex/quick/x86/call_x86.cc @@ -18,13 +18,13 @@ #include "codegen_x86.h" +#include "art_method.h" #include "base/logging.h" #include "dex/quick/dex_file_to_method_inliner_map.h" #include "dex/quick/mir_to_lir-inl.h" #include "driver/compiler_driver.h" #include "driver/compiler_options.h" #include "gc/accounting/card_table.h" -#include "mirror/art_method.h" #include "mirror/object_array-inl.h" #include "utils/dex_cache_arrays_layout-inl.h" #include "x86_lir.h" @@ -379,7 +379,8 @@ int X86Mir2Lir::X86NextSDCallInsn(CompilationUnit* cu, CallInfo* info, case 0: { CHECK_EQ(cu->dex_file, target_method.dex_file); size_t offset = cg->dex_cache_arrays_layout_.MethodOffset(target_method.dex_method_index); - cg->OpPcRelDexCacheArrayLoad(cu->dex_file, offset, cg->TargetReg(kArg0, kRef)); + cg->OpPcRelDexCacheArrayLoad(cu->dex_file, offset, cg->TargetReg(kArg0, kRef), + cu->target64); break; } default: @@ -394,18 +395,20 @@ int X86Mir2Lir::X86NextSDCallInsn(CompilationUnit* cu, CallInfo* info, break; case 1: // Get method->dex_cache_resolved_methods_ cg->LoadRefDisp(arg0_ref, - mirror::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value(), + ArtMethod::DexCacheResolvedMethodsOffset().Int32Value(), arg0_ref, kNotVolatile); break; - case 2: // Grab target method* + case 2: { + // Grab target method* CHECK_EQ(cu->dex_file, target_method.dex_file); - cg->LoadRefDisp(arg0_ref, - mirror::ObjectArray<mirror::Object>::OffsetOfElement( - target_method.dex_method_index).Int32Value(), - arg0_ref, - kNotVolatile); + const size_t pointer_size = GetInstructionSetPointerSize(cu->instruction_set); + cg->LoadWordDisp(arg0_ref, + mirror::Array::DataOffset(pointer_size).Uint32Value() + + target_method.dex_method_index * pointer_size, + arg0_ref); break; + } default: return -1; } |