Emit symbol type information for ELF/COFF targets
[oota-llvm.git] / lib / Target / X86 / X86COFF.h
1 //===--- X86COFF.h - Some definitions from COFF documentations ------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
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).
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef X86COFF_H
16 #define X86COFF_H
17
18 namespace COFF 
19 {
20 enum StorageClass {
21   C_EFCN =   -1,  // physical end of function
22   C_NULL    = 0,
23   C_AUTO    = 1,  // external definition
24   C_EXT     = 2,  // external symbol
25   C_STAT    = 3,  // static
26   C_REG     = 4,  // register variable
27   C_EXTDEF  = 5,  // external definition
28   C_LABEL   = 6,  // label
29   C_ULABEL  = 7,  // undefined label
30   C_MOS     = 8,  // member of structure
31   C_ARG     = 9,  // function argument
32   C_STRTAG  = 10, // structure tag
33   C_MOU     = 11, // member of union
34   C_UNTAG   = 12, // union tag
35   C_TPDEF   = 13, // type definition
36   C_USTATIC = 14, // undefined static
37   C_ENTAG   = 15, // enumeration tag
38   C_MOE     = 16, // member of enumeration
39   C_REGPARM = 17, // register parameter
40   C_FIELD   = 18, // bit field
41
42   C_BLOCK  = 100, // ".bb" or ".eb"
43   C_FCN    = 101, // ".bf" or ".ef"
44   C_EOS    = 102, // end of structure
45   C_FILE   = 103, // file name
46   C_LINE   = 104, // dummy class for line number entry
47   C_ALIAS  = 105, // duplicate tag
48   C_HIDDEN = 106
49 };
50
51 enum SymbolType {
52   T_NULL   = 0,  // no type info
53   T_ARG    = 1,  // function argument (only used by compiler)
54   T_VOID   = 1,
55   T_CHAR   = 2,  // character
56   T_SHORT  = 3,  // short integer
57   T_INT    = 4,  // integer
58   T_LONG   = 5,  // long integer
59   T_FLOAT  = 6,  // floating point
60   T_DOUBLE = 7,  // double word
61   T_STRUCT = 8,  // structure
62   T_UNION  = 9,  // union
63   T_ENUM   = 10, // enumeration
64   T_MOE    = 11, // member of enumeration
65   T_UCHAR  = 12, // unsigned character
66   T_USHORT = 13, // unsigned short
67   T_UINT   = 14, // unsigned integer
68   T_ULONG  = 15  // unsigned long
69 };
70
71 enum SymbolDerivedType {
72   DT_NON = 0, // no derived type
73   DT_PTR = 1, // pointer
74   DT_FCN = 2, // function
75   DT_ARY = 3  // array
76 };
77
78 enum TypePacking {
79   N_BTMASK = 017,
80   N_TMASK = 060,
81   N_TMASK1 = 0300,
82   N_TMASK2 = 0360,
83   N_BTSHFT = 4,
84   N_TSHIFT = 2
85 };
86
87 }
88
89 #endif // X86COFF_H