Lines Matching refs:offset
49 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_branch_rela() local
50 u32 imm12 = (offset & 0x1000) << (31 - 12); in apply_r_riscv_branch_rela()
51 u32 imm11 = (offset & 0x800) >> (11 - 7); in apply_r_riscv_branch_rela()
52 u32 imm10_5 = (offset & 0x7e0) << (30 - 10); in apply_r_riscv_branch_rela()
53 u32 imm4_1 = (offset & 0x1e) << (11 - 4); in apply_r_riscv_branch_rela()
62 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_jal_rela() local
63 u32 imm20 = (offset & 0x100000) << (31 - 20); in apply_r_riscv_jal_rela()
64 u32 imm19_12 = (offset & 0xff000); in apply_r_riscv_jal_rela()
65 u32 imm11 = (offset & 0x800) << (20 - 11); in apply_r_riscv_jal_rela()
66 u32 imm10_1 = (offset & 0x7fe) << (30 - 10); in apply_r_riscv_jal_rela()
75 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rcv_branch_rela() local
76 u16 imm8 = (offset & 0x100) << (12 - 8); in apply_r_riscv_rcv_branch_rela()
77 u16 imm7_6 = (offset & 0xc0) >> (6 - 5); in apply_r_riscv_rcv_branch_rela()
78 u16 imm5 = (offset & 0x20) >> (5 - 2); in apply_r_riscv_rcv_branch_rela()
79 u16 imm4_3 = (offset & 0x18) << (12 - 5); in apply_r_riscv_rcv_branch_rela()
80 u16 imm2_1 = (offset & 0x6) << (12 - 10); in apply_r_riscv_rcv_branch_rela()
90 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_rvc_jump_rela() local
91 u16 imm11 = (offset & 0x800) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
92 u16 imm10 = (offset & 0x400) >> (10 - 8); in apply_r_riscv_rvc_jump_rela()
93 u16 imm9_8 = (offset & 0x300) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
94 u16 imm7 = (offset & 0x80) >> (7 - 6); in apply_r_riscv_rvc_jump_rela()
95 u16 imm6 = (offset & 0x40) << (12 - 11); in apply_r_riscv_rvc_jump_rela()
96 u16 imm5 = (offset & 0x20) >> (5 - 2); in apply_r_riscv_rvc_jump_rela()
97 u16 imm4 = (offset & 0x10) << (12 - 5); in apply_r_riscv_rvc_jump_rela()
98 u16 imm3_1 = (offset & 0xe) << (12 - 10); in apply_r_riscv_rvc_jump_rela()
108 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_pcrel_hi20_rela() local
111 if (!riscv_insn_valid_32bit_offset(offset)) { in apply_r_riscv_pcrel_hi20_rela()
118 hi20 = (offset + 0x800) & 0xfffff000; in apply_r_riscv_pcrel_hi20_rela()
190 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_got_hi20_rela() local
195 offset = module_emit_got_entry(me, v); in apply_r_riscv_got_hi20_rela()
196 offset = (void *)offset - (void *)location; in apply_r_riscv_got_hi20_rela()
204 hi20 = (offset + 0x800) & 0xfffff000; in apply_r_riscv_got_hi20_rela()
212 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_plt_rela() local
215 if (!riscv_insn_valid_32bit_offset(offset)) { in apply_r_riscv_call_plt_rela()
218 offset = module_emit_plt_entry(me, v); in apply_r_riscv_call_plt_rela()
219 offset = (void *)offset - (void *)location; in apply_r_riscv_call_plt_rela()
228 hi20 = (offset + 0x800) & 0xfffff000; in apply_r_riscv_call_plt_rela()
229 lo12 = (offset - hi20) & 0xfff; in apply_r_riscv_call_plt_rela()
238 ptrdiff_t offset = (void *)v - (void *)location; in apply_r_riscv_call_rela() local
241 if (!riscv_insn_valid_32bit_offset(offset)) { in apply_r_riscv_call_rela()
248 hi20 = (offset + 0x800) & 0xfffff000; in apply_r_riscv_call_rela()
249 lo12 = (offset - hi20) & 0xfff; in apply_r_riscv_call_rela()
391 size_t offset = hi20_sym_val - hi20_loc; in apply_relocate_add() local
394 offset = module_emit_got_entry( in apply_relocate_add()
396 offset = offset - hi20_loc; in apply_relocate_add()
398 hi20 = (offset + 0x800) & 0xfffff000; in apply_relocate_add()
399 lo12 = offset - hi20; in apply_relocate_add()