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.

From-SVN: r91350
This commit is contained in:
Robert Millan 2004-11-26 21:37:24 +00:00 committed by Gerald Pfeifer
parent 75a25e3f65
commit 44379973a5
4 changed files with 26 additions and 10 deletions

View File

@ -1,3 +1,12 @@
2004-11-26 Robert Millan <robertmh@gnu.org>
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.
2004-11-26 Jeff Law <law@redhat.com>
* tree-ssa.c (verify_flow_sensitive_alias_info): Don't

View File

@ -951,9 +951,13 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu)
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*)

View File

@ -135,28 +135,28 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
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;
}

View File

@ -182,3 +182,6 @@ Boston, MA 02111-1307, USA. */
#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