Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163440
b: refs/heads/master
c: cd7246f
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming committed Aug 16, 2009
1 parent a6adf83 commit 35ebedf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b955873bf530ee4b80e6c8b734521ad07cbaed7e
refs/heads/master: cd7246f0e2747bd2b43d25d0f63f05db182a62c0
4 changes: 4 additions & 0 deletions trunk/arch/sh/include/asm/dwarf.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ struct dwarf_stack {
#define DW_CFA_lo_user 0x1c
#define DW_CFA_hi_user 0x3f

/* GNU extension opcodes */
#define DW_CFA_GNU_args_size 0x2e
#define DW_CFA_GNU_negative_offset_extended 0x2f

/*
* Some call frame instructions encode their operands in the opcode. We
* need some helper functions to extract both the opcode and operands
Expand Down
14 changes: 13 additions & 1 deletion trunk/arch/sh/kernel/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start,
count = dwarf_read_uleb128(current_insn,
&frame->cfa_register);
current_insn += count;
frame->cfa_offset = 0;
frame->flags |= DWARF_FRAME_CFA_REG_OFFSET;
break;
case DW_CFA_def_cfa_offset:
Expand Down Expand Up @@ -465,6 +464,19 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start,
frame->regs[reg].flags |= DWARF_REG_OFFSET;
frame->regs[reg].addr = offset;
break;
case DW_CFA_GNU_args_size:
count = dwarf_read_uleb128(current_insn, &offset);
current_insn += count;
break;
case DW_CFA_GNU_negative_offset_extended:
count = dwarf_read_uleb128(current_insn, &reg);
current_insn += count;
count = dwarf_read_uleb128(current_insn, &offset);
offset *= cie->data_alignment_factor;
dwarf_frame_alloc_regs(frame, reg);
frame->regs[reg].flags |= DWARF_REG_OFFSET;
frame->regs[reg].addr = -offset;
break;
default:
pr_debug("unhandled DWARF instruction 0x%x\n", insn);
break;
Expand Down

0 comments on commit 35ebedf

Please sign in to comment.