crtfastmath.c revision 90075
190075Sobrien/* Copyright (C) 2001 Free Software Foundation, Inc. 290075Sobrien Contributed by David Mosberger <davidm@hpl.hp.com>. 390075Sobrien 490075Sobrien The GNU C Library is free software; you can redistribute it and/or 590075Sobrien modify it under the terms of the GNU Library General Public License as 690075Sobrien published by the Free Software Foundation; either version 2 of the 790075Sobrien License, or (at your option) any later version. 890075Sobrien 990075Sobrien The GNU C Library is distributed in the hope that it will be useful, 1090075Sobrien but WITHOUT ANY WARRANTY; without even the implied warranty of 1190075Sobrien MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1290075Sobrien Library General Public License for more details. 1390075Sobrien 1490075Sobrien You should have received a copy of the GNU Library General Public 1590075Sobrien License along with the GNU C Library; see the file COPYING.LIB. If not, 1690075Sobrien write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 1790075Sobrien Boston, MA 02111-1307, USA. */ 1890075Sobrien 1990075Sobrien/* In addition to the permissions in the GNU General Public License, the 2090075Sobrien Free Software Foundation gives you unlimited permission to link the 2190075Sobrien compiled version of this file into combinations with other programs, 2290075Sobrien and to distribute those combinations without any restriction coming 2390075Sobrien from the use of this file. (The General Public License restrictions 2490075Sobrien do apply in other respects; for example, they cover modification of 2590075Sobrien the file, and distribution when not linked into a combine 2690075Sobrien executable.) */ 2790075Sobrien 2890075Sobrien/* We could call fesetenv() here but that would create a confusing 2990075Sobrien dependency on libm (since that is where fesetenv() gets defined. 3090075Sobrien To avoid this, just do everything locally. */ 3190075Sobrien#define FE_NONIEEE_ENV 0x0009a04d0270037f 3290075Sobrien 3390075Sobrienstatic void __attribute__((constructor)) 3490075Sobrien__ia64_set_fast_math (void) 3590075Sobrien{ 3690075Sobrien __asm__ __volatile__ ("mov.m ar.fpsr=%0" : : "r"(FE_NONIEEE_ENV)); 3790075Sobrien} 38