Searched defs:code (Results 1 - 25 of 38) sorted by relevance

12

/art/runtime/arch/x86_64/
H A Dthread_x86_64.cc33 static void arch_prctl(int code, void* val) { argument
34 syscall(__NR_arch_prctl, code, val);
/art/compiler/linker/x86_64/
H A Drelative_patcher_x86_64.cc24 void X86_64RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, argument
28 DCHECK_LE(patch.LiteralOffset() + 4u, code->size());
34 reinterpret_cast<unaligned_int32_t*>(&(*code)[patch.LiteralOffset()])[0] = displacement;
/art/compiler/linker/x86/
H A Drelative_patcher_x86.cc24 void X86RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, argument
33 DCHECK_LT(anchor_literal_offset, code->size());
34 DCHECK_EQ((*code)[anchor_literal_offset - 5u], 0xe8u);
35 DCHECK_EQ((*code)[anchor_literal_offset - 4u], 0x00u);
36 DCHECK_EQ((*code)[anchor_literal_offset - 3u], 0x00u);
37 DCHECK_EQ((*code)[anchor_literal_offset - 2u], 0x00u);
38 DCHECK_EQ((*code)[anchor_literal_offset - 1u], 0x00u);
39 DCHECK_EQ((*code)[anchor_literal_offset] & 0xf8u, 0x58u);
44 DCHECK_LE(literal_offset, code->size());
45 DCHECK_EQ((*code)[literal_offse
[all...]
H A Drelative_patcher_x86_base.cc37 void X86BaseRelativePatcher::PatchCall(std::vector<uint8_t>* code, argument
41 DCHECK_LE(literal_offset + 4u, code->size());
47 reinterpret_cast<unaligned_int32_t*>(&(*code)[literal_offset])[0] = displacement;
/art/runtime/
H A Ddex_instruction_visitor.h28 void Visit(const uint16_t* code, size_t size_in_bytes) { argument
33 const Instruction* inst = Instruction::At(&code[i]);
H A Doat_file-inl.h26 const void* code = EntryPointToCodePointer(GetOatPointer<const void*>(code_offset_)); local
27 if (code == nullptr) {
30 // Return a pointer to the packed struct before the code.
31 return reinterpret_cast<const OatQuickMethodHeader*>(code) - 1;
51 const void* code = EntryPointToCodePointer(GetQuickCode()); local
52 if (code == nullptr) {
55 return reinterpret_cast<const OatQuickMethodHeader*>(code)[-1].frame_info_.FrameSizeInBytes();
59 const void* code = EntryPointToCodePointer(GetQuickCode()); local
60 if (code == nullptr) {
63 return reinterpret_cast<const OatQuickMethodHeader*>(code)[
67 const void* code = EntryPointToCodePointer(GetQuickCode()); local
88 const void* code = EntryPointToCodePointer(GetOatPointer<const void*>(code_offset_)); local
100 const void* code = EntryPointToCodePointer(GetOatPointer<const void*>(code_offset_)); local
[all...]
H A Doat_quick_method_header.h30 // OatQuickMethodHeader precedes the raw code chunk generated by the compiler.
42 uintptr_t code = reinterpret_cast<uintptr_t>(code_ptr); local
43 uintptr_t header = code - OFFSETOF_MEMBER(OatQuickMethodHeader, code_);
44 DCHECK(IsAlignedParam(code, GetInstructionSetAlignment(kRuntimeISA)) ||
46 << std::hex << code << " " << std::hex << header;
99 // (not `kThumb2`), *but* we always generate code for the Thumb-2
132 // The code size in bytes.
134 // The actual code.
H A Ddex_instruction.cc472 std::ostream& operator<<(std::ostream& os, const Instruction::Code& code) { argument
473 return os << Instruction::Name(code);
H A Ddex_instruction_utils.h92 constexpr bool IsInstructionIGet(Instruction::Code code) { argument
93 return Instruction::IGET <= code && code <= Instruction::IGET_SHORT;
96 constexpr bool IsInstructionIPut(Instruction::Code code) { argument
97 return Instruction::IPUT <= code && code <= Instruction::IPUT_SHORT;
100 constexpr bool IsInstructionSGet(Instruction::Code code) { argument
101 return Instruction::SGET <= code && code <= Instruction::SGET_SHORT;
104 constexpr bool IsInstructionSPut(Instruction::Code code) { argument
108 IsInstructionAGet(Instruction::Code code) argument
112 IsInstructionAPut(Instruction::Code code) argument
116 IsInstructionIGetOrIPut(Instruction::Code code) argument
120 IsInstructionIGetQuickOrIPutQuick(Instruction::Code code) argument
125 IsInstructionSGetOrSPut(Instruction::Code code) argument
129 IsInstructionAGetOrAPut(Instruction::Code code) argument
133 IsInstructionBinOp2Addr(Instruction::Code code) argument
155 IGetMemAccessType(Instruction::Code code) argument
162 IPutMemAccessType(Instruction::Code code) argument
169 SGetMemAccessType(Instruction::Code code) argument
176 SPutMemAccessType(Instruction::Code code) argument
183 AGetMemAccessType(Instruction::Code code) argument
190 APutMemAccessType(Instruction::Code code) argument
197 IGetOrIPutMemAccessType(Instruction::Code code) argument
204 IGetQuickOrIPutQuickMemAccessType(Instruction::Code code) argument
227 SGetOrSPutMemAccessType(Instruction::Code code) argument
234 AGetOrAPutMemAccessType(Instruction::Code code) argument
[all...]
H A Dutils.h340 uintptr_t code = reinterpret_cast<uintptr_t>(entry_point); local
341 // TODO: Make this Thumb2 specific. It is benign on other architectures as code is always at
343 code &= ~0x1;
344 return reinterpret_cast<const void*>(code);
408 // cache flush instructions, as long as the "code uses the same
H A Dcommon_throws.cc407 const DexFile::CodeItem* code = method->GetCodeItem(); local
408 CHECK_LT(throw_dex_pc, code->insns_size_in_code_units_);
409 const Instruction* instr = Instruction::At(&code->insns_[throw_dex_pc]);
571 // Avoid running Java code for exception initialization.
/art/compiler/dex/
H A Dverified_method.cc206 * Walks over the method code and adds any cast instructions in which
207 * the type cast is implicit to a set, which is used in the code generation
219 Instruction::Code code = inst->Opcode(); local
220 if ((code == Instruction::CHECK_CAST) || (code == Instruction::APUT_OBJECT)) {
228 if (code == Instruction::CHECK_CAST) {
/art/compiler/driver/
H A Dcompiled_method_storage_test.cc55 ArrayRef<const uint8_t> code[] = { local
92 for (auto&& c : code) {
H A Dcompiled_method_storage.cc174 dedupe_code_("dedupe code", LengthPrefixedArrayAlloc<uint8_t>(swap_space_.get())),
202 const ArrayRef<const uint8_t>& code) {
203 return AllocateOrDeduplicateArray(code, &dedupe_code_);
206 void CompiledMethodStorage::ReleaseCode(const LengthPrefixedArray<uint8_t>* code) { argument
207 ReleaseArrayIfNotDeduplicated(code);
201 DeduplicateCode( const ArrayRef<const uint8_t>& code) argument
H A Dcompiler_driver_test.cc220 const void* code = m.GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); local
221 ASSERT_NE(code, nullptr);
224 EXPECT_FALSE(class_linker->IsQuickToInterpreterBridge(code));
226 EXPECT_TRUE(class_linker->IsQuickToInterpreterBridge(code));
277 const void* code = m.GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); local
278 ASSERT_NE(code, nullptr);
281 EXPECT_FALSE(class_linker->IsQuickToInterpreterBridge(code));
283 EXPECT_TRUE(class_linker->IsQuickToInterpreterBridge(code));
/art/compiler/linker/arm/
H A Drelative_patcher_thumb2.cc31 void Thumb2RelativePatcher::PatchCall(std::vector<uint8_t>* code, argument
35 DCHECK_LE(literal_offset + 4u, code->size());
54 DCHECK_EQ(GetInsn32(code, literal_offset) & 0xf800d000, 0xf000d000);
56 SetInsn32(code, literal_offset, value);
59 void Thumb2RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, argument
68 uint32_t insn = GetInsn32(code, literal_offset);
76 SetInsn32(code, literal_offset, insn);
91 MemoryRegion code(thunk_code.data(), thunk_code.size());
92 assembler.FinalizeInstructions(code);
96 void Thumb2RelativePatcher::SetInsn32(std::vector<uint8_t>* code, uint32_ argument
106 GetInsn32(ArrayRef<const uint8_t> code, uint32_t offset) argument
118 GetInsn32(Vector* code, uint32_t offset) argument
[all...]
/art/compiler/linker/
H A Dmulti_oat_relative_patcher.h34 // any number of oat files. It provides storage for method code offsets
50 // It must must never point directly to a method's code to avoid relative offsets
96 void PatchCall(std::vector<uint8_t>* code, argument
102 relative_patcher_->PatchCall(code, literal_offset, patch_offset, target_offset);
106 void PatchPcRelativeReference(std::vector<uint8_t>* code, argument
112 relative_patcher_->PatchPcRelativeReference(code, patch, patch_offset, target_offset);
H A Drelative_patcher_test.h85 const ArrayRef<const uint8_t>& code,
91 code,
115 const auto code = compiled_method->GetQuickCode(); local
116 offset += code.size();
147 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); local
149 patched_code_.assign(code.begin(), code.end());
150 code = ArrayRef<const uint8_t>(patched_code_);
176 out_.WriteFully(&code[0], code
84 AddCompiledMethod(MethodReference method_ref, const ArrayRef<const uint8_t>& code, const ArrayRef<const LinkerPatch>& patches) argument
[all...]
/art/compiler/utils/arm64/
H A Dassembler_arm64.h87 // We indicate the size of the initial code generation buffer to the VIXL
98 // Finalize the code.
101 // Size of generated code.
111 // Emit code that will create an activation on the stack.
116 // Emit code that will remove an activation from the stack.
171 // Exploit fast access in managed code to Thread::Current().
203 // Generate code to check if Thread::Current()->exception_ is non-null
226 static vixl::Register reg_x(int code) { argument
227 CHECK(code < kNumberOfXRegisters) << code;
[all...]
/art/compiler/utils/
H A Dassembler_thumb_test.cc91 void DumpAndCheck(std::vector<uint8_t>& code, const char* testname, const char* const* results) { argument
111 for (uint32_t i = 0 ; i < code.size(); ++i) {
112 out << ".byte " << (static_cast<int>(code[i]) & 0xff) << "\n";
138 // into the .inc file, so let's add the appropriate prefix/suffix needed in the C++ code.
182 MemoryRegion code(&managed_code[0], managed_code.size());
183 __ FinalizeInstructions(code);
283 __ rsbs(R0, R0, ShifterOperand(0)); // Check Rd == Rn code path.
H A Dassembler_test_base.h121 if (data == *res.code) {
124 if (DisassembleBinaries(data, *res.code, test_name)) {
125 if (data.size() > res.code->size()) {
127 EXPECT_TRUE(false) << "Assembly code is not identical, but disassembly of machine code "
128 "is equal: this implies sub-optimal encoding! Our code size=" << data.size() <<
129 ", gcc size=" << res.code->size();
138 EXPECT_EQ(*res.code, data) << "Outputs (and disassembly) not identical.";
201 std::unique_ptr<std::vector<uint8_t>> code; member in struct:art::AssemblerTestInfrastructure::NativeAssemblerResult
371 // Compile the given assembly code an
[all...]
/art/compiler/
H A Dcommon_compiler_test.cc56 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); local
57 uint32_t code_size = code.size();
76 chunk->insert(chunk->end(), code.begin(), code.end());
86 MakeExecutable(code_ptr, code.size());
89 LOG(INFO) << "MakeExecutable " << PrettyMethod(method) << " code=" << method_code;
92 // No code? You must mean to go into the interpreter.
/art/compiler/linker/arm64/
H A Drelative_patcher_arm64.cc84 // Now that we have the actual offset where the code will be placed, locate the ADRP insns
87 ArrayRef<const uint8_t> code = compiled_method->GetQuickCode(); local
88 uint32_t thunk_offset = compiled_method->AlignCode(quick_code_offset + code.size());
93 if (NeedsErratum843419Thunk(code, patch.LiteralOffset(), patch_offset)) {
143 void Arm64RelativePatcher::PatchCall(std::vector<uint8_t>* code, argument
147 DCHECK_LE(literal_offset + 4u, code->size());
158 DCHECK_EQ(GetInsn(code, literal_offset) & 0xfc000000u, 0x94000000u);
160 SetInsn(code, literal_offset, insn);
163 void Arm64RelativePatcher::PatchPcRelativeReference(std::vector<uint8_t>* code, argument
170 uint32_t insn = GetInsn(code, literal_offse
278 NeedsErratum843419Thunk(ArrayRef<const uint8_t> code, uint32_t literal_offset, uint32_t patch_offset) argument
328 SetInsn(std::vector<uint8_t>* code, uint32_t offset, uint32_t value) argument
338 GetInsn(ArrayRef<const uint8_t> code, uint32_t offset) argument
350 GetInsn(std::vector<uint8_t, Alloc>* code, uint32_t offset) argument
[all...]
H A Drelative_patcher_arm64_test.cc206 auto code = GenNopsAndAdrpLdr(num_nops, 0u, 0u); // Unpatched. local
212 ArrayRef<const uint8_t>(code),
231 auto code = GenNopsAndAdrpAdd(num_nops, 0u, 0u); // Unpatched. local
237 ArrayRef<const uint8_t>(code),
246 void InsertInsn(std::vector<uint8_t>* code, size_t pos, uint32_t insn) { argument
247 CHECK_LE(pos, code->size());
253 code->insert(code->begin() + pos, insn_code, insn_code + sizeof(insn_code));
261 auto code = GenNopsAndAdrpLdr(num_nops, 0u, 0u); // Unpatched. local
262 InsertInsn(&code, num_nop
276 auto code = GenNopsAndAdrpAdd(num_nops, 0u, 0u); // Unpatched. local
[all...]
/art/compiler/optimizing/
H A Dcommon_arm64.h35 static inline int VIXLRegCodeFromART(int code) { argument
36 if (code == SP) {
39 if (code == XZR) {
42 return code;
45 static inline int ARTRegCodeFromVIXL(int code) { argument
46 if (code == vixl::kSPRegInternalCode) {
49 if (code == vixl::kZeroRegCode) {
52 return code;
173 return Location::RegisterLocation(ARTRegCodeFromVIXL(reg.code()));
177 return Location::FpuRegisterLocation(fpreg.code());
[all...]

Completed in 5530 milliseconds

12