1627f7eb2Smrg /* Fallback FPU-related code (for systems not otherwise supported). 2*4c3eb207Smrg Copyright (C) 2005-2020 Free Software Foundation, Inc. 3627f7eb2Smrg Contributed by Francois-Xavier Coudert <coudert@clipper.ens.fr> 4627f7eb2Smrg 5627f7eb2Smrg This file is part of the GNU Fortran runtime library (libgfortran). 6627f7eb2Smrg 7627f7eb2Smrg Libgfortran is free software; you can redistribute it and/or 8627f7eb2Smrg modify it under the terms of the GNU General Public 9627f7eb2Smrg License as published by the Free Software Foundation; either 10627f7eb2Smrg version 3 of the License, or (at your option) any later version. 11627f7eb2Smrg 12627f7eb2Smrg Libgfortran is distributed in the hope that it will be useful, 13627f7eb2Smrg but WITHOUT ANY WARRANTY; without even the implied warranty of 14627f7eb2Smrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15627f7eb2Smrg GNU General Public License for more details. 16627f7eb2Smrg 17627f7eb2Smrg Under Section 7 of GPL version 3, you are granted additional 18627f7eb2Smrg permissions described in the GCC Runtime Library Exception, version 19627f7eb2Smrg 3.1, as published by the Free Software Foundation. 20627f7eb2Smrg 21627f7eb2Smrg You should have received a copy of the GNU General Public License and 22627f7eb2Smrg a copy of the GCC Runtime Library Exception along with this program; 23627f7eb2Smrg see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24627f7eb2Smrg <http://www.gnu.org/licenses/>. */ 25627f7eb2Smrg 26627f7eb2Smrg 27627f7eb2Smrg /* Fallback FPU-related code for systems not otherwise supported. This 28627f7eb2Smrg is mainly telling the user that we will not be able to do what he 29627f7eb2Smrg requested. */ 30627f7eb2Smrg 31627f7eb2Smrg void set_fpu(void)32627f7eb2Smrgset_fpu (void) 33627f7eb2Smrg { 34627f7eb2Smrg if (options.fpe & GFC_FPE_INVALID) 35627f7eb2Smrg estr_write ("Fortran runtime warning: IEEE 'invalid operation' " 36627f7eb2Smrg "exception not supported.\n"); 37627f7eb2Smrg if (options.fpe & GFC_FPE_DENORMAL) 38627f7eb2Smrg estr_write ("Fortran runtime warning: Floating point 'denormal operand' " 39627f7eb2Smrg "exception not supported.\n"); 40627f7eb2Smrg if (options.fpe & GFC_FPE_ZERO) 41627f7eb2Smrg estr_write ("Fortran runtime warning: IEEE 'division by zero' " 42627f7eb2Smrg "exception not supported.\n"); 43627f7eb2Smrg if (options.fpe & GFC_FPE_OVERFLOW) 44627f7eb2Smrg estr_write ("Fortran runtime warning: IEEE 'overflow' " 45627f7eb2Smrg "exception not supported.\n"); 46627f7eb2Smrg if (options.fpe & GFC_FPE_UNDERFLOW) 47627f7eb2Smrg estr_write ("Fortran runtime warning: IEEE 'underflow' " 48627f7eb2Smrg "exception not supported.\n"); 49627f7eb2Smrg if (options.fpe & GFC_FPE_INEXACT) 50627f7eb2Smrg estr_write ("Fortran runtime warning: IEEE 'inexact' " 51627f7eb2Smrg "exception not supported.\n"); 52627f7eb2Smrg } 53627f7eb2Smrg 54627f7eb2Smrg void set_fpu_trap_exceptions(int trap,int notrap)55627f7eb2Smrgset_fpu_trap_exceptions (int trap __attribute__((unused)), 56627f7eb2Smrg int notrap __attribute__((unused))) 57627f7eb2Smrg { 58627f7eb2Smrg } 59627f7eb2Smrg 60627f7eb2Smrg int get_fpu_except_flags(void)61627f7eb2Smrgget_fpu_except_flags (void) 62627f7eb2Smrg { 63627f7eb2Smrg return 0; 64627f7eb2Smrg } 65627f7eb2Smrg 66627f7eb2Smrg 67627f7eb2Smrg int get_fpu_rounding_mode(void)68627f7eb2Smrgget_fpu_rounding_mode (void) 69627f7eb2Smrg { 70627f7eb2Smrg return 0; 71627f7eb2Smrg } 72627f7eb2Smrg 73627f7eb2Smrg 74627f7eb2Smrg void set_fpu_rounding_mode(int round)75627f7eb2Smrgset_fpu_rounding_mode (int round __attribute__((unused))) 76627f7eb2Smrg { 77627f7eb2Smrg } 78627f7eb2Smrg 79627f7eb2Smrg 80627f7eb2Smrg int support_fpu_underflow_control(int kind)81627f7eb2Smrgsupport_fpu_underflow_control (int kind __attribute__((unused))) 82627f7eb2Smrg { 83627f7eb2Smrg return 0; 84627f7eb2Smrg } 85627f7eb2Smrg 86627f7eb2Smrg 87627f7eb2Smrg int get_fpu_underflow_mode(void)88627f7eb2Smrgget_fpu_underflow_mode (void) 89627f7eb2Smrg { 90627f7eb2Smrg return 0; 91627f7eb2Smrg } 92627f7eb2Smrg 93627f7eb2Smrg 94627f7eb2Smrg void set_fpu_underflow_mode(int gradual)95627f7eb2Smrgset_fpu_underflow_mode (int gradual __attribute__((unused))) 96627f7eb2Smrg { 97627f7eb2Smrg } 98627f7eb2Smrg 99