Home
last modified time | relevance | path

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

123456789

/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>(kDummy32BitOffset >> 0)); in PatchPcRelativeReference()
[all …]
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/mips/
Drelative_patcher_mips.cc41 void MipsRelativePatcher::PatchCall(std::vector<uint8_t>* code ATTRIBUTE_UNUSED, in PatchCall()
48 void MipsRelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
54 bool high_patch = ((*code)[literal_offset + 0] == 0x34) && ((*code)[literal_offset + 1] == 0x12); in PatchPcRelativeReference()
60 DCHECK_EQ(((*code)[literal_offset + 2] & 0x1F), 0x1E); in PatchPcRelativeReference()
61 DCHECK_EQ(((*code)[literal_offset + 3] & 0xFC), 0xEC); in PatchPcRelativeReference()
64 DCHECK_EQ(((*code)[literal_offset + 2] & 0xE0), 0x00); in PatchPcRelativeReference()
65 DCHECK_EQ((*code)[literal_offset + 3], 0x3C); in PatchPcRelativeReference()
69 CHECK_EQ((*code)[literal_offset + 0], 0x78); in PatchPcRelativeReference()
70 CHECK_EQ((*code)[literal_offset + 1], 0x56); in PatchPcRelativeReference()
80 (*code)[literal_offset + 0] = static_cast<uint8_t>(diff >> 16); in PatchPcRelativeReference()
[all …]
Drelative_patcher_mips.h36 void PatchCall(std::vector<uint8_t>* code,
40 void PatchPcRelativeReference(std::vector<uint8_t>* code,
44 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
/art/compiler/utils/arm64/
Dassembler_arm64.h114 void GenerateMarkingRegisterCheck(vixl::aarch64::Register temp, int code = 0);
123 static vixl::aarch64::Register reg_x(int code) { in reg_x() argument
124 CHECK(code < kNumberOfXRegisters) << code; in reg_x()
125 if (code == SP) { in reg_x()
127 } else if (code == XZR) { in reg_x()
130 return vixl::aarch64::Register::GetXRegFromCode(code); in reg_x()
133 static vixl::aarch64::Register reg_w(int code) { in reg_w() argument
134 CHECK(code < kNumberOfWRegisters) << code; in reg_w()
135 if (code == WSP) { in reg_w()
137 } else if (code == WZR) { in reg_w()
[all …]
/art/dex2oat/linker/mips64/
Drelative_patcher_mips64.cc41 void Mips64RelativePatcher::PatchCall(std::vector<uint8_t>* code ATTRIBUTE_UNUSED, in PatchCall()
48 void Mips64RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
54 bool high_patch = ((*code)[literal_offset + 0] == 0x34) && ((*code)[literal_offset + 1] == 0x12); in PatchPcRelativeReference()
59 DCHECK_EQ(((*code)[literal_offset + 2] & 0x1F), 0x1E); in PatchPcRelativeReference()
60 DCHECK_EQ(((*code)[literal_offset + 3] & 0xFC), 0xEC); in PatchPcRelativeReference()
63 CHECK_EQ((*code)[literal_offset + 0], 0x78); in PatchPcRelativeReference()
64 CHECK_EQ((*code)[literal_offset + 1], 0x56); in PatchPcRelativeReference()
78 (*code)[literal_offset + 0] = static_cast<uint8_t>(diff >> 16); in PatchPcRelativeReference()
79 (*code)[literal_offset + 1] = static_cast<uint8_t>(diff >> 24); in PatchPcRelativeReference()
82 (*code)[literal_offset + 0] = static_cast<uint8_t>(diff >> 0); in PatchPcRelativeReference()
[all …]
Drelative_patcher_mips64.h34 void PatchCall(std::vector<uint8_t>* code,
38 void PatchPcRelativeReference(std::vector<uint8_t>* code,
42 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
/art/dex2oat/linker/arm/
Drelative_patcher_thumb2.cc57 void Thumb2RelativePatcher::PatchCall(std::vector<uint8_t>* code, in PatchCall() argument
61 DCHECK_LE(literal_offset + 4u, code->size()); in PatchCall()
80 DCHECK_EQ(GetInsn32(code, literal_offset) & 0xf800d000, 0xf000d000); in PatchCall()
82 SetInsn32(code, literal_offset, value); in PatchCall()
85 void Thumb2RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
94 uint32_t insn = GetInsn32(code, literal_offset); in PatchPcRelativeReference()
102 SetInsn32(code, literal_offset, insn); in PatchPcRelativeReference()
105 void Thumb2RelativePatcher::PatchBakerReadBarrierBranch(std::vector<uint8_t>* code, in PatchBakerReadBarrierBranch() argument
111 DCHECK_LT(literal_offset, code->size()); in PatchBakerReadBarrierBranch()
112 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 PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
54 void SetInsn32(std::vector<uint8_t>* code, uint32_t offset, uint32_t value);
55 static uint32_t GetInsn32(ArrayRef<const uint8_t> code, uint32_t offset);
58 static uint32_t GetInsn32(Vector* code, uint32_t offset);
60 static uint32_t GetInsn16(ArrayRef<const uint8_t> code, uint32_t offset);
63 static uint32_t GetInsn16(Vector* code, uint32_t offset);
/art/dex2oat/linker/arm64/
Drelative_patcher_arm64.cc124 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); in ReserveSpace() local
125 uint32_t max_extra_space = MaxExtraSpace(num_adrp, code.size()); in ReserveSpace()
134 uint32_t thunk_offset = compiled_method->AlignCode(quick_code_offset + code.size()); in ReserveSpace()
139 if (NeedsErratum843419Thunk(code, patch.LiteralOffset(), patch_offset)) { in ReserveSpace()
190 void Arm64RelativePatcher::PatchCall(std::vector<uint8_t>* code, in PatchCall() argument
194 DCHECK_LE(literal_offset + 4u, code->size()); in PatchCall()
205 DCHECK_EQ(GetInsn(code, literal_offset) & 0xfc000000u, 0x94000000u); in PatchCall()
207 SetInsn(code, literal_offset, insn); in PatchCall()
210 void Arm64RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, in PatchPcRelativeReference() argument
217 uint32_t insn = GetInsn(code, literal_offset); in PatchPcRelativeReference()
[all …]
Drelative_patcher_arm64.h42 void PatchCall(std::vector<uint8_t>* code,
46 void PatchPcRelativeReference(std::vector<uint8_t>* code,
50 void PatchBakerReadBarrierBranch(std::vector<uint8_t>* code,
61 static bool NeedsErratum843419Thunk(ArrayRef<const uint8_t> code, uint32_t literal_offset,
63 void SetInsn(std::vector<uint8_t>* code, uint32_t offset, uint32_t value);
64 static uint32_t GetInsn(ArrayRef<const uint8_t> code, uint32_t offset);
67 static uint32_t GetInsn(std::vector<uint8_t, Alloc>* code, uint32_t offset);
/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::PatchBakerReadBarrierBranch(std::vector<uint8_t>* code ATTRIBUTE_UNUSED, in PatchBakerReadBarrierBranch()
/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/
Dimage_test.cc127 const void* code = origin->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); in TEST_F() local
129 ASSERT_NE(nullptr, code); in TEST_F()
130 ASSERT_FALSE(class_linker_->IsQuickToInterpreterBridge(code)); in TEST_F()
137 ASSERT_EQ(code, copied->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size)); in TEST_F()
150 code = origin->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); in TEST_F()
152 ASSERT_NE(nullptr, code); in TEST_F()
153 ASSERT_FALSE(class_linker_->IsQuickToInterpreterBridge(code)); in TEST_F()
159 code = copied->GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); in TEST_F()
161 ASSERT_TRUE(class_linker_->IsQuickToInterpreterBridge(code)); in TEST_F()
Drelative_patcher_test.h104 const ArrayRef<const uint8_t>& code,
110 code,
137 const auto code = compiled_method->GetQuickCode(); in Link() local
138 offset += code.size(); in Link()
168 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); in Link() local
170 patched_code_.assign(code.begin(), code.end()); in Link()
171 code = ArrayRef<const uint8_t>(patched_code_); in Link()
203 out_->WriteFully(&code[0], code.size()); in Link()
204 offset += code.size(); in Link()
277 ArrayRef<const uint8_t> code, in SetThunkCode() argument
[all …]
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 PatchBakerReadBarrierBranch(std::vector<uint8_t>* code, in PatchBakerReadBarrierBranch() argument
121 relative_patcher_->PatchBakerReadBarrierBranch(code, patch, patch_offset); in PatchBakerReadBarrierBranch()
141 /*out*/ ArrayRef<const uint8_t>* code,
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 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/compiler/trampolines/
Dtrampoline_compiler.cc88 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
89 __ FinalizeInstructions(code); in CreateTrampoline()
130 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
131 __ FinalizeInstructions(code); in CreateTrampoline()
162 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
163 __ FinalizeInstructions(code); in CreateTrampoline()
194 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
195 __ FinalizeInstructions(code); in CreateTrampoline()
215 MemoryRegion code(entry_stub->data(), entry_stub->size()); in CreateTrampoline() local
216 __ FinalizeInstructions(code); in CreateTrampoline()
[all …]
/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()
253 ArrayRef<const uint8_t> code, in SetThunkCode() argument
255 DCHECK(!code.empty()); in SetThunkCode()
258 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/test/677-fsi/
Dexpected.txt1 oat file has dex code, but APK has uncompressed dex code
/art/test/147-stripped-dex-fallback/
Dinfo.txt1 Verify that we fallback to running out of dex code in the oat file if there is
2 no image and the original dex code has been stripped.

123456789