diff options
author | Robert Millan <robertmh@gnu.org> | 2004-11-26 21:37:24 +0000 |
---|---|---|
committer | Gerald Pfeifer <gerald@gcc.gnu.org> | 2004-11-26 21:37:24 +0000 |
commit | 44379973a5a46ef1180e7654f9af382f55b49cb2 (patch) | |
tree | f78a8676f3a7d6afea47bb02125193d52e3264ad /gcc | |
parent | 75a25e3f6558b1e05d4100a81ff36ac67e35ce62 (diff) | |
download | gcc-44379973a5a46ef1180e7654f9af382f55b49cb2.zip gcc-44379973a5a46ef1180e7654f9af382f55b49cb2.tar.gz gcc-44379973a5a46ef1180e7654f9af382f55b49cb2.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config.gcc | 6 | ||||
-rw-r--r-- | gcc/config/i386/linux-unwind.h | 18 | ||||
-rw-r--r-- | gcc/config/i386/linux.h | 3 |
4 files changed, 26 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c3d7358..8faf517 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config.gcc b/gcc/config.gcc index 1a972a7..e7feac9 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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*) diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h index ecbce1d..c746f4f 100644 --- a/gcc/config/i386/linux-unwind.h +++ b/gcc/config/i386/linux-unwind.h @@ -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; } diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 22210d0..b8dee2c 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -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 |