From: Maxim Kuvyrkov Date: Tue, 9 Mar 2010 10:34:24 +0000 (-0800) Subject: m68k: update ColdFire sigcontext ABI X-Git-Tag: glibc-2.16-ports-before-merge~518 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75e73e66e49104a7aff24aa50043ae7ab02e38f3;p=thirdparty%2Fglibc.git m68k: update ColdFire sigcontext ABI --- diff --git a/ChangeLog.m68k b/ChangeLog.m68k index e2b54e5c5c0..d63b88e495e 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,5 +1,8 @@ 2010-03-09 Maxim Kuvyrkov + * sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h: Remove. + * sysdeps/unix/sysv/linux/m68k/register-dump.h: Update. + * sysdeps/unix/sysv/linux/m68k/bits/siginfo.h: Remove. * sysdeps/m68k/jmpbuf-unwind.h (_JMPBUF_CFA_UNWINDS_ADJ) diff --git a/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h b/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h deleted file mode 100644 index 8ad0c965637..00000000000 --- a/sysdeps/unix/sysv/linux/m68k/bits/sigcontext.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use directly; include instead." -#endif - -#ifndef _BITS_SIGCONTEXT_H -#define _BITS_SIGCONTEXT_H 1 - -struct sigcontext { - unsigned long sc_mask; - unsigned long sc_usp; - unsigned long sc_d0; - unsigned long sc_d1; -#ifdef __mcoldfire__ - unsigned long sc_d2; - unsigned long sc_d3; - unsigned long sc_d4; - unsigned long sc_d5; - unsigned long sc_d6; - unsigned long sc_d7; -#endif - unsigned long sc_a0; - unsigned long sc_a1; -#ifdef __mcoldfire__ - unsigned long sc_a2; - unsigned long sc_a3; - unsigned long sc_a4; - unsigned long sc_a5; - unsigned long sc_a6; -#endif - unsigned short sc_sr; - unsigned long sc_pc; - unsigned short sc_formatvec; -#ifdef __mcoldfire__ - unsigned long sc_fpregs[8][2]; - unsigned long sc_fpcntl[3]; - unsigned char sc_fpstate[16]; -#else - unsigned long sc_fpregs[2*3]; - unsigned long sc_fpcntl[3]; - unsigned char sc_fpstate[216]; -#endif -}; - -#endif diff --git a/sysdeps/unix/sysv/linux/m68k/register-dump.h b/sysdeps/unix/sysv/linux/m68k/register-dump.h index 391902f494d..78709d9cc65 100644 --- a/sysdeps/unix/sysv/linux/m68k/register-dump.h +++ b/sysdeps/unix/sysv/linux/m68k/register-dump.h @@ -40,7 +40,6 @@ */ -#ifndef __mcoldfire__ /* Linux saves only the call-clobbered registers in the sigcontext. We need to use a trampoline that saves the rest so that the C code can access them. We use the sc_fpstate field, since the handler is not @@ -59,14 +58,17 @@ catch_segfault:\n\ /* Clear the first 4 bytes to make it a null fp state, just\n\ in case the handler does return. */\n\ clr.l (%%a0)+\n\ - movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n\ - fmovem.x %%fp2-%%fp7,11*4(%%a0)\n\ - jra real_catch_segfault" + movem.l %%d2-%%d7/%%a2-%%a6,(%%a0)\n" +#ifndef __mcoldfire__ + "fmovem.x %%fp2-%%fp7,11*4(%%a0)\n" +#elif defined __mcffpu__ + "fmovem.d %%fp2-%%fp7,11*4(%%a0)\n" +#endif + "jra real_catch_segfault" : : "n" (offsetof (struct sigcontext, sc_fpstate))); } #define catch_segfault(a,b) \ __attribute_used__ real_catch_segfault(a,b) -#endif static void hexvalue (unsigned long int value, char *buf, size_t len) @@ -104,36 +106,19 @@ register_dump (int fd, struct sigcontext *ctx) /* Generate strings of register contents. */ hexvalue (ctx->sc_d0, regs[0], 8); hexvalue (ctx->sc_d1, regs[1], 8); -#ifdef __mcoldfire__ - hexvalue (ctx->sc_d2, regs[2], 8); - hexvalue (ctx->sc_d3, regs[3], 8); - hexvalue (ctx->sc_d4, regs[4], 8); - hexvalue (ctx->sc_d5, regs[5], 8); - hexvalue (ctx->sc_d6, regs[6], 8); - hexvalue (ctx->sc_d7, regs[7], 8); -#else hexvalue (*p++, regs[2], 8); hexvalue (*p++, regs[3], 8); hexvalue (*p++, regs[4], 8); hexvalue (*p++, regs[5], 8); hexvalue (*p++, regs[6], 8); hexvalue (*p++, regs[7], 8); -#endif hexvalue (ctx->sc_a0, regs[8], 8); hexvalue (ctx->sc_a1, regs[9], 8); -#ifdef __mcoldfire__ - hexvalue (ctx->sc_a2, regs[10], 8); - hexvalue (ctx->sc_a3, regs[11], 8); - hexvalue (ctx->sc_a4, regs[12], 8); - hexvalue (ctx->sc_a5, regs[13], 8); - hexvalue (ctx->sc_a6, regs[14], 8); -#else hexvalue (*p++, regs[10], 8); hexvalue (*p++, regs[11], 8); hexvalue (*p++, regs[12], 8); hexvalue (*p++, regs[13], 8); hexvalue (*p++, regs[14], 8); -#endif hexvalue (ctx->sc_usp, regs[15], 8); hexvalue (ctx->sc_pc, regs[16], 8); hexvalue (ctx->sc_sr, regs[17], 4); @@ -142,9 +127,6 @@ register_dump (int fd, struct sigcontext *ctx) for (i = 0; i < 2; i++) for (j = 0; j < fpreg_size; j += 8) hexvalue (*pfp++, fpregs[i] + j, 8); -#ifdef __mcoldfire__ - p = pfp; -#endif for (i = 2; i < 8; i++) for (j = 0; j < fpreg_size; j += 8) hexvalue (*p++, fpregs[i] + j, 8);