Home
last modified time | relevance | path

Searched refs:code (Results 1 – 25 of 196) sorted by relevance

12345678

/art/libdexfile/dex/
Ddex_instruction_utils.h92 constexpr bool IsInstructionIGet(Instruction::Code code) { in IsInstructionIGet() argument
93 return Instruction::IGET <= code && code <= Instruction::IGET_SHORT; in IsInstructionIGet()
96 constexpr bool IsInstructionIPut(Instruction::Code code) { in IsInstructionIPut() argument
97 return Instruction::IPUT <= code && code <= Instruction::IPUT_SHORT; in IsInstructionIPut()
100 constexpr bool IsInstructionSGet(Instruction::Code code) { in IsInstructionSGet() argument
101 return Instruction::SGET <= code && code <= Instruction::SGET_SHORT; in IsInstructionSGet()
104 constexpr bool IsInstructionSPut(Instruction::Code code) { in IsInstructionSPut() argument
105 return Instruction::SPUT <= code && code <= Instruction::SPUT_SHORT; in IsInstructionSPut()
108 constexpr bool IsInstructionAGet(Instruction::Code code) { in IsInstructionAGet() argument
109 return Instruction::AGET <= code && code <= Instruction::AGET_SHORT; in IsInstructionAGet()
[all …]
/art/dex2oat/linker/x86/
Drelative_patcher_x86.cc25 void X86RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
34 DCHECK_LT(anchor_literal_offset, code->size()); in PatchPcRelativeReference()
35 DCHECK_EQ((*code)[anchor_literal_offset - 5u], 0xe8u); in PatchPcRelativeReference()
36 DCHECK_EQ((*code)[anchor_literal_offset - 4u], 0x00u); in PatchPcRelativeReference()
37 DCHECK_EQ((*code)[anchor_literal_offset - 3u], 0x00u); in PatchPcRelativeReference()
38 DCHECK_EQ((*code)[anchor_literal_offset - 2u], 0x00u); in PatchPcRelativeReference()
39 DCHECK_EQ((*code)[anchor_literal_offset - 1u], 0x00u); in PatchPcRelativeReference()
40 DCHECK_EQ((*code)[anchor_literal_offset] & 0xf8u, 0x58u); in PatchPcRelativeReference()
45 DCHECK_LE(literal_offset, code->size()); in PatchPcRelativeReference()
46 DCHECK_EQ((*code)[literal_offset + 0u], static_cast<uint8_t>(kPlaceholder32BitOffset >> 0)); in PatchPcRelativeReference()
[all …]
Drelative_patcher_x86.h29 void PatchPcRelativeReference(std::vector<uint8_t>* code,
33 void PatchEntrypointCall(std::vector<uint8_t>* code,
36 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
Drelative_patcher_x86_base.cc44 void X86BaseRelativePatcher::PatchCall(std::vector<uint8_t>* code, in PatchCall() argument
48 DCHECK_LE(literal_offset + 4u, code->size()); in PatchCall()
54 reinterpret_cast<unaligned_int32_t*>(&(*code)[literal_offset])[0] = displacement; in PatchCall()
/art/runtime/
Doat_file-inl.h28 const void* code = EntryPointToCodePointer(GetOatPointer<const void*>(code_offset_)); in GetOatQuickMethodHeader() local
29 if (code == nullptr) { in GetOatQuickMethodHeader()
33 return reinterpret_cast<const OatQuickMethodHeader*>(code) - 1; in GetOatQuickMethodHeader()
53 const void* code = EntryPointToCodePointer(GetQuickCode()); in GetFrameSizeInBytes() local
54 if (code == nullptr) { in GetFrameSizeInBytes()
57 return reinterpret_cast<const OatQuickMethodHeader*>(code)[-1].GetFrameInfo().FrameSizeInBytes(); in GetFrameSizeInBytes()
61 const void* code = EntryPointToCodePointer(GetQuickCode()); in GetCoreSpillMask() local
62 if (code == nullptr) { in GetCoreSpillMask()
65 return reinterpret_cast<const OatQuickMethodHeader*>(code)[-1].GetFrameInfo().CoreSpillMask(); in GetCoreSpillMask()
69 const void* code = EntryPointToCodePointer(GetQuickCode()); in GetFpSpillMask() local
[all …]
/art/dex2oat/linker/arm/
Drelative_patcher_thumb2.cc57 void Thumb2RelativePatcher::PatchCall(std::vector<uint8_t>* code, in PatchCall() argument
64 PatchBl(code, literal_offset, displacement); in PatchCall()
67 void Thumb2RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
76 uint32_t insn = GetInsn32(code, literal_offset); in PatchPcRelativeReference()
84 SetInsn32(code, literal_offset, insn); in PatchPcRelativeReference()
87 void Thumb2RelativePatcher::PatchEntrypointCall(std::vector<uint8_t>* code, in PatchEntrypointCall() argument
95 PatchBl(code, patch.LiteralOffset(), displacement); in PatchEntrypointCall()
98 void Thumb2RelativePatcher::PatchBakerReadBarrierBranch(std::vector<uint8_t>* code, in PatchBakerReadBarrierBranch() argument
104 DCHECK_LT(literal_offset, code->size()); in PatchBakerReadBarrierBranch()
105 uint32_t insn = GetInsn32(code, literal_offset); in PatchBakerReadBarrierBranch()
[all …]
Drelative_patcher_thumb2.h37 void PatchCall(std::vector<uint8_t>* code,
41 void PatchPcRelativeReference(std::vector<uint8_t>* code,
45 void PatchEntrypointCall(std::vector<uint8_t>* code,
48 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
57 static void PatchBl(std::vector<uint8_t>* code, uint32_t literal_offset, uint32_t displacement);
59 static void SetInsn32(std::vector<uint8_t>* code, uint32_t offset, uint32_t value);
60 static uint32_t GetInsn32(ArrayRef<const uint8_t> code, uint32_t offset);
63 static uint32_t GetInsn32(Vector* code, uint32_t offset);
65 static uint32_t GetInsn16(ArrayRef<const uint8_t> code, uint32_t offset);
68 static uint32_t GetInsn16(Vector* code, uint32_t offset);
/art/compiler/utils/arm64/
Dassembler_arm64.h124 void GenerateMarkingRegisterCheck(vixl::aarch64::Register temp, int code = 0);
140 static vixl::aarch64::Register reg_x(int code) { in reg_x() argument
141 CHECK(code < kNumberOfXRegisters) << code; in reg_x()
142 if (code == SP) { in reg_x()
144 } else if (code == XZR) { in reg_x()
147 return vixl::aarch64::Register::GetXRegFromCode(code); in reg_x()
150 static vixl::aarch64::Register reg_w(int code) { in reg_w() argument
151 CHECK(code < kNumberOfWRegisters) << code; in reg_w()
152 if (code == WSP) { in reg_w()
154 } else if (code == WZR) { in reg_w()
[all …]
/art/dex2oat/linker/arm64/
Drelative_patcher_arm64.h42 void PatchCall(std::vector<uint8_t>* code,
46 void PatchPcRelativeReference(std::vector<uint8_t>* code,
50 void PatchEntrypointCall(std::vector<uint8_t>* code,
53 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
63 static void PatchBl(std::vector<uint8_t>* code, uint32_t literal_offset, uint32_t displacement);
65 static bool NeedsErratum843419Thunk(ArrayRef<const uint8_t> code, uint32_t literal_offset,
67 static void SetInsn(std::vector<uint8_t>* code, uint32_t offset, uint32_t value);
68 static uint32_t GetInsn(ArrayRef<const uint8_t> code, uint32_t offset);
71 static uint32_t GetInsn(std::vector<uint8_t, Alloc>* code, uint32_t offset);
Drelative_patcher_arm64.cc125 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); in ReserveSpace() local
126 uint32_t max_extra_space = MaxExtraSpace(num_adrp, code.size()); in ReserveSpace()
135 uint32_t thunk_offset = compiled_method->AlignCode(quick_code_offset + code.size()); in ReserveSpace()
140 if (NeedsErratum843419Thunk(code, patch.LiteralOffset(), patch_offset)) { in ReserveSpace()
191 void Arm64RelativePatcher::PatchCall(std::vector<uint8_t>* code, in PatchCall() argument
199 PatchBl(code, literal_offset, displacement); in PatchCall()
202 void Arm64RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
209 uint32_t insn = GetInsn(code, literal_offset); in PatchPcRelativeReference()
220 DCHECK(NeedsErratum843419Thunk(ArrayRef<const uint8_t>(*code), in PatchPcRelativeReference()
248 SetInsn(code, literal_offset, insn); in PatchPcRelativeReference()
[all …]
/art/dex2oat/linker/x86_64/
Drelative_patcher_x86_64.cc25 void X86_64RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
29 DCHECK_LE(patch.LiteralOffset() + 4u, code->size()); in PatchPcRelativeReference()
35 reinterpret_cast<unaligned_int32_t*>(&(*code)[patch.LiteralOffset()])[0] = displacement; in PatchPcRelativeReference()
38 void X86_64RelativePatcher::PatchEntrypointCall(std::vector<uint8_t>* code ATTRIBUTE_UNUSED, in PatchEntrypointCall()
44 void X86_64RelativePatcher::PatchBakerReadBarrierBranch(std::vector<uint8_t>* code ATTRIBUTE_UNUSED, in PatchBakerReadBarrierBranch()
Drelative_patcher_x86_64.h29 void PatchPcRelativeReference(std::vector<uint8_t>* code,
33 void PatchEntrypointCall(std::vector<uint8_t>* code,
36 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
/art/test/518-null-array-get/
Dinfo.txt2 instructions in dead code after aget on null, but pass
3 type-safe dead code.
7 compiler crashes. As broken code appears very uncommon,
9 code.
/art/dex2oat/linker/
Dmulti_oat_relative_patcher.h98 void PatchCall(std::vector<uint8_t>* code, in PatchCall() argument
104 relative_patcher_->PatchCall(code, literal_offset, patch_offset, target_offset); in PatchCall()
108 void PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
114 relative_patcher_->PatchPcRelativeReference(code, patch, patch_offset, target_offset); in PatchPcRelativeReference()
117 void PatchEntrypointCall(std::vector<uint8_t>* code, in PatchEntrypointCall() argument
121 relative_patcher_->PatchEntrypointCall(code, patch, patch_offset); in PatchEntrypointCall()
124 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code, in PatchBakerReadBarrierBranch() argument
128 relative_patcher_->PatchBakerReadBarrierBranch(code, patch, patch_offset); in PatchBakerReadBarrierBranch()
148 /*out*/ ArrayRef<const uint8_t>* code,
Dimage_test.cc129 const void* code = origin->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); in TEST_F() local
131 ASSERT_NE(nullptr, code); in TEST_F()
132 ASSERT_FALSE(class_linker_->IsQuickToInterpreterBridge(code)); in TEST_F()
139 ASSERT_EQ(code, copied->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size)); in TEST_F()
152 code = origin->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); in TEST_F()
154 ASSERT_NE(nullptr, code); in TEST_F()
155 ASSERT_FALSE(class_linker_->IsQuickToInterpreterBridge(code)); in TEST_F()
161 code = copied->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); in TEST_F()
163 ASSERT_TRUE(class_linker_->IsQuickToInterpreterBridge(code)); in TEST_F()
Drelative_patcher_test.h103 const ArrayRef<const uint8_t>& code,
109 code,
136 const auto code = compiled_method->GetQuickCode(); in Link() local
137 offset += code.size(); in Link()
167 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); in Link() local
169 patched_code_.assign(code.begin(), code.end()); in Link()
170 code = ArrayRef<const uint8_t>(patched_code_); in Link()
208 out_->WriteFully(&code[0], code.size()); in Link()
209 offset += code.size(); in Link()
282 ArrayRef<const uint8_t> code, in SetThunkCode() argument
[all …]
Drelative_patcher.h55 /*out*/ ArrayRef<const uint8_t>* code,
129 virtual void PatchCall(std::vector<uint8_t>* code,
135 virtual void PatchPcRelativeReference(std::vector<uint8_t>* code,
141 virtual void PatchEntrypointCall(std::vector<uint8_t>* code,
146 virtual void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
/art/dexlayout/
Ddexlayout.h138 void DumpBytecodes(uint32_t idx, const dex_ir::CodeItem* code, uint32_t code_offset);
139 void DumpCatches(const dex_ir::CodeItem* code);
144 const dex_ir::CodeItem* code,
154 void DumpInstruction(const dex_ir::CodeItem* code,
160 void DumpLocalInfo(const dex_ir::CodeItem* code);
164 const dex_ir::CodeItem* code,
166 void DumpPositionInfo(const dex_ir::CodeItem* code);
187 void DumpCFG(const DexFile* dex_file, uint32_t dex_method_idx, const dex::CodeItem* code);
/art/test/677-fsi/
Dexpected.txt1 oat file has dex code, but APK has uncompressed dex code
/art/test/2230-profile-save-hotness/
Drun17 -Xcompiler-option --count-hotness-in-compiled-code \
19 --runtime-option -Xps-profile-aot-code \
/art/compiler/trampolines/
Dtrampoline_compiler.cc80 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
81 __ FinalizeInstructions(code); in CreateTrampoline()
122 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
123 __ FinalizeInstructions(code); in CreateTrampoline()
143 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
144 __ FinalizeInstructions(code); in CreateTrampoline()
164 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
165 __ FinalizeInstructions(code); in CreateTrampoline()
/art/compiler/driver/
Dcompiled_method_storage.cc130 ThunkMapValue(std::vector<uint8_t, SwapAllocator<uint8_t>>&& code, in ThunkMapValue() argument
132 : code_(std::move(code)), debug_name_(debug_name) {} in ThunkMapValue()
178 const ArrayRef<const uint8_t>& code) { in DeduplicateCode() argument
179 return AllocateOrDeduplicateArray(code, &dedupe_code_); in DeduplicateCode()
182 void CompiledMethodStorage::ReleaseCode(const LengthPrefixedArray<uint8_t>* code) { in ReleaseCode() argument
183 ReleaseArrayIfNotDeduplicated(code); in ReleaseCode()
256 ArrayRef<const uint8_t> code, in SetThunkCode() argument
258 DCHECK(!code.empty()); in SetThunkCode()
261 code.begin(), code.end(), SwapAllocator<uint8_t>(swap_space_.get())); in SetThunkCode()
/art/test/dexdump/
Dall.txt107 code -
111 insns size : 4 16-bit code units
123 code -
127 insns size : 29 16-bit code units
152 code -
156 insns size : 65 16-bit code units
199 code -
203 insns size : 33 16-bit code units
246 code -
250 insns size : 17 16-bit code units
[all …]
/art/libdexfile/external/
Ddex_file_ext.cc120 art::CodeItemInstructionAccessor code = method.GetInstructions(); in GetMethodCacheEntryForOffset() local
121 if (!code.HasCodeItem()) { in GetMethodCacheEntryForOffset()
125 int32_t offset = reinterpret_cast<const uint8_t*>(code.Insns()) - dex_file_->Begin(); in GetMethodCacheEntryForOffset()
126 int32_t len = code.InsnsSizeInBytes(); in GetMethodCacheEntryForOffset()
146 art::CodeItemInstructionAccessor code = method.GetInstructions(); in GetClassDefIndex() local
147 if (code.HasCodeItem()) { in GetClassDefIndex()
148 int32_t offset = reinterpret_cast<const uint8_t*>(code.Insns()) - dex_file_->Begin(); in GetClassDefIndex()
150 cache.emplace_back(offset + code.InsnsSizeInBytes(), accessor.GetClassDefIndex()); in GetClassDefIndex()
367 art::CodeItemInstructionAccessor code = method.GetInstructions(); in ExtDexFileGetAllMethodInfos() local
368 if (!code.HasCodeItem()) { in ExtDexFileGetAllMethodInfos()
[all …]
/art/test/076-boolean-put/
Dinfo.txt1 This checks a case where javac generates code that stores a byte into a
2 boolean field. The code as generated should not pass the verifier, so the

12345678