diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/crtprec.c | 47 | ||||
-rw-r--r-- | gcc/config/i386/sol2.h | 8 | ||||
-rw-r--r-- | gcc/config/i386/t-crtpc | 34 |
3 files changed, 8 insertions, 81 deletions
diff --git a/gcc/config/i386/crtprec.c b/gcc/config/i386/crtprec.c deleted file mode 100644 index 4f42a8fa1c1..00000000000 --- a/gcc/config/i386/crtprec.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2007, 2009 Free Software Foundation, Inc. - * - * This file is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 3, or (at your option) any - * later version. - * - * This file 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 - * General Public License for more details. - * - * Under Section 7 of GPL version 3, you are granted additional - * permissions described in the GCC Runtime Library Exception, version - * 3.1, as published by the Free Software Foundation. - * - * You should have received a copy of the GNU General Public License and - * a copy of the GCC Runtime Library Exception along with this program; - * see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - * <http://www.gnu.org/licenses/>. - */ - -#if __PREC == 32 - #define X87CW (0 << 8) /* Single precision (24 bits) */ -#elif __PREC == 64 - #define X87CW (2 << 8) /* Double precision (53 bits) */ -#elif __PREC == 80 - #define X87CW (3 << 8) /* Extended precision (64 bits) */ -#else - #error "Wrong precision requested." -#endif - -#define X87CW_PCMASK (3 << 8) - -static void __attribute__((constructor)) -set_precision (void) -{ - unsigned short int cwd; - - asm volatile ("fstcw\t%0" : "=m" (cwd)); - - cwd &= ~X87CW_PCMASK; - cwd |= X87CW; - - asm volatile ("fldcw\t%0" : : "m" (cwd)); -} diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index f620de5fa44..e0e7c5b6a1e 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -70,6 +70,14 @@ along with GCC; see the file COPYING3. If not see #undef ASM_SPEC #define ASM_SPEC ASM_SPEC_BASE +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + %{mpc32:crtprec32.o%s} \ + %{mpc64:crtprec64.o%s} \ + %{mpc80:crtprec80.o%s} \ + crtend.o%s crtn.o%s" + #define SUBTARGET_CPU_EXTRA_SPECS \ { "cpp_subtarget", CPP_SUBTARGET_SPEC }, \ { "asm_cpu", ASM_CPU_SPEC }, \ diff --git a/gcc/config/i386/t-crtpc b/gcc/config/i386/t-crtpc deleted file mode 100644 index c165772f4ef..00000000000 --- a/gcc/config/i386/t-crtpc +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (C) 2007 Free Software Foundation, Inc. -# -# This file is part of GCC. -# -# GCC is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GCC 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GCC; see the file COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -EXTRA_PARTS += crtprec32.o crtprec64.o crtprec80.o - -$(T)crtprec32.o: $(srcdir)/config/i386/crtprec.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(MULTILIB_CFLAGS) -D__PREC=32 -c \ - $(srcdir)/config/i386/crtprec.c \ - -o $(T)crtprec32$(objext) - -$(T)crtprec64.o: $(srcdir)/config/i386/crtprec.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(MULTILIB_CFLAGS) -D__PREC=64 -c \ - $(srcdir)/config/i386/crtprec.c \ - -o $(T)crtprec64$(objext) - -$(T)crtprec80.o: $(srcdir)/config/i386/crtprec.c $(GCC_PASSES) - $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(MULTILIB_CFLAGS) -D__PREC=80 -c \ - $(srcdir)/config/i386/crtprec.c \ - -o $(T)crtprec80$(objext) |