Lines Matching refs:jump_target
43 static inline int riscv_relocation_fits(long long jump_target, long long max_distance, in riscv_relocation_fits() argument
46 if (llabs(jump_target) > max_distance) { in riscv_relocation_fits()
48 jump_target, (uint64_t)reloc_type, max_distance); in riscv_relocation_fits()
92 long long original_imm8, jump_target; in arch_elf_relocate() local
107 jump_target = sym_base_addr + rel->r_addend; /* S + A */ in arch_elf_relocate()
108 UNALIGNED_PUT((uint32_t)jump_target, loc32); in arch_elf_relocate()
109 return riscv_relocation_fits(jump_target, INT32_MAX, reloc_type); in arch_elf_relocate()
123 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
125 imm8 = jump_target; in arch_elf_relocate()
129 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_B_TYPE, in arch_elf_relocate()
132 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
134 imm8 = jump_target; in arch_elf_relocate()
138 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
144 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
145 imm8 = jump_target; in arch_elf_relocate()
164 imm8 = jump_target; in arch_elf_relocate()
172 last_u_type_jump_target = jump_target; in arch_elf_relocate()
174 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
184 jump_target = last_u_type_jump_target; /* S - P */ in arch_elf_relocate()
186 imm8 = jump_target; in arch_elf_relocate()
190 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
201 jump_target = last_u_type_jump_target; /* S - P */ in arch_elf_relocate()
203 imm8 = jump_target; in arch_elf_relocate()
207 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
210 jump_target = sym_base_addr + rel->r_addend; /* S + A */ in arch_elf_relocate()
212 imm8 = jump_target; in arch_elf_relocate()
223 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
227 jump_target = sym_base_addr + rel->r_addend; /* S + A */ in arch_elf_relocate()
228 imm8 = jump_target; in arch_elf_relocate()
233 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
316 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
317 tmp32 = jump_target; in arch_elf_relocate()
319 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
322 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
323 tmp32 = jump_target; in arch_elf_relocate()
325 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_U_PLUS_I_TYPE, in arch_elf_relocate()
328 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
330 compressed_imm8 = jump_target; in arch_elf_relocate()
336 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_CB_TYPE, in arch_elf_relocate()
339 jump_target = sym_base_addr + rel->r_addend - loc; /* S + A - P */ in arch_elf_relocate()
341 compressed_imm8 = jump_target; in arch_elf_relocate()
347 return riscv_relocation_fits(jump_target, RISCV_MAX_JUMP_DISTANCE_CJ_TYPE, in arch_elf_relocate()