Lines Matching defs:offset

39 			      struct section *sec, unsigned long offset)
43 hash_for_each_possible(file->insn_hash, insn, hash, sec_offset_hash(sec, offset)) {
44 if (insn->sec == sec && insn->offset == offset)
55 return find_insn(file, insn->sec, insn->offset + insn->len);
81 return find_insn(file, func->cfunc->sec, func->cfunc->offset);
89 return find_insn(file, insn->sec, insn->offset - insn->prev_len);
114 for (insn = find_insn(file, func->sec, func->offset); \
119 for (insn = find_insn(file, sym->sec, sym->offset); \
120 insn && insn->offset < sym->offset + sym->len; \
125 insn && insn->offset >= sym->offset; \
216 insn = find_insn(file, func->sec, func->offset);
373 unsigned long offset;
405 for (offset = 0; offset < sec->sh.sh_size; offset += insn->len) {
421 insn->offset = offset;
424 ret = arch_decode_instruction(file, sec, offset,
425 sec->sh.sh_size - offset,
440 hash_add(file->insn_hash, &insn->hash, sec_offset_hash(sec, insn->offset));
450 if (func->offset == sec->sh.sh_size) {
462 if (!find_insn(file, sec, func->offset)) {
473 if (insn->offset == func->offset) {
504 off = sym->offset;
516 idx = (reloc_offset(reloc) - sym->offset) / sizeof(unsigned long);
571 unsigned int offset;
574 for (offset = sec->sh.sh_size - 1; offset >= end && !insn; offset--)
575 insn = find_insn(file, sec, offset);
588 uint64_t offset;
599 offset = reloc_addend(reloc);
601 offset = reloc->sym->offset;
607 insn = find_insn(file, reloc->sym->sec, offset);
610 else if (offset == reloc->sym->sec->sh.sh_size) {
614 reloc->sym->sec->name, offset);
619 reloc->sym->sec->name, offset);
639 offset = reloc_addend(reloc);
641 offset = reloc->sym->offset;
647 insn = find_insn(file, reloc->sym->sec, offset);
650 else if (offset == reloc->sym->sec->sh.sh_size) {
654 reloc->sym->sec->name, offset);
659 reloc->sym->sec->name, offset);
706 insn->sec, insn->offset))
787 insn->sec, insn->offset))
825 insn->sec, insn->offset))
872 insn->offset == sym->offset &&
879 insn->sec, insn->offset))
927 sym->sec, sym->offset))
970 insn->sec, insn->offset);
1012 insn->sec, insn->offset))
1332 insn->offset, insn->len);
1390 insn->offset, insn->len,
1417 insn->offset, insn->len,
1503 if (insn->offset == sym->offset)
1511 insn->offset == sym->offset + prev->len)
1621 if (jump_dest->sym && jump_dest->offset == jump_dest->sym->offset) {
1675 static struct symbol *find_call_destination(struct section *sec, unsigned long offset)
1679 call_dest = find_func_by_offset(sec, offset);
1681 call_dest = find_symbol_by_offset(sec, offset);
1772 if (insn->offset >= special_alt->orig_off + special_alt->orig_len)
1783 if (orig_alt_group->last_insn->offset + orig_alt_group->last_insn->len -
1784 orig_alt_group->first_insn->offset != special_alt->orig_len) {
1786 orig_alt_group->last_insn->offset +
1788 orig_alt_group->first_insn->offset,
1816 nop->offset = special_alt->new_off + special_alt->new_len;
1833 if (insn->offset >= special_alt->new_off + special_alt->new_len)
1912 orig_insn->offset, orig_insn->len,
2047 reloc_addend(reloc) == pfunc->offset)
2104 (insn->jump_dest->offset <= insn->offset ||
2105 insn->jump_dest->offset > orig_insn->offset))
2141 insn->offset > last->offset &&
2142 insn->jump_dest->offset > insn->offset &&
2219 state->stack_size = initial_func_cfi.cfa.offset;
2230 unsigned long offset;
2259 offset = reloc_addend(reloc);
2261 offset = reloc->sym->offset;
2267 insn = find_insn(file, reloc->sym->sec, offset);
2292 struct symbol *sym = find_symbol_by_offset(insn->sec, insn->offset);
2314 cfi.cfa.offset = bswap_if_needed(file->elf, hint->sp_offset);
2336 reloc->sym->offset + reloc_addend(reloc));
2708 if (cfi->cfa.offset != initial_func_cfi.cfa.offset)
2711 if (cfi->stack_size != initial_func_cfi.cfa.offset)
2716 cfi->regs[i].offset != initial_func_cfi.regs[i].offset)
2727 reg->offset == expected_offset;
2735 check_reg_frame_pos(&cfi->regs[CFI_BP], -cfi->cfa.offset) &&
2736 check_reg_frame_pos(&cfi->regs[CFI_RA], -cfi->cfa.offset + 8))
2756 cfa->offset += 8;
2760 cfa->offset -= 8;
2765 cfa->offset -= op->src.offset;
2770 static void save_reg(struct cfi_state *cfi, unsigned char reg, int base, int offset)
2775 cfi->regs[reg].offset = offset;
2782 cfi->regs[reg].offset = initial_func_cfi.regs[reg].offset;
2870 check_reg_frame_pos(&regs[CFI_BP], -cfa->offset)) {
2882 regs[CFI_BP].offset = -cfi->stack_size;
2899 cfi->vals[op->dest.reg].offset = -cfi->stack_size;
2910 cfi->stack_size = -cfi->regs[CFI_BP].offset;
2927 cfa->offset = -cfi->vals[op->src.reg].offset;
2928 cfi->stack_size = cfa->offset;
2932 cfi->vals[op->src.reg].offset == cfa->offset) {
2954 * here and preserve offset. Therefore
2957 * offset to find the next frame, IOW:
2958 * (%rsp) + offset.
2964 cfa->offset = 0;
2970 cfi->vals[op->src.reg].offset == cfa->offset) {
2988 cfi->stack_size -= op->src.offset;
2990 cfa->offset -= op->src.offset;
2997 cfi->stack_size = -(op->src.offset + regs[CFI_BP].offset);
3017 cfi->vals[op->dest.reg].offset = \
3018 -cfi->stack_size + op->src.offset;
3028 cfa->offset = cfi->stack_size = -op->src.offset;
3052 cfa->offset = cfi->stack_size = 0;
3084 cfa->offset = 0;
3087 } else if (cfi->stack_size == -regs[op->dest.reg].offset) {
3095 cfa->offset -= 8;
3105 cfa->offset = cfi->stack_size;
3109 op->src.offset == cfi->drap_offset) {
3113 cfa->offset = 0;
3118 op->src.offset == regs[op->dest.reg].offset) {
3124 op->src.offset == regs[op->dest.reg].offset + cfa->offset) {
3131 op->src.offset == regs[op->dest.reg].offset + cfi->stack_size) {
3150 cfa->offset += 8;
3160 cfa->offset = -cfi->stack_size;
3195 cfa->offset = op->dest.offset;
3197 /* save drap offset so we know when to restore it */
3198 cfi->drap_offset = op->dest.offset;
3202 save_reg(cfi, op->src.reg, CFI_BP, op->dest.offset);
3210 op->dest.offset - cfi->cfa.offset);
3216 op->dest.offset - cfi->stack_size);
3218 } else if (op->src.reg == CFI_SP && op->dest.offset == 0) {
3222 cfi->vals[op->dest.reg].offset = cfa->offset;
3236 cfa->offset -= 8;
3271 group_off = insn->offset - insn->alt_group->first_insn->offset;
3279 char *where = offstr(insn->sec, insn->offset);
3340 cfi1->cfa.base, cfi1->cfa.offset,
3341 cfi2->cfa.base, cfi2->cfa.offset);
3350 i, cfi1->regs[i].base, cfi1->regs[i].offset,
3351 i, cfi2->regs[i].base, cfi2->regs[i].offset);
3927 insn_call_dest(insn)->offset);
4063 int size = find_symbol_hole_containing(insn->sec, insn->offset);
4064 unsigned long end = insn->offset + size;
4080 if (insn->offset >= end)
4139 if (insn->offset + insn->len >= insn_func(insn)->offset + insn_func(insn)->len)
4153 insn = find_insn(file, func->sec, func->offset);
4160 u64 offset;
4165 offset = func->offset - prev->offset;
4167 if (offset > opts.prefix)
4170 if (offset < opts.prefix)
4230 insn = find_insn(file, sec, sym->offset);
4310 struct symbol *sym = find_symbol_containing(insn->sec, insn->offset-1);
4316 first = find_insn(file, sym->sec, sym->offset);
4323 return insn->offset == sym->offset + sym->len;
4355 (insn->offset + insn->len) - (reloc_offset(reloc) + 1))) {
4364 off = reloc->sym->offset;
4413 WARN_INSN(insn, "relocation to !ENDBR: %s", offstr(dest->sec, dest->offset));
4427 reloc->sym->offset + reloc_addend(reloc));
4441 offstr(dest->sec, dest->offset));