glibc-bsd-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Glibc-bsd-hackers] Re: [PATCH] i386-k*bsd-gnu fix (w/ChangeLog)


From: Robert Millan
Subject: [Glibc-bsd-hackers] Re: [PATCH] i386-k*bsd-gnu fix (w/ChangeLog)
Date: Fri, 26 Nov 2004 17:05:03 +0100
User-agent: Mutt/1.5.6+20040722i


Nothing new on this?  64 days old now..

On Tue, Nov 16, 2004 at 03:42:13PM +0100, Robert Millan wrote:
> On Sun, Nov 14, 2004 at 12:57:32AM +0100, Gerald Pfeifer wrote:
> > On Fri, 12 Nov 2004, Robert Millan wrote:
> > >This patch is 50 days old.  It just takes 5 mins to get it from Bug 
> > >18117 and commit.  Any takers?
> > 
> > If you repost the patch here, and get a review (which I hope will happen
> > in that case), I volunteer to apply it.
> 
> Thanks!  An updated patch is attached.  ChangeLog entry pasted below.
> 
> Btw, it's worth noting that this patch was already reviewed and committed by
> Jim Wilson, but was accidentaly reverted in one of the post-release branch
> merges.  See http://gcc.gnu.org/ml/gcc-patches/2004-05/msg00050.html
> 
> 2004-11-16  Robert Millan  <address@hidden>
> 
>       Changes for k*bsd-gnu support.
>       * config/i386/linux.h: Define REG_NAME to allow overriding of register
>       names in sc structure.
>       * config/i386/linux-unwind.h: Refer to sc->REG_NAME(reg) instead of
>       sc->reg.
>       * config.gcc: Detect x86_64-k*bsd-gnu systems.
> 
> -- 
>  .''`.   Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S)
> : :' :
> `. `'    http://www.debian.org/ports/kfreebsd-gnu
>   `-

> 2004-11-16  Robert Millan  <address@hidden>
> 
>         Changes for k*bsd-gnu support.
>         * config/i386/linux.h: Define REG_NAME to allow overriding of register
>         names in sc structure.
>         * config/i386/linux-unwind.h: Refer to sc->REG_NAME(reg) instead of
>         sc->reg.
>       * config.gcc: Detect x86_64-k*bsd-gnu systems.
> 
> diff -ur gcc.old/gcc/config/i386/linux-unwind.h 
> gcc/gcc/config/i386/linux-unwind.h
> --- gcc.old/gcc/config/i386/linux-unwind.h    2004-09-08 02:17:13.000000000 
> +0200
> +++ gcc/gcc/config/i386/linux-unwind.h        2004-11-12 18:44:07.000000000 
> +0100
> @@ -135,28 +135,28 @@
>    else
>      return _URC_END_OF_STACK;
>  
> -  new_cfa = sc->esp;
> +  new_cfa = sc->REG_NAME(esp);
>    fs->cfa_how = CFA_REG_OFFSET;
>    fs->cfa_reg = 4;
>    fs->cfa_offset = new_cfa - (long) context->cfa;
>  
>    /* The SVR4 register numbering macros aren't usable in libgcc.  */
>    fs->regs.reg[0].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[0].loc.offset = (long)&sc->eax - new_cfa;
> +  fs->regs.reg[0].loc.offset = (long)&sc->REG_NAME(eax) - new_cfa;
>    fs->regs.reg[3].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[3].loc.offset = (long)&sc->ebx - new_cfa;
> +  fs->regs.reg[3].loc.offset = (long)&sc->REG_NAME(ebx) - new_cfa;
>    fs->regs.reg[1].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[1].loc.offset = (long)&sc->ecx - new_cfa;
> +  fs->regs.reg[1].loc.offset = (long)&sc->REG_NAME(ecx) - new_cfa;
>    fs->regs.reg[2].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[2].loc.offset = (long)&sc->edx - new_cfa;
> +  fs->regs.reg[2].loc.offset = (long)&sc->REG_NAME(edx) - new_cfa;
>    fs->regs.reg[6].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[6].loc.offset = (long)&sc->esi - new_cfa;
> +  fs->regs.reg[6].loc.offset = (long)&sc->REG_NAME(esi) - new_cfa;
>    fs->regs.reg[7].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[7].loc.offset = (long)&sc->edi - new_cfa;
> +  fs->regs.reg[7].loc.offset = (long)&sc->REG_NAME(edi) - new_cfa;
>    fs->regs.reg[5].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[5].loc.offset = (long)&sc->ebp - new_cfa;
> +  fs->regs.reg[5].loc.offset = (long)&sc->REG_NAME(ebp) - new_cfa;
>    fs->regs.reg[8].how = REG_SAVED_OFFSET;
> -  fs->regs.reg[8].loc.offset = (long)&sc->eip - new_cfa;
> +  fs->regs.reg[8].loc.offset = (long)&sc->REG_NAME(eip) - new_cfa;
>    fs->retaddr_column = 8;
>    return _URC_NO_REASON;
>  }
> diff -ur gcc.old/gcc/config/i386/linux.h gcc/gcc/config/i386/linux.h
> --- gcc.old/gcc/config/i386/linux.h   2004-10-17 20:09:38.000000000 +0200
> +++ gcc/gcc/config/i386/linux.h       2004-11-12 18:44:07.000000000 +0100
> @@ -182,3 +182,6 @@
>  #define NEED_INDICATE_EXEC_STACK 1
>  
>  #define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h"
> +
> +/* This macro may be overriden in i386/k*bsd-gnu.h */
> +#define REG_NAME(reg) reg
> diff -ur gcc.old/gcc/config.gcc gcc/gcc/config.gcc
> --- gcc.old/gcc/config.gcc    2004-10-22 00:28:22.000000000 +0200
> +++ gcc/gcc/config.gcc        2004-11-12 19:09:56.000000000 +0100
> @@ -947,9 +947,13 @@
>       esac
>       tmake_file="${tmake_file} i386/t-crtstuff"
>       ;;
> -x86_64-*-linux*)
> +x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
>       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h 
> linux.h \
>                i386/x86-64.h i386/linux64.h"
> +     case ${target} in
> +     x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h" ;;
> +     x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
> +     esac
>       tmake_file="${tmake_file} i386/t-linux64"
>       ;;
>  i[34567]86-*-gnu*)


-- 
 .''`.   Proudly running Debian GNU/kFreeBSD unstable/unreleased (on UFS2+S)
: :' :
`. `'    http://www.debian.org/ports/kfreebsd-gnu
  `-




reply via email to

[Prev in Thread] Current Thread [Next in Thread]