Lines Matching refs:uint32_t

45 constexpr uint32_t kMaxMethodCallPositiveDisplacement = (1u << 27) - 4u;
46 constexpr uint32_t kMaxMethodCallNegativeDisplacement = (1u << 27);
51 constexpr uint32_t kMaxBcondPositiveDisplacement = (1u << 20) - 4u;
52 constexpr uint32_t kMaxBcondNegativeDisplacement = (1u << 20);
55 constexpr uint32_t kAdrpThunkSize = 8u;
80 inline uint32_t MaxExtraSpace(size_t num_adrp, size_t code_size) { in MaxExtraSpace()
84 uint32_t alignment_bytes = in MaxExtraSpace()
104 uint32_t Arm64RelativePatcher::ReserveSpace(uint32_t offset, in ReserveSpace()
130 uint32_t max_extra_space = MaxExtraSpace(num_adrp, code.size()); in ReserveSpace()
138 uint32_t quick_code_offset = compiled_method->AlignCode(offset + sizeof(OatQuickMethodHeader)); in ReserveSpace()
139 uint32_t thunk_offset = compiled_method->AlignCode(quick_code_offset + code.size()); in ReserveSpace()
143 uint32_t patch_offset = quick_code_offset + patch.LiteralOffset(); in ReserveSpace()
153 uint32_t Arm64RelativePatcher::ReserveSpaceEnd(uint32_t offset) { in ReserveSpaceEnd()
168 uint32_t Arm64RelativePatcher::WriteThunks(OutputStream* out, uint32_t offset) { in WriteThunks()
171 uint32_t aligned_offset = CompiledMethod::AlignCode(offset, InstructionSet::kArm64); in WriteThunks()
181 uint32_t aligned_code_delta = aligned_offset - offset; in WriteThunks()
196 uint32_t literal_offset, in PatchCall()
197 uint32_t patch_offset, in PatchCall()
198 uint32_t target_offset) { in PatchCall()
202 uint32_t displacement = CalculateMethodCallDisplacement(patch_offset, target_offset & ~1u); in PatchCall()
208 uint32_t patch_offset, in PatchPcRelativeReference()
209 uint32_t target_offset) { in PatchPcRelativeReference()
212 uint32_t literal_offset = patch.LiteralOffset(); in PatchPcRelativeReference()
213 uint32_t insn = GetInsn(code, literal_offset); in PatchPcRelativeReference()
214 uint32_t pc_insn_offset = patch.PcInsnOffset(); in PatchPcRelativeReference()
215 uint32_t disp = target_offset - ((patch_offset - literal_offset + pc_insn_offset) & ~0xfffu); in PatchPcRelativeReference()
217 uint32_t shift = wide ? 3u : 2u; in PatchPcRelativeReference()
226 uint32_t thunk_offset = adrp_thunk_locations_[processed_adrp_thunks_].second; in PatchPcRelativeReference()
227 uint32_t adrp_disp = target_offset - (thunk_offset & ~0xfffu); in PatchPcRelativeReference()
228 uint32_t adrp = PatchAdrp(insn, adrp_disp); in PatchPcRelativeReference()
230 uint32_t out_disp = thunk_offset - patch_offset; in PatchPcRelativeReference()
236 uint32_t back_disp = -out_disp; in PatchPcRelativeReference()
239 uint32_t b_back = (back_disp & 0x0fffffffu) >> 2; in PatchPcRelativeReference()
286 uint32_t adrp = GetInsn(code, pc_insn_offset); in PatchPcRelativeReference()
293 uint32_t b_offset = patch_offset - literal_offset + pc_insn_offset; in PatchPcRelativeReference()
306 uint32_t imm12 = (disp & 0xfffu) >> shift; in PatchPcRelativeReference()
314 uint32_t patch_offset) { in PatchEntrypointCall()
317 uint32_t target_offset = GetThunkTargetOffset(key, patch_offset); in PatchEntrypointCall()
318 uint32_t displacement = target_offset - patch_offset; in PatchEntrypointCall()
324 uint32_t patch_offset) { in PatchBakerReadBarrierBranch()
326 uint32_t literal_offset = patch.LiteralOffset(); in PatchBakerReadBarrierBranch()
327 uint32_t insn = GetInsn(code, literal_offset); in PatchBakerReadBarrierBranch()
330 uint32_t target_offset = GetThunkTargetOffset(key, patch_offset); in PatchBakerReadBarrierBranch()
332 uint32_t disp = target_offset - patch_offset; in PatchBakerReadBarrierBranch()
338 uint32_t Arm64RelativePatcher::MaxPositiveDisplacement(const ThunkKey& key) { in MaxPositiveDisplacement()
348 uint32_t Arm64RelativePatcher::MaxNegativeDisplacement(const ThunkKey& key) { in MaxNegativeDisplacement()
358 uint32_t Arm64RelativePatcher::PatchAdrp(uint32_t adrp, uint32_t disp) { in PatchAdrp()
373 uint32_t literal_offset, in PatchBl()
374 uint32_t displacement) { in PatchBl()
377 uint32_t insn = (displacement & 0x0fffffffu) >> 2; in PatchBl()
387 uint32_t literal_offset, in NeedsErratum843419Thunk()
388 uint32_t patch_offset) { in NeedsErratum843419Thunk()
391 uint32_t adrp = GetInsn(code, literal_offset); in NeedsErratum843419Thunk()
393 uint32_t next_offset = patch_offset + 4u; in NeedsErratum843419Thunk()
394 uint32_t next_insn = GetInsn(code, literal_offset + 4u); in NeedsErratum843419Thunk()
436 void Arm64RelativePatcher::SetInsn(std::vector<uint8_t>* code, uint32_t offset, uint32_t value) { in SetInsn()
446 uint32_t Arm64RelativePatcher::GetInsn(ArrayRef<const uint8_t> code, uint32_t offset) { in GetInsn()
451 (static_cast<uint32_t>(addr[0]) << 0) + in GetInsn()
452 (static_cast<uint32_t>(addr[1]) << 8) + in GetInsn()
453 (static_cast<uint32_t>(addr[2]) << 16)+ in GetInsn()
454 (static_cast<uint32_t>(addr[3]) << 24); in GetInsn()
458 uint32_t Arm64RelativePatcher::GetInsn(std::vector<uint8_t, Alloc>* code, uint32_t offset) { in GetInsn()