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 /* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */ 00037 00038 #ifndef irbdata_defs_INCLUDED 00039 #define irbdata_defs_INCLUDED 00040 00041 /* See the "WHIRL Symbol Table Specification" for description of the INITO 00042 and INITV data structures */ 00043 00044 #ifndef symtab_idx_INCLUDED 00045 #include "symtab_idx.h" 00046 #endif /* symtab_idx_INCLUDED */ 00047 00048 // initialized objects 00049 struct INITO { 00050 ST_IDX st_idx; // item being initialized 00051 INITV_IDX val; // initial value 00052 00053 void Verify (UINT level) const; 00054 void Print (FILE* f) const; 00055 }; 00056 00057 00058 // initial value 00059 00060 enum INITVKIND { 00061 INITVKIND_UNK = 0, 00062 INITVKIND_SYMOFF = 1, 00063 INITVKIND_ZERO = 2, 00064 INITVKIND_ONE = 3, 00065 INITVKIND_VAL = 4, 00066 INITVKIND_BLOCK = 5, 00067 INITVKIND_PAD = 6, 00068 INITVKIND_SYMDIFF = 7, 00069 INITVKIND_SYMDIFF16 = 8, 00070 INITVKIND_LABEL = 9, 00071 INITVKIND_COUNT = 10 // total number of kinds 00072 }; 00073 00074 struct INITV 00075 { 00076 INITV_IDX next; // next value for non-scalar member 00077 INITVKIND kind : 16; // kind of value 00078 mUINT16 repeat1; // repeat factor (repeat2 used for 00079 // INITVKIND_VAL 00080 union { 00081 00082 struct { 00083 ST_IDX st; 00084 mINT32 ofst; 00085 } sto; // address + offset 00086 00087 struct { 00088 LABEL_IDX lab; // for INITVKIND_LABEL 00089 mINT32 unused; // filler, must be zero 00090 } lab; 00091 00092 struct { 00093 LABEL_IDX lab1; 00094 ST_IDX st2; 00095 } stdiff; // lab1 - st2 00096 00097 struct { 00098 union { 00099 TCON_IDX tc; // value 00100 mTYPE_ID mtype; // machine type for INITVKIND_ZERO 00101 // and INITVKIND_ONE 00102 } u; 00103 mUINT32 repeat2; // 32-bits for repeat factor 00104 } tcval; 00105 00106 struct { 00107 INITV_IDX blk; // useful for aggregate values 00108 mINT32 unused; // filler, must be zero 00109 } blk; 00110 00111 struct { 00112 mINT32 pad; // amount of padding in bytes 00113 mINT32 unused; // filler, must be zero 00114 } pad; 00115 } u; 00116 00117 ST_IDX St () const { return u.sto.st; } 00118 INT32 Ofst () const { return u.sto.ofst; } 00119 00120 LABEL_IDX Lab () const { return u.lab.lab; } 00121 00122 LABEL_IDX Lab1 () const { return u.stdiff.lab1; } 00123 ST_IDX St2 () const { return u.stdiff.st2; } 00124 00125 TCON_IDX Tc () const { return u.tcval.u.tc; } 00126 TYPE_ID Mtype () const { return u.tcval.u.mtype; } 00127 UINT32 Repeat2 () const { return u.tcval.repeat2; } 00128 00129 INITV_IDX Blk () const { return u.blk.blk; } 00130 INT32 Pad () const { return u.pad.pad; } 00131 00132 void Verify (UINT level) const; 00133 }; // INITV 00134 00135 00136 #endif /* irbdata_defs_INCLUDED */