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 /* ======================================================================= 00037 * ======================================================================= 00038 * 00039 * 00040 * ======================================================================= 00041 * ======================================================================= 00042 */ 00043 00044 static char *source_file = __FILE__; 00045 00046 00047 #include "defs.h" 00048 #include "quad.h" 00049 00050 extern INT c_q_lt(QUAD, QUAD, INT *); 00051 #pragma weak c_q_lt = __c_q_lt 00052 #define c_q_lt __c_q_lt 00053 00054 /* implements the relational operator < for long doubles */ 00055 00056 INT 00057 c_q_lt(QUAD x, QUAD y, INT *p_err ) 00058 { 00059 *p_err = 0; 00060 00061 if ( x.hi < y.hi ) 00062 return ( 1 ); 00063 00064 if ( (x.hi == y.hi) && (x.lo < y.lo) ) 00065 return ( 1 ); 00066 00067 return ( 0 ); 00068 } 00069 00070 extern INT c_q_le(QUAD, QUAD, INT *); 00071 #pragma weak c_q_le = __c_q_le 00072 #define c_q_le __c_q_le 00073 00074 /* implements the relational operator <= for long doubles */ 00075 00076 INT 00077 c_q_le(QUAD x, QUAD y, INT *p_err ) 00078 { 00079 *p_err = 0; 00080 00081 if ( x.hi < y.hi ) 00082 return ( 1 ); 00083 00084 if ( (x.hi == y.hi) && (x.lo <= y.lo) ) 00085 return ( 1 ); 00086 00087 return ( 0 ); 00088 } 00089 00090 extern INT c_q_eq(QUAD, QUAD, INT *); 00091 #pragma weak c_q_eq = __c_q_eq 00092 #define c_q_eq __c_q_eq 00093 00094 /* implements the relational operator == for long doubles */ 00095 00096 INT 00097 c_q_eq(QUAD x, QUAD y, INT *p_err ) 00098 { 00099 *p_err = 0; 00100 00101 if ( (x.hi == y.hi) && (x.lo == y.lo) ) 00102 return ( 1 ); 00103 00104 return ( 0 ); 00105 } 00106 00107 extern INT c_q_ne(QUAD, QUAD, INT *); 00108 #pragma weak c_q_ne = __c_q_ne 00109 #define c_q_ne __c_q_ne 00110 00111 /* implements the relational operator != for long doubles */ 00112 00113 INT 00114 c_q_ne(QUAD x, QUAD y, INT *p_err ) 00115 { 00116 *p_err = 0; 00117 00118 if ( (x.hi != y.hi) || (x.lo != y.lo) ) 00119 return ( 1 ); 00120 00121 return ( 0 ); 00122 } 00123 00124 extern INT c_q_gt(QUAD, QUAD, INT *); 00125 #pragma weak c_q_gt = __c_q_gt 00126 #define c_q_gt __c_q_gt 00127 00128 /* implements the relational operator > for long doubles */ 00129 00130 INT 00131 c_q_gt(QUAD x, QUAD y, INT *p_err ) 00132 { 00133 *p_err = 0; 00134 00135 if ( x.hi > y.hi ) 00136 return ( 1 ); 00137 00138 if ( (x.hi == y.hi) && (x.lo > y.lo) ) 00139 return ( 1 ); 00140 00141 return ( 0 ); 00142 } 00143 00144 extern INT c_q_ge(QUAD, QUAD, INT *); 00145 #pragma weak c_q_ge = __c_q_ge 00146 #define c_q_ge __c_q_ge 00147 00148 /* implements the relational operator >= for long doubles */ 00149 00150 INT 00151 c_q_ge(QUAD x, QUAD y, INT *p_err ) 00152 { 00153 *p_err = 0; 00154 00155 if ( x.hi > y.hi ) 00156 return ( 1 ); 00157 00158 if ( (x.hi == y.hi) && (x.lo >= y.lo) ) 00159 return ( 1 ); 00160 00161 return ( 0 ); 00162 } 00163