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

From-SVN: r47881
This commit is contained in:
Jakub Jelinek 2001-12-11 18:27:14 +01:00 committed by Jakub Jelinek
parent a3bcfa679b
commit f0451e26f9
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
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

View File

@ -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;