LLVM API Documentation
00001 //===--- X86COFF.h - Some definitions from COFF documentations ------------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file just defines some symbols found in COFF documentation. They are 00011 // used to emit function type information for COFF targets (Cygwin/Mingw32). 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef X86COFF_H 00016 #define X86COFF_H 00017 00018 namespace COFF 00019 { 00020 /// Storage class tells where and what the symbol represents 00021 enum StorageClass { 00022 C_EFCN = -1, ///< Physical end of function 00023 C_NULL = 0, ///< No symbol 00024 C_AUTO = 1, ///< External definition 00025 C_EXT = 2, ///< External symbol 00026 C_STAT = 3, ///< Static 00027 C_REG = 4, ///< Register variable 00028 C_EXTDEF = 5, ///< External definition 00029 C_LABEL = 6, ///< Label 00030 C_ULABEL = 7, ///< Undefined label 00031 C_MOS = 8, ///< Member of structure 00032 C_ARG = 9, ///< Function argument 00033 C_STRTAG = 10, ///< Structure tag 00034 C_MOU = 11, ///< Member of union 00035 C_UNTAG = 12, ///< Union tag 00036 C_TPDEF = 13, ///< Type definition 00037 C_USTATIC = 14, ///< Undefined static 00038 C_ENTAG = 15, ///< Enumeration tag 00039 C_MOE = 16, ///< Member of enumeration 00040 C_REGPARM = 17, ///< Register parameter 00041 C_FIELD = 18, ///< Bit field 00042 00043 C_BLOCK = 100, ///< ".bb" or ".eb" - beginning or end of block 00044 C_FCN = 101, ///< ".bf" or ".ef" - beginning or end of function 00045 C_EOS = 102, ///< End of structure 00046 C_FILE = 103, ///< File name 00047 C_LINE = 104, ///< Line number, reformatted as symbol 00048 C_ALIAS = 105, ///< Duplicate tag 00049 C_HIDDEN = 106 ///< External symbol in dmert public lib 00050 }; 00051 00052 /// The type of the symbol. This is made up of a base type and a derived type. 00053 /// For example, pointer to int is "pointer to T" and "int" 00054 enum SymbolType { 00055 T_NULL = 0, ///< No type info 00056 T_ARG = 1, ///< Void function argument (only used by compiler) 00057 T_VOID = 1, ///< The same as above. Just named differently in some specs. 00058 T_CHAR = 2, ///< Character 00059 T_SHORT = 3, ///< Short integer 00060 T_INT = 4, ///< Integer 00061 T_LONG = 5, ///< Long integer 00062 T_FLOAT = 6, ///< Floating point 00063 T_DOUBLE = 7, ///< Double word 00064 T_STRUCT = 8, ///< Structure 00065 T_UNION = 9, ///< Union 00066 T_ENUM = 10, ///< Enumeration 00067 T_MOE = 11, ///< Member of enumeration 00068 T_UCHAR = 12, ///< Unsigned character 00069 T_USHORT = 13, ///< Unsigned short 00070 T_UINT = 14, ///< Unsigned integer 00071 T_ULONG = 15 ///< Unsigned long 00072 }; 00073 00074 /// Derived type of symbol 00075 enum SymbolDerivedType { 00076 DT_NON = 0, ///< No derived type 00077 DT_PTR = 1, ///< Pointer to T 00078 DT_FCN = 2, ///< Function returning T 00079 DT_ARY = 3 ///< Array of T 00080 }; 00081 00082 /// Masks for extracting parts of type 00083 enum SymbolTypeMasks { 00084 N_BTMASK = 017, ///< Mask for base type 00085 N_TMASK = 060 ///< Mask for derived type 00086 }; 00087 00088 /// Offsets of parts of type 00089 enum Shifts { 00090 N_BTSHFT = 4 ///< Type is formed as (base + derived << N_BTSHIFT) 00091 }; 00092 00093 } 00094 00095 #endif // X86COFF_H
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.