Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 #ifndef quadop_INCLUDED 00037 #define quadop_INCLUDED 00038 #ifdef __cplusplus 00039 extern "C" { 00040 #endif 00041 /* ==================================================================== 00042 * ==================================================================== 00043 * 00044 * 00045 * Revision history: 00046 * 15-Nov-92 - Original Version 00047 * 00048 * Description: 00049 * 00050 * This file defines a 16 byte type to represent 16 byte floats. If 00051 * the host C compiler supports such type, that type can be used. If 00052 * not, it needs to be implemented if needed. 00053 * 00054 * There are three possible situations: 00055 * 00056 * 1) If target compiler does not want to implement separate 16 byte 00057 * float (either because the target machine does not have such 00058 * operations or for some other reason), it does not matter what 00059 * the operations defined below do. They will never be used. 00060 * 00061 * md_ctarg.h and config.h will respectively define 00062 * CTARG_NEEDS_QUAD_OPS and TARG_NEEDS_QUAD_OPS to FALSE. Somewhere 00063 * in tran.c we will check that they are defined to same values. 00064 * 00065 * In ctarg.h, size and alignment of long_double will be set to be 00066 * same as those of double. In tran2.c type long_double will be 00067 * mapped to BETYPE_R8 because its size is 8. In float_pt.c, 00068 * separate quad routines will not be compiled in, and will never 00069 * use QUADOP macros. 00070 * 00071 * In f77fe/aux_stab.c,Get_Btype will not accept real*16 or 00072 * complex*32. In scan1.c 'Q' constnats will be treated same as 00073 * 'D' constants. 00074 * 00075 * In targ_const.c QUADOP defines will not be used. 00076 * 00077 * 2) If the target compiler wants to implement 16 byte float, but 00078 * host compiler does not support them. 00079 * 00080 * The macros defined in this file will be used to do quad word 00081 * operations. These macros must define type QUAD_TYPE to a 16 00082 * byte type. Operations must be done by routines that can 00083 * implement 16 byte floats. In writing such routines is not 00084 * practical, (particularly in cross compilers), they can be 00085 * written to actually do double precision operations, as long as 00086 * the QUAD_TYPE ise defined to be a 16 byte struct. 00087 * 00088 * md_ctarg.h and config.h will respectively define 00089 * CTARG_NEEDS_QUAD_OPS and TARG_NEEDS_QUAD_OPS to TRUE. Somewhere 00090 * in tran.c we will check that they are defined to same values. 00091 * 00092 * Size and alignment of long-double type of C will be defined in 00093 * md_ctarg.h. In tran2.c type long_double will be mapped to 00094 * BETYPE_R16 because its size is 8. In float_pt.c, separate quad 00095 * routines will be compiled in, and will use QUADOP macros. 00096 * 00097 * In f77fe/aux_stab.c, Get_Btype will accept real*16 or 00098 * complex*32. In scan1.c 'Q' constnats will become TK_SQUAD_CONST. 00099 * 00100 * In targ_const.c QUADOP defines will be used. 00101 * 00102 * 3) If the target compiler wants to implement 16 byte float, and the 00103 * host compiler supports them. 00104 * 00105 * Everything similar to 2) above, except that QUAD_TYPE can be 00106 * defined to be long_double of host and macros can be defined in 00107 * terms of native operations of host. 00108 * 00109 * ==================================================================== 00110 * ==================================================================== 00111 */ 00112 00113 00114 #ifdef _KEEP_RCS_ID 00115 #endif /* _KEEP_RCS_ID */ 00116 00117 extern QUAD_TYPE QUADOP_SQRT(QUAD_TYPE); 00118 extern INT QUADOP_EQ(QUAD_TYPE, QUAD_TYPE); 00119 extern INT QUADOP_NE(QUAD_TYPE, QUAD_TYPE); 00120 extern INT QUADOP_GE(QUAD_TYPE, QUAD_TYPE); 00121 extern INT QUADOP_GT(QUAD_TYPE, QUAD_TYPE); 00122 extern INT QUADOP_LE(QUAD_TYPE, QUAD_TYPE); 00123 extern INT QUADOP_LT(QUAD_TYPE, QUAD_TYPE); 00124 extern QUAD_TYPE QUADOP_ADD(QUAD_TYPE,QUAD_TYPE) ; 00125 extern QUAD_TYPE QUADOP_SUB(QUAD_TYPE,QUAD_TYPE) ; 00126 extern QUAD_TYPE QUADOP_MPY(QUAD_TYPE,QUAD_TYPE) ; 00127 extern QUAD_TYPE QUADOP_DIV(QUAD_TYPE,QUAD_TYPE) ; 00128 extern QUAD_TYPE QUADOP_NEGATE(QUAD_TYPE); 00129 extern double QUADOP_QTOD (QUAD_TYPE); 00130 extern float QUADOP_QTOS (QUAD_TYPE); 00131 extern INT QUADOP_QTOI (QUAD_TYPE); 00132 extern UINT QUADOP_QTOU (QUAD_TYPE); 00133 extern QUAD_TYPE QUADOP_UTOQ (UINT); 00134 extern QUAD_TYPE QUADOP_STOQ (float); 00135 extern QUAD_TYPE QUADOP_DTOQ (double); 00136 extern QUAD_TYPE QUADOP_ITOQ (INT); 00137 00138 extern QUAD_TYPE My_Atoq(char *); 00139 00140 #ifdef __cplusplus 00141 } 00142 #endif 00143 #endif /* quadop_INCLUDED */