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 * Revision history: 00041 * 10-Feb-95 - Original Version 00042 * 00043 * Description: 00044 * 00045 * Field access macros for type TCON 00046 * 00047 * ==================================================================== 00048 * ==================================================================== 00049 */ 00050 00051 #ifndef targ_const_private_INCLUDED 00052 #define targ_const_private_INCLUDED 00053 00054 #undef TCON_ty 00055 #define TCON_ty(c) ((c).ty) 00056 00057 #define TCON_v0(c) ((c).vals.ival.v0) 00058 #define TCON_v1(c) ((c).vals.ival.v1) 00059 #define TCON_v2(c) ((c).vals.ival.v2) 00060 #define TCON_v3(c) ((c).vals.ival.v3) 00061 #define TCON_iv0(c) ((c).cmplxval.ival.v0) 00062 #define TCON_iv1(c) ((c).cmplxval.ival.v1) 00063 #define TCON_iv2(c) ((c).cmplxval.ival.v2) 00064 #define TCON_iv3(c) ((c).cmplxval.ival.v3) 00065 #define TCON_u0(c) ((c).vals.uval.u0) 00066 #define TCON_u1(c) ((c).vals.uval.u1) 00067 #define TCON_u2(c) ((c).vals.uval.u2) 00068 #define TCON_u3(c) ((c).vals.uval.u3) 00069 #define TCON_I4(c) TCON_v0(c) 00070 #define TCON_U4(c) TCON_u0(c) 00071 #define TCON_I8(c) ((c).vals.i0) 00072 #define TCON_U8(c) ((c).vals.k0) 00073 00074 /* special TCON accessors for simplifier: 00075 I8I4CVT and U8I4CVT are nops for MIPS III and above and are removed. 00076 It is possible for kids to have a types I8, U8, I4, U4. */ 00077 #define TCON_I8U8I4U4(c) (MTYPE_is_signed(TCON_ty(c)) ? \ 00078 ((TCON_ty(c) == MTYPE_I8) ? TCON_I8(c) : TCON_I4(c)) : \ 00079 ((TCON_ty(c) == MTYPE_U8) ? TCON_U8(c) : TCON_U4(c))) 00080 00081 #define TCON_R8(c) ((c).vals.dval) 00082 #define TCON_R16(c) ((c).vals.qval) 00083 00084 #define TCON_IR8(c) ((c).cmplxval.dival) 00085 #define TCON_IR16(c) ((c).cmplxval.qival) 00086 /* The internal representation of 32-bit floats may be double: */ 00087 #ifdef TCON_R4_IS_DOUBLE 00088 #define TCON_R4(c) TCON_R8(c) 00089 #define TCON_IR4(c) TCON_IR8(c) 00090 #else 00091 #define TCON_R4(c) ((c).vals.fval) 00092 #define TCON_IR4(c) ((c).cmplxval.fival) 00093 #endif 00094 /* Complex imaginary parts */ 00095 00096 00097 00098 #define Set_TCON_R4(c,v) (TCON_R4(c) = v) 00099 #define Set_TCON_R8(c,v) (TCON_R8(c) = v) 00100 #define Set_TCON_R16(c,v) (TCON_R16(c) = v) 00101 #define Set_TCON_IR4(c,v) (TCON_IR4(c) = v) 00102 #define Set_TCON_IR8(c,v) (TCON_IR8(c) = v) 00103 #define Set_TCON_IR16(c,v) (TCON_IR16(c) = v) 00104 /* WARNING: We haven't carefully checked the implications of using 00105 * doubles for 32-bit floats -- must be done if turned on. 00106 */ 00107 00108 #define TCON_cp(c) ((c).vals.sval.cp) 00109 #define TCON_len(c) ((c).vals.sval.len) 00110 00111 #ifdef __cplusplus 00112 extern "C" { 00113 #endif 00114 extern char *Targ_Append_To_Dbuf (char *, char); 00115 #ifdef __cplusplus 00116 } 00117 #endif 00118 00119 #endif /* targ_const_private_INCLUDED */