Lines Matching defs:code
84 // 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();
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,
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,
170 uint32_t insn = GetInsn(code, literal_offset);
181 DCHECK(NeedsErratum843419Thunk(ArrayRef<const uint8_t>(*code),
209 SetInsn(code, literal_offset, insn);
221 uint32_t adrp = GetInsn(code, pc_insn_offset);
243 SetInsn(code, literal_offset, insn);
259 MemoryRegion code(thunk_code.data(), thunk_code.size());
260 assembler.FinalizeInstructions(code);
278 bool Arm64RelativePatcher::NeedsErratum843419Thunk(ArrayRef<const uint8_t> code,
283 uint32_t adrp = GetInsn(code, literal_offset);
286 uint32_t next_insn = GetInsn(code, literal_offset + 4u);
328 void Arm64RelativePatcher::SetInsn(std::vector<uint8_t>* code, uint32_t offset, uint32_t value) {
329 DCHECK_LE(offset + 4u, code->size());
331 uint8_t* addr = &(*code)[offset];
338 uint32_t Arm64RelativePatcher::GetInsn(ArrayRef<const uint8_t> code, uint32_t offset) {
339 DCHECK_LE(offset + 4u, code.size());
341 const uint8_t* addr = &code[offset];
350 uint32_t Arm64RelativePatcher::GetInsn(std::vector<uint8_t, Alloc>* code, uint32_t offset) {
351 return GetInsn(ArrayRef<const uint8_t>(*code), offset);