Lines Matching refs:uint32_t
42 constexpr uint32_t kMaxMethodCallPositiveDisplacement = (1u << 24) - 2 + kPcDisplacement;
43 constexpr uint32_t kMaxMethodCallNegativeDisplacement = (1u << 24) - kPcDisplacement;
48 constexpr uint32_t kMaxBcondPositiveDisplacement = (1u << 20) - 2u + kPcDisplacement;
49 constexpr uint32_t kMaxBcondNegativeDisplacement = (1u << 20) - kPcDisplacement;
57 uint32_t literal_offset, in PatchCall()
58 uint32_t patch_offset, in PatchCall()
59 uint32_t target_offset) { in PatchCall()
62 uint32_t displacement = CalculateMethodCallDisplacement(patch_offset, target_offset & ~1u); in PatchCall()
68 uint32_t patch_offset, in PatchPcRelativeReference()
69 uint32_t target_offset) { in PatchPcRelativeReference()
70 uint32_t literal_offset = patch.LiteralOffset(); in PatchPcRelativeReference()
71 uint32_t pc_literal_offset = patch.PcInsnOffset(); in PatchPcRelativeReference()
72 uint32_t pc_base = patch_offset + (pc_literal_offset - literal_offset) + 4u /* PC adjustment */; in PatchPcRelativeReference()
73 uint32_t diff = target_offset - pc_base; in PatchPcRelativeReference()
75 uint32_t insn = GetInsn32(code, literal_offset); in PatchPcRelativeReference()
77 uint32_t diff16 = ((insn & 0x00800000u) != 0u) ? (diff >> 16) : (diff & 0xffffu); in PatchPcRelativeReference()
78 uint32_t imm4 = (diff16 >> 12) & 0xfu; in PatchPcRelativeReference()
79 uint32_t imm = (diff16 >> 11) & 0x1u; in PatchPcRelativeReference()
80 uint32_t imm3 = (diff16 >> 8) & 0x7u; in PatchPcRelativeReference()
81 uint32_t imm8 = diff16 & 0xffu; in PatchPcRelativeReference()
88 uint32_t patch_offset) { in PatchEntrypointCall()
91 uint32_t target_offset = GetThunkTargetOffset(key, patch_offset); in PatchEntrypointCall()
93 uint32_t displacement = target_offset - patch_offset; in PatchEntrypointCall()
99 uint32_t patch_offset) { in PatchBakerReadBarrierBranch()
101 uint32_t literal_offset = patch.LiteralOffset(); in PatchBakerReadBarrierBranch()
104 uint32_t insn = GetInsn32(code, literal_offset); in PatchBakerReadBarrierBranch()
107 uint32_t target_offset = GetThunkTargetOffset(key, patch_offset); in PatchBakerReadBarrierBranch()
109 uint32_t disp = target_offset - (patch_offset + kPcDisplacement); in PatchBakerReadBarrierBranch()
119 uint32_t Thumb2RelativePatcher::MaxPositiveDisplacement(const ThunkKey& key) { in MaxPositiveDisplacement()
129 uint32_t Thumb2RelativePatcher::MaxNegativeDisplacement(const ThunkKey& key) { in MaxNegativeDisplacement()
140 uint32_t literal_offset, in PatchBl()
141 uint32_t displacement) { in PatchBl()
145 uint32_t signbit = (displacement >> 31) & 0x1; in PatchBl()
146 uint32_t i1 = (displacement >> 23) & 0x1; in PatchBl()
147 uint32_t i2 = (displacement >> 22) & 0x1; in PatchBl()
148 uint32_t imm10 = (displacement >> 12) & 0x03ff; in PatchBl()
149 uint32_t imm11 = (displacement >> 1) & 0x07ff; in PatchBl()
150 uint32_t j1 = i1 ^ (signbit ^ 1); in PatchBl()
151 uint32_t j2 = i2 ^ (signbit ^ 1); in PatchBl()
152 uint32_t value = (signbit << 26) | (j1 << 13) | (j2 << 11) | (imm10 << 16) | imm11; in PatchBl()
161 void Thumb2RelativePatcher::SetInsn32(std::vector<uint8_t>* code, uint32_t offset, uint32_t value) { in SetInsn32()
171 uint32_t Thumb2RelativePatcher::GetInsn32(ArrayRef<const uint8_t> code, uint32_t offset) { in GetInsn32()
176 (static_cast<uint32_t>(addr[0]) << 16) + in GetInsn32()
177 (static_cast<uint32_t>(addr[1]) << 24) + in GetInsn32()
178 (static_cast<uint32_t>(addr[2]) << 0)+ in GetInsn32()
179 (static_cast<uint32_t>(addr[3]) << 8); in GetInsn32()
183 uint32_t Thumb2RelativePatcher::GetInsn32(Vector* code, uint32_t offset) { in GetInsn32()
188 uint32_t Thumb2RelativePatcher::GetInsn16(ArrayRef<const uint8_t> code, uint32_t offset) { in GetInsn16()
192 return (static_cast<uint32_t>(addr[0]) << 0) + (static_cast<uint32_t>(addr[1]) << 8); in GetInsn16()
196 uint32_t Thumb2RelativePatcher::GetInsn16(Vector* code, uint32_t offset) { in GetInsn16()