Lines Matching refs:sr
51 set_reg (dwarf_state_record_t *sr, unw_word_t regnum, dwarf_where_t where, in set_reg() argument
54 sr->rs_current.reg[regnum].where = where; in set_reg()
55 sr->rs_current.reg[regnum].val = val; in set_reg()
60 run_cfi_program (struct dwarf_cursor *c, dwarf_state_record_t *sr, in run_cfi_program() argument
154 set_reg (sr, regnum, DWARF_WHERE_CFAREL, val * dci->data_align); in run_cfi_program()
163 set_reg (sr, regnum, DWARF_WHERE_CFAREL, val * dci->data_align); in run_cfi_program()
172 set_reg (sr, regnum, DWARF_WHERE_CFAREL, val * dci->data_align); in run_cfi_program()
186 sr->rs_current.reg[regnum] = sr->rs_initial.reg[regnum]; in run_cfi_program()
200 sr->rs_current.reg[regnum] = sr->rs_initial.reg[regnum]; in run_cfi_program()
219 set_reg (sr, regnum, DWARF_WHERE_UNDEF, 0); in run_cfi_program()
226 set_reg (sr, regnum, DWARF_WHERE_SAME, 0); in run_cfi_program()
234 set_reg (sr, regnum, DWARF_WHERE_REG, val); in run_cfi_program()
247 memcpy (new_rs->reg, sr->rs_current.reg, sizeof (new_rs->reg)); in run_cfi_program()
260 memcpy (&sr->rs_current.reg, &rs_stack->reg, sizeof (rs_stack->reg)); in run_cfi_program()
271 set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_REG, regnum); in run_cfi_program()
272 set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, val); /* NOT factored! */ in run_cfi_program()
280 set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_REG, regnum); in run_cfi_program()
281 set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, in run_cfi_program()
290 set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_REG, regnum); in run_cfi_program()
297 set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, val); /* NOT factored! */ in run_cfi_program()
304 set_reg (sr, DWARF_CFA_OFF_COLUMN, 0, in run_cfi_program()
312 set_reg (sr, DWARF_CFA_REG_COLUMN, DWARF_WHERE_EXPR, *addr); in run_cfi_program()
327 set_reg (sr, regnum, DWARF_WHERE_EXPR, *addr); in run_cfi_program()
340 sr->args_size = val; in run_cfi_program()
351 set_reg (sr, regnum, DWARF_WHERE_CFAREL, -(val * dci->data_align)); in run_cfi_program()
361 set_reg (sr, regnum, DWARF_WHERE_CFAREL, in run_cfi_program()
450 parse_dynamic (struct dwarf_cursor *c, unw_word_t ip, dwarf_state_record_t *sr) in parse_dynamic() argument
473 parse_fde (struct dwarf_cursor *c, unw_word_t ip, dwarf_state_record_t *sr) in parse_fde() argument
483 if ((ret = run_cfi_program (c, sr, ~(unw_word_t) 0, &addr, in parse_fde()
487 memcpy (&sr->rs_initial, &sr->rs_current, sizeof (sr->rs_initial)); in parse_fde()
490 if ((ret = run_cfi_program (c, sr, ip, &addr, dci->fde_instr_end, dci)) < 0) in parse_fde()
656 create_state_record_for (struct dwarf_cursor *c, dwarf_state_record_t *sr, in create_state_record_for() argument
663 memset (sr, 0, sizeof (*sr)); in create_state_record_for()
665 set_reg (sr, i, DWARF_WHERE_SAME, 0); in create_state_record_for()
671 ret = parse_fde (c, ip, sr); in create_state_record_for()
675 ret = parse_dynamic (c, ip, sr); in create_state_record_for()
820 dwarf_state_record_t sr; in uncached_dwarf_find_save_locs() local
829 if ((ret = create_state_record_for (c, &sr, c->ip)) < 0) in uncached_dwarf_find_save_locs()
837 if ((ret = apply_reg_state (c, &sr.rs_current)) < 0) in uncached_dwarf_find_save_locs()
880 dwarf_state_record_t *sr = &sr_stack; in dwarf_find_save_locs() local
882 dwarf_state_record_t *sr = (dwarf_state_record_t*)malloc(sizeof(dwarf_state_record_t)); in dwarf_find_save_locs()
884 if (sr == NULL) in dwarf_find_save_locs()
889 (ret = create_state_record_for (c, sr, c->ip)) < 0) in dwarf_find_save_locs()
894 free(sr); in dwarf_find_save_locs()
900 memcpy(rs, &sr->rs_current, offsetof(struct dwarf_reg_state, ip)); in dwarf_find_save_locs()
909 free(sr); in dwarf_find_save_locs()
935 dwarf_create_state_record (struct dwarf_cursor *c, dwarf_state_record_t *sr) in dwarf_create_state_record() argument
937 return create_state_record_for (c, sr, c->ip); in dwarf_create_state_record()