1 //===--- X86COFF.h - Some definitions from COFF documentations ------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file just defines some symbols found in COFF documentation. They are
11 // used to emit function type information for COFF targets (Cygwin/Mingw32).
13 //===----------------------------------------------------------------------===//
20 /// Storage class tells where and what the symbol represents
22 C_EFCN
= -1, ///< Physical end of function
23 C_NULL
= 0, ///< No symbol
24 C_AUTO
= 1, ///< External definition
25 C_EXT
= 2, ///< External symbol
26 C_STAT
= 3, ///< Static
27 C_REG
= 4, ///< Register variable
28 C_EXTDEF
= 5, ///< External definition
29 C_LABEL
= 6, ///< Label
30 C_ULABEL
= 7, ///< Undefined label
31 C_MOS
= 8, ///< Member of structure
32 C_ARG
= 9, ///< Function argument
33 C_STRTAG
= 10, ///< Structure tag
34 C_MOU
= 11, ///< Member of union
35 C_UNTAG
= 12, ///< Union tag
36 C_TPDEF
= 13, ///< Type definition
37 C_USTATIC
= 14, ///< Undefined static
38 C_ENTAG
= 15, ///< Enumeration tag
39 C_MOE
= 16, ///< Member of enumeration
40 C_REGPARM
= 17, ///< Register parameter
41 C_FIELD
= 18, ///< Bit field
43 C_BLOCK
= 100, ///< ".bb" or ".eb" - beginning or end of block
44 C_FCN
= 101, ///< ".bf" or ".ef" - beginning or end of function
45 C_EOS
= 102, ///< End of structure
46 C_FILE
= 103, ///< File name
47 C_LINE
= 104, ///< Line number, reformatted as symbol
48 C_ALIAS
= 105, ///< Duplicate tag
49 C_HIDDEN
= 106 ///< External symbol in dmert public lib
52 /// The type of the symbol. This is made up of a base type and a derived type.
53 /// For example, pointer to int is "pointer to T" and "int"
55 T_NULL
= 0, ///< No type info
56 T_ARG
= 1, ///< Void function argument (only used by compiler)
57 T_VOID
= 1, ///< The same as above. Just named differently in some specs.
58 T_CHAR
= 2, ///< Character
59 T_SHORT
= 3, ///< Short integer
60 T_INT
= 4, ///< Integer
61 T_LONG
= 5, ///< Long integer
62 T_FLOAT
= 6, ///< Floating point
63 T_DOUBLE
= 7, ///< Double word
64 T_STRUCT
= 8, ///< Structure
65 T_UNION
= 9, ///< Union
66 T_ENUM
= 10, ///< Enumeration
67 T_MOE
= 11, ///< Member of enumeration
68 T_UCHAR
= 12, ///< Unsigned character
69 T_USHORT
= 13, ///< Unsigned short
70 T_UINT
= 14, ///< Unsigned integer
71 T_ULONG
= 15 ///< Unsigned long
74 /// Derived type of symbol
75 enum SymbolDerivedType
{
76 DT_NON
= 0, ///< No derived type
77 DT_PTR
= 1, ///< Pointer to T
78 DT_FCN
= 2, ///< Function returning T
79 DT_ARY
= 3 ///< Array of T
82 /// Masks for extracting parts of type
83 enum SymbolTypeMasks
{
84 N_BTMASK
= 017, ///< Mask for base type
85 N_TMASK
= 060 ///< Mask for derived type
88 /// Offsets of parts of type
90 N_BTSHFT
= 4 ///< Type is formed as (base + derived << N_BTSHIFT)