summaryrefslogtreecommitdiff
path: root/libgcc/config/ia64
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-13 17:33:38 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-13 17:33:38 +0000
commit1125ba8353fe7c4fa26f72ca22b970bfef27ce5b (patch)
tree43558081045fc254d40f3c818a030ebac045ba73 /libgcc/config/ia64
parent80fad4aa85bf56122b4b9e53c69083c34abccf4f (diff)
downloadgcc-1125ba8353fe7c4fa26f72ca22b970bfef27ce5b.tar.gz
gcc:
* config/alpha/crtfastmath.c: Move to ../libgcc/config/alpha. * config/alpha/t-crtfm: Remove. * config/i386/crtfastmath.c: Move to ../libgcc/config/i386. * config/i386/t-crtfm: Remove. * config/ia64/crtfastmath.c: Move to ../libgcc/config/ia64. * config/mips/crtfastmath.c: Move to ../libgcc/config/mips. * config/sparc/crtfastmath.c: Move to ../libgcc/config/sparc. * config/sparc/t-crtfm: Remove. * config.gcc (alpha*-*-linux*): Remove alpha/t-crtfm from tmake_file. (alpha*-*-freebsd*): Likewise. (i[34567]86-*-darwin*): Remove i386/t-crtfm from tmake_file. (x86_64-*-darwin*): Likewise. (i[34567]86-*-linux*): Likewise. (x86_64-*-linux*): Likewise. (x86_64-*-mingw*): Likewise. (ia64*-*-elf*): Remove crtfastmath.o from extra_parts. (ia64*-*-freebsd*): Likewise. (ia64*-*-linux*): Likewise. (mips64*-*-linux*): Likewise. (mips*-*-linux*): Likewise. (sparc-*-linux*): Remove sparc/t-crtfm from tmake_file. (sparc64-*-linux*): Likewise. (sparc64-*-freebsd*): Likewise. libgcc: * config/alpha/crtfastmath.c: New file. * config/i386/crtfastmath.c: New file. * config/ia64/crtfastmath.c: New file. * config/mips/crtfastmath.c: New file. * config/sparc/crtfastmath.c: New file. * config/t-crtfm (crtfastmath.o): Use $(srcdir) to refer to crtfastmath.c. Add -frandom-seed=gcc-crtfastmath. * config/alpha/t-crtfm: Remove. * config/i386/t-crtfm: Use $(srcdir) to refer to crtfastmath.c. * config/ia64/t-ia64 (crtfastmath.o): Remove. * config.host (alpha*-*-linux*): Replace alpha/t-crtfm by t-crtfm. (alpha*-dec-osf5.1*): Likewise. (alpha*-*-freebsd*): Add t-crtfm to tmake_file. Add crtfastmath.o to extra_parts. (i[34567]86-*-darwin*): Add i386/t-crtfm to tmake_file. Add crtfastmath.o to extra_parts. (x86_64-*-darwin*): Likewise. (x86_64-*-mingw*): Likewise. (ia64*-*-elf*): Add t-crtfm to tmake_file. (ia64*-*-freebsd*): Likewise. (ia64*-*-linux*): Likewise. (sparc64-*-freebsd*): Add t-crtfm to tmake_file. Add crtfastmath.o to extra_parts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176241 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/config/ia64')
-rw-r--r--libgcc/config/ia64/crtfastmath.c34
-rw-r--r--libgcc/config/ia64/t-ia643
2 files changed, 34 insertions, 3 deletions
diff --git a/libgcc/config/ia64/crtfastmath.c b/libgcc/config/ia64/crtfastmath.c
new file mode 100644
index 00000000000..0decd2a3f9c
--- /dev/null
+++ b/libgcc/config/ia64/crtfastmath.c
@@ -0,0 +1,34 @@
+/* Copyright (C) 2001, 2005, 2009 Free Software Foundation, Inc.
+ Contributed by David Mosberger <davidm@hpl.hp.com>.
+
+ 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.
+
+ 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/>. */
+
+/* We could call fesetenv() here but that would create a confusing
+ dependency on libm (since that is where fesetenv() gets defined.
+ To avoid this, just do everything locally. */
+#define FE_NONIEEE_ENV 0x0009a04d0270037f
+
+static void __attribute__((constructor))
+__ia64_set_fast_math (void)
+{
+ __asm__ __volatile__ ("mov.m ar.fpsr=%0" : : "r"(FE_NONIEEE_ENV));
+}
diff --git a/libgcc/config/ia64/t-ia64 b/libgcc/config/ia64/t-ia64
index d9c7566cfb0..3ec5fc5db08 100644
--- a/libgcc/config/ia64/t-ia64
+++ b/libgcc/config/ia64/t-ia64
@@ -13,6 +13,3 @@ crtbeginS.o: $(gcc_srcdir)/config/ia64/crtbegin.asm
crtendS.o: $(gcc_srcdir)/config/ia64/crtend.asm
$(CC) $(compile_deps) -I. -I$(gcc_objdir) -c -x assembler-with-cpp \
-o $@ -DSHARED $(gcc_srcdir)/config/ia64/crtend.asm
-
-crtfastmath.o: $(gcc_srcdir)/config/ia64/crtfastmath.c
- $(gcc_compile) -c $(gcc_srcdir)/config/ia64/crtfastmath.c