Commit f0451e26 by Jakub Jelinek Committed by Jakub Jelinek

* unwind-dw2.c (execute_cfa_program): Fix DW_CFA_restore handling.

From-SVN: r47881
parent a3bcfa67
2001-12-11 Jakub Jelinek <jakub@redhat.com>
* unwind-dw2.c (execute_cfa_program): Fix DW_CFA_restore handling.
2001-12-10 Roger Sayle <roger@eyesopen.com>
* builtins.c (expand_builtin): Use a switch statement to list
......
......@@ -711,9 +711,9 @@ execute_cfa_program (const unsigned char *insn_ptr,
_Unwind_Word reg, utmp;
_Unwind_Sword offset, stmp;
if (insn & DW_CFA_advance_loc)
if ((insn & 0xc0) == DW_CFA_advance_loc)
fs->pc += (insn & 0x3f) * fs->code_align;
else if (insn & DW_CFA_offset)
else if ((insn & 0xc0) == DW_CFA_offset)
{
reg = insn & 0x3f;
insn_ptr = read_uleb128 (insn_ptr, &utmp);
......@@ -721,7 +721,7 @@ execute_cfa_program (const unsigned char *insn_ptr,
fs->regs.reg[reg].how = REG_SAVED_OFFSET;
fs->regs.reg[reg].loc.offset = offset;
}
else if (insn & DW_CFA_restore)
else if ((insn & 0xc0) == DW_CFA_restore)
{
reg = insn & 0x3f;
fs->regs.reg[reg].how = REG_UNSAVED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment