1169689Skan/* Copyright (C) 2001, 2005 Free Software Foundation, Inc.
290075Sobrien   Contributed by David Mosberger <davidm@hpl.hp.com>.
390075Sobrien
4169689Skan   This file is part of GCC.
590075Sobrien
6169689Skan   GCC is free software; you can redistribute it and/or modify
7169689Skan   it under the terms of the GNU General Public License as published by
8169689Skan   the Free Software Foundation; either version 2, or (at your option)
9169689Skan   any later version.
10169689Skan
11169689Skan   GCC is distributed in the hope that it will be useful,
1290075Sobrien   but WITHOUT ANY WARRANTY; without even the implied warranty of
13169689Skan   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14169689Skan   GNU General Public License for more details.
1590075Sobrien
16169689Skan   You should have received a copy of the GNU General Public License
17169689Skan   along with GCC; see the file COPYING.  If not, write to
18169689Skan   the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19169689Skan   Boston, MA 02110-1301, USA.  */
2090075Sobrien
21169689Skan/* As a special exception, if you link this library with other files,
22169689Skan   some of which are compiled with GCC, to produce an executable,
23169689Skan   this library does not by itself cause the resulting executable
24169689Skan   to be covered by the GNU General Public License.
25169689Skan   This exception does not however invalidate any other reasons why
26169689Skan   the executable file might be covered by the GNU General Public License.  */
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