From: Uros Bizjak Date: Wed, 21 Dec 2011 17:19:35 +0000 (+0100) Subject: linux-unwind.h: Update copyright years. X-Git-Tag: releases/gcc-4.5.4~311 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b496d4206d4ea2f995ab8d5b511b0de1b350b7d;p=thirdparty%2Fgcc.git linux-unwind.h: Update copyright years. * config/alpha/linux-unwind.h: Update copyright years. (MD_FROB_UPDATE_CONTEXT): New define. (alpha_frob_update_context): New function. From-SVN: r182596 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4beccabf492a..ccc55c9caa1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-12-21 Uros Bizjak + + * config/alpha/linux-unwind.h: Update copyright years. + (MD_FROB_UPDATE_CONTEXT): New define. + (alpha_frob_update_context): New function. + 2011-12-16 Eric Botcazou * config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant. diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h index 629d557c46c7..0626e6c8cc2c 100644 --- a/gcc/config/alpha/linux-unwind.h +++ b/gcc/config/alpha/linux-unwind.h @@ -1,5 +1,5 @@ /* DWARF2 EH unwinding support for Alpha Linux. - Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -36,16 +36,17 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, { unsigned int *pc = context->ra; struct sigcontext *sc; - long new_cfa, i; + long new_cfa; + int i; if (pc[0] != 0x47fe0410 /* mov $30,$16 */ - || pc[2] != 0x00000083 /* callsys */) + || pc[2] != 0x00000083) /* callsys */ return _URC_END_OF_STACK; if (context->cfa == 0) return _URC_END_OF_STACK; if (pc[1] == 0x201f0067) /* lda $0,NR_sigreturn */ sc = context->cfa; - else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ + else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ { struct rt_sigframe { struct siginfo info; @@ -55,6 +56,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, } else return _URC_END_OF_STACK; + new_cfa = sc->sc_regs[30]; fs->regs.cfa_how = CFA_REG_OFFSET; fs->regs.cfa_reg = 30; @@ -63,18 +65,35 @@ alpha_fallback_frame_state (struct _Unwind_Context *context, { fs->regs.reg[i].how = REG_SAVED_OFFSET; fs->regs.reg[i].loc.offset - = (long)&sc->sc_regs[i] - new_cfa; + = (long) &sc->sc_regs[i] - new_cfa; } for (i = 0; i < 31; ++i) { fs->regs.reg[i+32].how = REG_SAVED_OFFSET; fs->regs.reg[i+32].loc.offset - = (long)&sc->sc_fpregs[i] - new_cfa; + = (long) &sc->sc_fpregs[i] - new_cfa; } fs->regs.reg[64].how = REG_SAVED_OFFSET; - fs->regs.reg[64].loc.offset = (long)&sc->sc_pc - new_cfa; + fs->regs.reg[64].loc.offset = (long) &sc->sc_pc - new_cfa; fs->retaddr_column = 64; fs->signal_frame = 1; return _URC_NO_REASON; } + +#define MD_FROB_UPDATE_CONTEXT alpha_frob_update_context + +/* Fix up for kernels that have vDSO, but don't have S flag in it. */ + +static void +alpha_frob_update_context (struct _Unwind_Context *context, + _Unwind_FrameState *fs ATTRIBUTE_UNUSED) +{ + unsigned int *pc = context->ra; + + if (pc[0] == 0x47fe0410 /* mov $30,$16 */ + && pc[2] == 0x00000083 /* callsys */ + && (pc[1] == 0x201f0067 /* lda $0,NR_sigreturn */ + || pc[1] == 0x201f015f)) /* lda $0,NR_rt_sigreturn */ + _Unwind_SetSignalFrame (context, 1); +}