LLVM  16.0.0git
XCOFFYAML.cpp
Go to the documentation of this file.
1 //===-- XCOFFYAML.cpp - XCOFF YAMLIO implementation -------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines classes for handling the YAML representation of XCOFF.
10 //
11 //===----------------------------------------------------------------------===//
12 
15 #include <string.h>
16 
17 namespace llvm {
18 namespace XCOFFYAML {
19 
20 Object::Object() { memset(&Header, 0, sizeof(Header)); }
21 
22 AuxSymbolEnt::~AuxSymbolEnt() = default;
23 
24 } // namespace XCOFFYAML
25 
26 namespace yaml {
27 
29  IO &IO, XCOFF::SectionTypeFlags &Value) {
30 #define ECase(X) IO.bitSetCase(Value, #X, XCOFF::X)
31  ECase(STYP_PAD);
35  ECase(STYP_BSS);
44 #undef ECase
45 }
46 
48  IO &IO, XCOFF::StorageClass &Value) {
49 #define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
50  ECase(C_NULL);
51  ECase(C_AUTO);
52  ECase(C_EXT);
53  ECase(C_STAT);
54  ECase(C_REG);
55  ECase(C_EXTDEF);
56  ECase(C_LABEL);
57  ECase(C_ULABEL);
58  ECase(C_MOS);
59  ECase(C_ARG);
60  ECase(C_STRTAG);
61  ECase(C_MOU);
62  ECase(C_UNTAG);
63  ECase(C_TPDEF);
65  ECase(C_ENTAG);
66  ECase(C_MOE);
68  ECase(C_FIELD);
69  ECase(C_BLOCK);
70  ECase(C_FCN);
71  ECase(C_EOS);
72  ECase(C_FILE);
73  ECase(C_LINE);
74  ECase(C_ALIAS);
75  ECase(C_HIDDEN);
76  ECase(C_HIDEXT);
77  ECase(C_BINCL);
78  ECase(C_EINCL);
79  ECase(C_INFO);
81  ECase(C_DWARF);
82  ECase(C_GSYM);
83  ECase(C_LSYM);
84  ECase(C_PSYM);
85  ECase(C_RSYM);
86  ECase(C_RPSYM);
87  ECase(C_STSYM);
88  ECase(C_TCSYM);
89  ECase(C_BCOMM);
90  ECase(C_ECOML);
91  ECase(C_ECOMM);
92  ECase(C_DECL);
93  ECase(C_ENTRY);
94  ECase(C_FUN);
95  ECase(C_BSTAT);
96  ECase(C_ESTAT);
97  ECase(C_GTLS);
98  ECase(C_STTLS);
99  ECase(C_EFCN);
100 #undef ECase
101 }
102 
105 #define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
106  ECase(XMC_PR);
107  ECase(XMC_RO);
108  ECase(XMC_DB);
109  ECase(XMC_GL);
110  ECase(XMC_XO);
111  ECase(XMC_SV);
112  ECase(XMC_SV64);
113  ECase(XMC_SV3264);
114  ECase(XMC_TI);
115  ECase(XMC_TB);
116  ECase(XMC_RW);
117  ECase(XMC_TC0);
118  ECase(XMC_TC);
119  ECase(XMC_TD);
120  ECase(XMC_DS);
121  ECase(XMC_UA);
122  ECase(XMC_BS);
123  ECase(XMC_UC);
124  ECase(XMC_TL);
125  ECase(XMC_UL);
126  ECase(XMC_TE);
127 #undef ECase
128 }
129 
131  IO &IO, XCOFFYAML::AuxSymbolType &Type) {
132 #define ECase(X) IO.enumCase(Type, #X, XCOFFYAML::X)
133  ECase(AUX_EXCEPT);
134  ECase(AUX_FCN);
135  ECase(AUX_SYM);
136  ECase(AUX_FILE);
137  ECase(AUX_CSECT);
138  ECase(AUX_SECT);
139  ECase(AUX_STAT);
140 #undef ECase
141 }
142 
144  IO &IO, XCOFF::CFileStringType &Type) {
145 #define ECase(X) IO.enumCase(Type, #X, XCOFF::X)
146  ECase(XFT_FN);
147  ECase(XFT_CT);
148  ECase(XFT_CV);
149  ECase(XFT_CD);
150 #undef ECase
151 }
152 
154  NSectionFlags(IO &) : Flags(XCOFF::SectionTypeFlags(0)) {}
156 
157  uint32_t denormalize(IO &) { return Flags; }
158 
160 };
161 
163  IO &IO, XCOFFYAML::FileHeader &FileHdr) {
164  IO.mapOptional("MagicNumber", FileHdr.Magic);
165  IO.mapOptional("NumberOfSections", FileHdr.NumberOfSections);
166  IO.mapOptional("CreationTime", FileHdr.TimeStamp);
167  IO.mapOptional("OffsetToSymbolTable", FileHdr.SymbolTableOffset);
168  IO.mapOptional("EntriesInSymbolTable", FileHdr.NumberOfSymTableEntries);
169  IO.mapOptional("AuxiliaryHeaderSize", FileHdr.AuxHeaderSize);
170  IO.mapOptional("Flags", FileHdr.Flags);
171 }
172 
174  IO &IO, XCOFFYAML::AuxiliaryHeader &AuxHdr) {
175  IO.mapOptional("Magic", AuxHdr.Magic);
176  IO.mapOptional("Version", AuxHdr.Version);
177  IO.mapOptional("TextStartAddr", AuxHdr.TextStartAddr);
178  IO.mapOptional("DataStartAddr", AuxHdr.DataStartAddr);
179  IO.mapOptional("TOCAnchorAddr", AuxHdr.TOCAnchorAddr);
180  IO.mapOptional("TextSectionSize", AuxHdr.TextSize);
181  IO.mapOptional("DataSectionSize", AuxHdr.InitDataSize);
182  IO.mapOptional("BssSectionSize", AuxHdr.BssDataSize);
183  IO.mapOptional("SecNumOfEntryPoint", AuxHdr.SecNumOfEntryPoint);
184  IO.mapOptional("SecNumOfText", AuxHdr.SecNumOfText);
185  IO.mapOptional("SecNumOfData", AuxHdr.SecNumOfData);
186  IO.mapOptional("SecNumOfTOC", AuxHdr.SecNumOfTOC);
187  IO.mapOptional("SecNumOfLoader", AuxHdr.SecNumOfLoader);
188  IO.mapOptional("SecNumOfBSS", AuxHdr.SecNumOfBSS);
189  IO.mapOptional("MaxAlignOfText", AuxHdr.MaxAlignOfText);
190  IO.mapOptional("MaxAlignOfData", AuxHdr.MaxAlignOfData);
191  IO.mapOptional("ModuleType", AuxHdr.CpuFlag);
192  IO.mapOptional("TextPageSize", AuxHdr.TextPageSize);
193  IO.mapOptional("DataPageSize", AuxHdr.DataPageSize);
194  IO.mapOptional("StackPageSize", AuxHdr.StackPageSize);
195  IO.mapOptional("FlagAndTDataAlignment", AuxHdr.FlagAndTDataAlignment);
196  IO.mapOptional("EntryPointAddr", AuxHdr.EntryPointAddr);
197  IO.mapOptional("MaxStackSize", AuxHdr.MaxStackSize);
198  IO.mapOptional("MaxDataSize", AuxHdr.MaxDataSize);
199  IO.mapOptional("SecNumOfTData", AuxHdr.SecNumOfTData);
200  IO.mapOptional("SecNumOfTBSS", AuxHdr.SecNumOfTBSS);
201  IO.mapOptional("Flag", AuxHdr.Flag);
202 }
203 
206  IO.mapOptional("Address", R.VirtualAddress);
207  IO.mapOptional("Symbol", R.SymbolIndex);
208  IO.mapOptional("Info", R.Info);
209  IO.mapOptional("Type", R.Type);
210 }
211 
213  XCOFFYAML::Section &Sec) {
214  MappingNormalization<NSectionFlags, uint32_t> NC(IO, Sec.Flags);
215  IO.mapOptional("Name", Sec.SectionName);
216  IO.mapOptional("Address", Sec.Address);
217  IO.mapOptional("Size", Sec.Size);
218  IO.mapOptional("FileOffsetToData", Sec.FileOffsetToData);
219  IO.mapOptional("FileOffsetToRelocations", Sec.FileOffsetToRelocations);
220  IO.mapOptional("FileOffsetToLineNumbers", Sec.FileOffsetToLineNumbers);
221  IO.mapOptional("NumberOfRelocations", Sec.NumberOfRelocations);
222  IO.mapOptional("NumberOfLineNumbers", Sec.NumberOfLineNumbers);
223  IO.mapOptional("Flags", NC->Flags);
224  IO.mapOptional("SectionData", Sec.SectionData);
225  IO.mapOptional("Relocations", Sec.Relocations);
226 }
227 
228 static void auxSymMapping(IO &IO, XCOFFYAML::CsectAuxEnt &AuxSym, bool Is64) {
229  IO.mapOptional("ParameterHashIndex", AuxSym.ParameterHashIndex);
230  IO.mapOptional("TypeChkSectNum", AuxSym.TypeChkSectNum);
231  IO.mapOptional("SymbolAlignmentAndType", AuxSym.SymbolAlignmentAndType);
232  IO.mapOptional("StorageMappingClass", AuxSym.StorageMappingClass);
233  if (Is64) {
234  IO.mapOptional("SectionOrLengthLo", AuxSym.SectionOrLengthLo);
235  IO.mapOptional("SectionOrLengthHi", AuxSym.SectionOrLengthHi);
236  } else {
237  IO.mapOptional("SectionOrLength", AuxSym.SectionOrLength);
238  IO.mapOptional("StabInfoIndex", AuxSym.StabInfoIndex);
239  IO.mapOptional("StabSectNum", AuxSym.StabSectNum);
240  }
241 }
242 
243 static void auxSymMapping(IO &IO, XCOFFYAML::FileAuxEnt &AuxSym) {
244  IO.mapOptional("FileNameOrString", AuxSym.FileNameOrString);
245  IO.mapOptional("FileStringType", AuxSym.FileStringType);
246 }
247 
248 static void auxSymMapping(IO &IO, XCOFFYAML::BlockAuxEnt &AuxSym, bool Is64) {
249  if (Is64) {
250  IO.mapOptional("LineNum", AuxSym.LineNum);
251  } else {
252  IO.mapOptional("LineNumHi", AuxSym.LineNumHi);
253  IO.mapOptional("LineNumLo", AuxSym.LineNumLo);
254  }
255 }
256 
257 static void auxSymMapping(IO &IO, XCOFFYAML::FunctionAuxEnt &AuxSym,
258  bool Is64) {
259  if (!Is64)
260  IO.mapOptional("OffsetToExceptionTbl", AuxSym.OffsetToExceptionTbl);
261  IO.mapOptional("SizeOfFunction", AuxSym.SizeOfFunction);
262  IO.mapOptional("SymIdxOfNextBeyond", AuxSym.SymIdxOfNextBeyond);
263  IO.mapOptional("PtrToLineNum", AuxSym.PtrToLineNum);
264 }
265 
266 static void auxSymMapping(IO &IO, XCOFFYAML::ExcpetionAuxEnt &AuxSym) {
267  IO.mapOptional("OffsetToExceptionTbl", AuxSym.OffsetToExceptionTbl);
268  IO.mapOptional("SizeOfFunction", AuxSym.SizeOfFunction);
269  IO.mapOptional("SymIdxOfNextBeyond", AuxSym.SymIdxOfNextBeyond);
270 }
271 
272 static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForDWARF &AuxSym) {
273  IO.mapOptional("LengthOfSectionPortion", AuxSym.LengthOfSectionPortion);
274  IO.mapOptional("NumberOfRelocEnt", AuxSym.NumberOfRelocEnt);
275 }
276 
277 static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForStat &AuxSym) {
278  IO.mapOptional("SectionLength", AuxSym.SectionLength);
279  IO.mapOptional("NumberOfRelocEnt", AuxSym.NumberOfRelocEnt);
280  IO.mapOptional("NumberOfLineNum", AuxSym.NumberOfLineNum);
281 }
282 
284  IO &IO, std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) {
285  assert(!IO.outputting() && "We don't dump aux symbols currently.");
286  const bool Is64 =
287  static_cast<XCOFFYAML::Object *>(IO.getContext())->Header.Magic ==
288  (llvm::yaml::Hex16)XCOFF::XCOFF64;
290  IO.mapRequired("Type", AuxType);
291  switch (AuxType) {
293  if (!Is64)
294  IO.setError("an auxiliary symbol of type AUX_EXCEPT cannot be defined in "
295  "XCOFF32");
296  AuxSym.reset(new XCOFFYAML::ExcpetionAuxEnt());
297  auxSymMapping(IO, *cast<XCOFFYAML::ExcpetionAuxEnt>(AuxSym.get()));
298  break;
299  case XCOFFYAML::AUX_FCN:
300  AuxSym.reset(new XCOFFYAML::FunctionAuxEnt());
301  auxSymMapping(IO, *cast<XCOFFYAML::FunctionAuxEnt>(AuxSym.get()), Is64);
302  break;
303  case XCOFFYAML::AUX_SYM:
304  AuxSym.reset(new XCOFFYAML::BlockAuxEnt());
305  auxSymMapping(IO, *cast<XCOFFYAML::BlockAuxEnt>(AuxSym.get()), Is64);
306  break;
307  case XCOFFYAML::AUX_FILE:
308  AuxSym.reset(new XCOFFYAML::FileAuxEnt());
309  auxSymMapping(IO, *cast<XCOFFYAML::FileAuxEnt>(AuxSym.get()));
310  break;
312  AuxSym.reset(new XCOFFYAML::CsectAuxEnt());
313  auxSymMapping(IO, *cast<XCOFFYAML::CsectAuxEnt>(AuxSym.get()), Is64);
314  break;
315  case XCOFFYAML::AUX_SECT:
316  AuxSym.reset(new XCOFFYAML::SectAuxEntForDWARF());
317  auxSymMapping(IO, *cast<XCOFFYAML::SectAuxEntForDWARF>(AuxSym.get()));
318  break;
319  case XCOFFYAML::AUX_STAT:
320  if (Is64)
321  IO.setError(
322  "an auxiliary symbol of type AUX_STAT cannot be defined in XCOFF64");
323  AuxSym.reset(new XCOFFYAML::SectAuxEntForStat());
324  auxSymMapping(IO, *cast<XCOFFYAML::SectAuxEntForStat>(AuxSym.get()));
325  break;
326  }
327 }
328 
330  IO.mapOptional("Name", S.SymbolName);
331  IO.mapOptional("Value", S.Value);
332  IO.mapOptional("Section", S.SectionName);
333  IO.mapOptional("SectionIndex", S.SectionIndex);
334  IO.mapOptional("Type", S.Type);
335  IO.mapOptional("StorageClass", S.StorageClass);
336  IO.mapOptional("NumberOfAuxEntries", S.NumberOfAuxEntries);
337  if (!IO.outputting())
338  IO.mapOptional("AuxEntries", S.AuxEntries);
339 }
340 
342  IO.mapOptional("ContentSize", Str.ContentSize);
343  IO.mapOptional("Length", Str.Length);
344  IO.mapOptional("Strings", Str.Strings);
345  IO.mapOptional("RawContent", Str.RawContent);
346 }
347 
349  IO.setContext(&Obj);
350  IO.mapTag("!XCOFF", true);
351  IO.mapRequired("FileHeader", Obj.Header);
352  IO.mapOptional("AuxiliaryHeader", Obj.AuxHeader);
353  IO.mapOptional("Sections", Obj.Sections);
354  IO.mapOptional("Symbols", Obj.Symbols);
355  IO.mapOptional("StringTable", Obj.StrTbl);
356  IO.setContext(nullptr);
357 }
358 
359 } // namespace yaml
360 } // namespace llvm
llvm::XCOFFYAML::AUX_STAT
@ AUX_STAT
Definition: XCOFFYAML.h:92
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::XCOFF::C_EOS
@ C_EOS
Definition: XCOFF.h:214
llvm::XCOFF::C_DWARF
@ C_DWARF
Definition: XCOFF.h:173
llvm::XCOFFYAML::FileHeader
Definition: XCOFFYAML.h:22
llvm::XCOFFYAML::Section::FileOffsetToRelocations
llvm::yaml::Hex64 FileOffsetToRelocations
Definition: XCOFFYAML.h:76
llvm::XCOFF::STYP_EXCEPT
@ STYP_EXCEPT
Definition: XCOFF.h:127
llvm::XCOFFYAML::AuxiliaryHeader::FlagAndTDataAlignment
Optional< llvm::yaml::Hex8 > FlagAndTDataAlignment
Definition: XCOFFYAML.h:52
llvm::XCOFF::C_EXTDEF
@ C_EXTDEF
Definition: XCOFF.h:200
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfText
Optional< uint16_t > SecNumOfText
Definition: XCOFFYAML.h:39
llvm::XCOFF::C_USTATIC
@ C_USTATIC
Definition: XCOFF.h:209
llvm::XCOFF::XMC_GL
@ XMC_GL
Global Linkage (Interfile Interface Code)
Definition: XCOFF.h:95
llvm::XCOFFYAML::AuxSymbolEnt::~AuxSymbolEnt
virtual ~AuxSymbolEnt()
llvm::XCOFF::XMC_TD
@ XMC_TD
Scalar data item in the TOC.
Definition: XCOFF.h:107
llvm::XCOFF::STYP_BSS
@ STYP_BSS
Definition: XCOFF.h:126
llvm::XCOFF::XMC_TE
@ XMC_TE
Symbol mapped at the end of TOC.
Definition: XCOFF.h:115
llvm::XCOFF::C_ECOML
@ C_ECOML
Definition: XCOFF.h:180
llvm::XCOFFYAML::AuxiliaryHeader
Definition: XCOFFYAML.h:32
llvm::XCOFF::STYP_TYPCHK
@ STYP_TYPCHK
Definition: XCOFF.h:133
llvm::XCOFFYAML::AuxiliaryHeader::TextSize
Optional< llvm::yaml::Hex64 > TextSize
Definition: XCOFFYAML.h:53
llvm::yaml::ScalarEnumerationTraits< XCOFF::StorageClass >::enumeration
static void enumeration(IO &IO, XCOFF::StorageClass &Value)
Definition: XCOFFYAML.cpp:47
llvm::XCOFF::C_FILE
@ C_FILE
Definition: XCOFF.h:159
llvm::yaml::ScalarEnumerationTraits< XCOFF::StorageMappingClass >::enumeration
static void enumeration(IO &IO, XCOFF::StorageMappingClass &Value)
Definition: XCOFFYAML.cpp:103
llvm::XCOFFYAML::Object::Sections
std::vector< Section > Sections
Definition: XCOFFYAML.h:211
llvm::XCOFF::C_FIELD
@ C_FIELD
Definition: XCOFF.h:213
llvm::XCOFF::C_ESTAT
@ C_ESTAT
Definition: XCOFF.h:168
llvm::XCOFFYAML::SectAuxEntForStat::SectionLength
Optional< uint32_t > SectionLength
Definition: XCOFFYAML.h:179
llvm::XCOFF::XMC_PR
@ XMC_PR
Program Code.
Definition: XCOFF.h:92
llvm::XCOFF::C_TCSYM
@ C_TCSYM
Definition: XCOFF.h:221
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfEntryPoint
Optional< uint16_t > SecNumOfEntryPoint
Definition: XCOFFYAML.h:38
llvm::XCOFFYAML::FileHeader::Magic
llvm::yaml::Hex16 Magic
Definition: XCOFFYAML.h:23
llvm::XCOFF::XMC_UA
@ XMC_UA
Unclassified - Treated as Read Write.
Definition: XCOFF.h:109
llvm::XCOFFYAML::AUX_FILE
@ AUX_FILE
Definition: XCOFFYAML.h:89
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::XCOFFYAML::Section::FileOffsetToData
llvm::yaml::Hex64 FileOffsetToData
Definition: XCOFFYAML.h:75
llvm::XCOFFYAML::ExcpetionAuxEnt
Definition: XCOFFYAML.h:144
llvm::yaml::ScalarBitSetTraits< XCOFF::SectionTypeFlags >::bitset
static void bitset(IO &IO, XCOFF::SectionTypeFlags &Value)
Definition: XCOFFYAML.cpp:28
llvm::XCOFF::XMC_TC
@ XMC_TC
General TOC item.
Definition: XCOFF.h:106
llvm::XCOFF::C_ALIAS
@ C_ALIAS
Definition: XCOFF.h:216
llvm::XCOFFYAML::AuxiliaryHeader::CpuFlag
Optional< llvm::yaml::Hex8 > CpuFlag
Definition: XCOFFYAML.h:47
llvm::XCOFF::C_ULABEL
@ C_ULABEL
Definition: XCOFF.h:202
llvm::XCOFFYAML::AuxiliaryHeader::MaxAlignOfData
Optional< llvm::yaml::Hex16 > MaxAlignOfData
Definition: XCOFFYAML.h:45
llvm::XCOFFYAML::SectAuxEntForDWARF::NumberOfRelocEnt
Optional< uint32_t > NumberOfRelocEnt
Definition: XCOFFYAML.h:170
llvm::XCOFFYAML::AuxiliaryHeader::MaxAlignOfText
Optional< llvm::yaml::Hex16 > MaxAlignOfText
Definition: XCOFFYAML.h:44
llvm::XCOFF::C_NULL
@ C_NULL
Definition: XCOFF.h:189
llvm::yaml::NSectionFlags::Flags
XCOFF::SectionTypeFlags Flags
Definition: XCOFFYAML.cpp:159
llvm::XCOFF::XMC_DB
@ XMC_DB
Debug Dictionary Table.
Definition: XCOFF.h:94
llvm::XCOFF::C_ENTRY
@ C_ENTRY
Definition: XCOFF.h:166
llvm::XCOFFYAML::AuxSymbolType
AuxSymbolType
Definition: XCOFFYAML.h:85
llvm::XCOFFYAML::CsectAuxEnt::ParameterHashIndex
Optional< uint32_t > ParameterHashIndex
Definition: XCOFFYAML.h:121
llvm::XCOFFYAML::Object::StrTbl
StringTable StrTbl
Definition: XCOFFYAML.h:213
llvm::XCOFF::STYP_LOADER
@ STYP_LOADER
Definition: XCOFF.h:131
llvm::XCOFF::C_EFCN
@ C_EFCN
Definition: XCOFF.h:218
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:53
llvm::XCOFFYAML::FunctionAuxEnt::SymIdxOfNextBeyond
Optional< int32_t > SymIdxOfNextBeyond
Definition: XCOFFYAML.h:136
llvm::XCOFF::C_BLOCK
@ C_BLOCK
Definition: XCOFF.h:191
llvm::XCOFFYAML::FunctionAuxEnt::SizeOfFunction
Optional< uint32_t > SizeOfFunction
Definition: XCOFFYAML.h:135
llvm::yaml::NSectionFlags::denormalize
uint32_t denormalize(IO &)
Definition: XCOFFYAML.cpp:157
llvm::XCOFFYAML::Relocation
Definition: XCOFFYAML.h:64
llvm::XCOFFYAML::StringTable
Definition: XCOFFYAML.h:200
llvm::XCOFFYAML::FileAuxEnt::FileNameOrString
Optional< StringRef > FileNameOrString
Definition: XCOFFYAML.h:103
llvm::XCOFF::STYP_PAD
@ STYP_PAD
Definition: XCOFF.h:122
llvm::XCOFFYAML::FileHeader::TimeStamp
int32_t TimeStamp
Definition: XCOFFYAML.h:25
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfTData
Optional< uint16_t > SecNumOfTData
Definition: XCOFFYAML.h:59
llvm::XCOFF::C_HIDDEN
@ C_HIDDEN
Definition: XCOFF.h:217
llvm::XCOFF::STYP_DWARF
@ STYP_DWARF
Definition: XCOFF.h:123
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfTBSS
Optional< uint16_t > SecNumOfTBSS
Definition: XCOFFYAML.h:60
llvm::XCOFFYAML::ExcpetionAuxEnt::OffsetToExceptionTbl
Optional< uint64_t > OffsetToExceptionTbl
Definition: XCOFFYAML.h:145
llvm::XCOFFYAML::BlockAuxEnt::LineNumHi
Optional< uint16_t > LineNumHi
Definition: XCOFFYAML.h:157
XCOFF.h
llvm::XCOFF::C_STSYM
@ C_STSYM
Definition: XCOFF.h:163
llvm::XCOFFYAML::CsectAuxEnt::SectionOrLength
Optional< uint32_t > SectionOrLength
Definition: XCOFFYAML.h:114
llvm::XCOFFYAML::FunctionAuxEnt::PtrToLineNum
Optional< uint64_t > PtrToLineNum
Definition: XCOFFYAML.h:134
llvm::XCOFF::C_FUN
@ C_FUN
Definition: XCOFF.h:181
llvm::XCOFF::XMC_RO
@ XMC_RO
Read Only Constant.
Definition: XCOFF.h:93
llvm::XCOFFYAML::ExcpetionAuxEnt::SizeOfFunction
Optional< uint32_t > SizeOfFunction
Definition: XCOFFYAML.h:146
llvm::XCOFF::C_REGPARM
@ C_REGPARM
Definition: XCOFF.h:212
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfData
Optional< uint16_t > SecNumOfData
Definition: XCOFFYAML.h:40
llvm::XCOFF::C_UNTAG
@ C_UNTAG
Definition: XCOFF.h:207
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::XCOFFYAML::AuxiliaryHeader::DataStartAddr
Optional< llvm::yaml::Hex64 > DataStartAddr
Definition: XCOFFYAML.h:36
llvm::XCOFF::C_STTLS
@ C_STTLS
Definition: XCOFF.h:170
llvm::XCOFF::AUX_SECT
@ AUX_SECT
Identifies a SECT auxiliary entry.
Definition: XCOFF.h:334
llvm::XCOFF::AUX_EXCEPT
@ AUX_EXCEPT
Identifies an exception auxiliary entry.
Definition: XCOFF.h:329
llvm::XCOFF::XCOFF64
@ XCOFF64
Definition: XCOFF.h:47
llvm::XCOFFYAML::ExcpetionAuxEnt::SymIdxOfNextBeyond
Optional< int32_t > SymIdxOfNextBeyond
Definition: XCOFFYAML.h:147
llvm::XCOFFYAML::FileHeader::Flags
llvm::yaml::Hex16 Flags
Definition: XCOFFYAML.h:29
llvm::XCOFFYAML::CsectAuxEnt::StabSectNum
Optional< uint16_t > StabSectNum
Definition: XCOFFYAML.h:116
llvm::XCOFF::C_FCN
@ C_FCN
Definition: XCOFF.h:192
llvm::XCOFF::C_STAT
@ C_STAT
Definition: XCOFF.h:190
llvm::XCOFFYAML::CsectAuxEnt
Definition: XCOFFYAML.h:112
llvm::yaml::ScalarEnumerationTraits< XCOFF::CFileStringType >::enumeration
static void enumeration(IO &IO, XCOFF::CFileStringType &Type)
Definition: XCOFFYAML.cpp:143
llvm::XCOFFYAML::FileHeader::SymbolTableOffset
llvm::yaml::Hex64 SymbolTableOffset
Definition: XCOFFYAML.h:26
llvm::XCOFF::C_BINCL
@ C_BINCL
Definition: XCOFF.h:160
llvm::XCOFF::XMC_SV3264
@ XMC_SV3264
Supervisor Call for both 32- and 64-bit processes.
Definition: XCOFF.h:99
llvm::XCOFF::C_MOU
@ C_MOU
Definition: XCOFF.h:206
llvm::XCOFF::AUX_FILE
@ AUX_FILE
Identifies a file auxiliary entry.
Definition: XCOFF.h:332
llvm::XCOFFYAML::FileAuxEnt
Definition: XCOFFYAML.h:102
llvm::XCOFFYAML::Section::Flags
uint32_t Flags
Definition: XCOFFYAML.h:80
llvm::XCOFF::XFT_CT
@ XFT_CT
Specifies the compiler time stamp.
Definition: XCOFF.h:312
llvm::XCOFF::StorageMappingClass
StorageMappingClass
Storage Mapping Class definitions.
Definition: XCOFF.h:90
llvm::XCOFFYAML::AuxiliaryHeader::MaxStackSize
Optional< llvm::yaml::Hex64 > MaxStackSize
Definition: XCOFFYAML.h:57
llvm::XCOFFYAML::BlockAuxEnt::LineNum
Optional< uint32_t > LineNum
Definition: XCOFFYAML.h:160
llvm::XCOFF::C_ECOMM
@ C_ECOMM
Definition: XCOFF.h:165
llvm::XCOFF::C_LINE
@ C_LINE
Definition: XCOFF.h:215
llvm::XCOFF::C_EXT
@ C_EXT
Definition: XCOFF.h:185
llvm::XCOFFYAML::AuxiliaryHeader::TOCAnchorAddr
Optional< llvm::yaml::Hex64 > TOCAnchorAddr
Definition: XCOFFYAML.h:37
llvm::XCOFFYAML::SectAuxEntForStat::NumberOfLineNum
Optional< uint16_t > NumberOfLineNum
Definition: XCOFFYAML.h:181
llvm::XCOFF::C_LABEL
@ C_LABEL
Definition: XCOFF.h:201
llvm::XCOFFYAML::FileHeader::NumberOfSymTableEntries
int32_t NumberOfSymTableEntries
Definition: XCOFFYAML.h:27
llvm::XCOFFYAML::AuxiliaryHeader::InitDataSize
Optional< llvm::yaml::Hex64 > InitDataSize
Definition: XCOFFYAML.h:54
llvm::XCOFF::STYP_TDATA
@ STYP_TDATA
Definition: XCOFF.h:129
llvm::XCOFF::StorageClass
StorageClass
Definition: XCOFF.h:157
llvm::XCOFF::C_BSTAT
@ C_BSTAT
Definition: XCOFF.h:167
llvm::XCOFF::XMC_TB
@ XMC_TB
Traceback Table csect.
Definition: XCOFF.h:101
llvm::XCOFF::STYP_INFO
@ STYP_INFO
Definition: XCOFF.h:128
llvm::XCOFF::XMC_SV64
@ XMC_SV64
Supervisor Call for 64-bit process.
Definition: XCOFF.h:98
llvm::XCOFFYAML::CsectAuxEnt::SectionOrLengthLo
Optional< uint32_t > SectionOrLengthLo
Definition: XCOFFYAML.h:118
llvm::yaml::NSectionFlags
Definition: XCOFFYAML.cpp:153
llvm::XCOFF::C_RSYM
@ C_RSYM
Definition: XCOFF.h:178
llvm::XCOFF::XFT_FN
@ XFT_FN
Specifies the source-file name.
Definition: XCOFF.h:311
llvm::XCOFFYAML::SectAuxEntForDWARF::LengthOfSectionPortion
Optional< uint32_t > LengthOfSectionPortion
Definition: XCOFFYAML.h:169
llvm::XCOFF::XFT_CV
@ XFT_CV
Specifies the compiler version number.
Definition: XCOFF.h:313
llvm::XCOFF::STYP_OVRFLO
@ STYP_OVRFLO
Definition: XCOFF.h:134
llvm::XCOFF::C_STRTAG
@ C_STRTAG
Definition: XCOFF.h:205
llvm::XCOFF::XMC_TI
@ XMC_TI
Traceback Index csect.
Definition: XCOFF.h:100
llvm::XCOFF::C_ENTAG
@ C_ENTAG
Definition: XCOFF.h:210
llvm::XCOFF::C_MOE
@ C_MOE
Definition: XCOFF.h:211
llvm::XCOFF::XMC_TL
@ XMC_TL
Initialized thread-local variable.
Definition: XCOFF.h:113
llvm::XCOFFYAML::FileAuxEnt::FileStringType
Optional< XCOFF::CFileStringType > FileStringType
Definition: XCOFFYAML.h:104
llvm::XCOFF::C_TPDEF
@ C_TPDEF
Definition: XCOFF.h:208
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfBSS
Optional< uint16_t > SecNumOfBSS
Definition: XCOFFYAML.h:43
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfTOC
Optional< uint16_t > SecNumOfTOC
Definition: XCOFFYAML.h:41
llvm::XCOFF::C_INFO
@ C_INFO
Definition: XCOFF.h:194
llvm::XCOFFYAML::FileHeader::NumberOfSections
uint16_t NumberOfSections
Definition: XCOFFYAML.h:24
llvm::XCOFFYAML::Section::NumberOfRelocations
llvm::yaml::Hex16 NumberOfRelocations
Definition: XCOFFYAML.h:78
llvm::XCOFFYAML::AuxiliaryHeader::Magic
Optional< llvm::yaml::Hex16 > Magic
Definition: XCOFFYAML.h:33
llvm::XCOFF::C_RPSYM
@ C_RPSYM
Definition: XCOFF.h:179
llvm::XCOFF::C_HIDEXT
@ C_HIDEXT
Definition: XCOFF.h:193
llvm::XCOFFYAML::Object::Symbols
std::vector< Symbol > Symbols
Definition: XCOFFYAML.h:212
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::XCOFFYAML::CsectAuxEnt::SectionOrLengthHi
Optional< uint32_t > SectionOrLengthHi
Definition: XCOFFYAML.h:119
llvm::XCOFFYAML::SectAuxEntForStat::NumberOfRelocEnt
Optional< uint16_t > NumberOfRelocEnt
Definition: XCOFFYAML.h:180
llvm::XCOFFYAML::Object
Definition: XCOFFYAML.h:208
AuxType
COFFYAML::AuxSymbolType AuxType
Definition: COFFYAML.cpp:352
llvm::XCOFF::C_BCOMM
@ C_BCOMM
Definition: XCOFF.h:164
llvm::XCOFFYAML::BlockAuxEnt
Definition: XCOFFYAML.h:155
llvm::XCOFFYAML::AuxiliaryHeader::BssDataSize
Optional< llvm::yaml::Hex64 > BssDataSize
Definition: XCOFFYAML.h:55
llvm::XCOFFYAML::Section
Definition: XCOFFYAML.h:71
llvm::XCOFFYAML::FunctionAuxEnt
Definition: XCOFFYAML.h:132
llvm::yaml::auxSymMapping
static void auxSymMapping(IO &IO, XCOFFYAML::CsectAuxEnt &AuxSym, bool Is64)
Definition: XCOFFYAML.cpp:228
llvm::XCOFFYAML::Object::Object
Object()
Definition: XCOFFYAML.cpp:20
llvm::XCOFFYAML::BlockAuxEnt::LineNumLo
Optional< uint16_t > LineNumLo
Definition: XCOFFYAML.h:158
llvm::XCOFF::XMC_UC
@ XMC_UC
Un-named Fortran Common.
Definition: XCOFF.h:111
llvm::XCOFF::AUX_SYM
@ AUX_SYM
Identifies a symbol auxiliary entry.
Definition: XCOFF.h:331
llvm::yaml::NSectionFlags::NSectionFlags
NSectionFlags(IO &, uint32_t C)
Definition: XCOFFYAML.cpp:155
llvm::XCOFF::C_WEAKEXT
@ C_WEAKEXT
Definition: XCOFF.h:186
llvm::XCOFFYAML::AuxiliaryHeader::SecNumOfLoader
Optional< uint16_t > SecNumOfLoader
Definition: XCOFFYAML.h:42
uint32_t
llvm::XCOFF::SectionTypeFlags
SectionTypeFlags
Definition: XCOFF.h:121
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
XCOFFYAML.h
llvm::XCOFF::C_GSYM
@ C_GSYM
Definition: XCOFF.h:162
llvm::XCOFFYAML::Object::AuxHeader
Optional< AuxiliaryHeader > AuxHeader
Definition: XCOFFYAML.h:210
llvm::XCOFFYAML::AUX_SECT
@ AUX_SECT
Definition: XCOFFYAML.h:91
llvm::XCOFFYAML::CsectAuxEnt::StabInfoIndex
Optional< uint32_t > StabInfoIndex
Definition: XCOFFYAML.h:115
llvm::XCOFFYAML::Object::Header
FileHeader Header
Definition: XCOFFYAML.h:209
llvm::XCOFF::C_LSYM
@ C_LSYM
Definition: XCOFF.h:176
llvm::XCOFFYAML::AUX_FCN
@ AUX_FCN
Definition: XCOFFYAML.h:87
llvm::XCOFFYAML::AuxiliaryHeader::TextPageSize
Optional< llvm::yaml::Hex8 > TextPageSize
Definition: XCOFFYAML.h:49
llvm::XCOFFYAML::AUX_EXCEPT
@ AUX_EXCEPT
Definition: XCOFFYAML.h:86
llvm::XCOFFYAML::Section::Size
llvm::yaml::Hex64 Size
Definition: XCOFFYAML.h:74
NC
#define NC
Definition: regutils.h:42
llvm::XCOFF::STYP_DEBUG
@ STYP_DEBUG
Definition: XCOFF.h:132
llvm::XCOFFYAML::Section::FileOffsetToLineNumbers
llvm::yaml::Hex64 FileOffsetToLineNumbers
Definition: XCOFFYAML.h:77
llvm::XCOFFYAML::AuxiliaryHeader::StackPageSize
Optional< llvm::yaml::Hex8 > StackPageSize
Definition: XCOFFYAML.h:51
llvm::XCOFFYAML::AuxiliaryHeader::TextStartAddr
Optional< llvm::yaml::Hex64 > TextStartAddr
Definition: XCOFFYAML.h:35
llvm::XCOFF::AUX_CSECT
@ AUX_CSECT
Identifies a csect auxiliary entry.
Definition: XCOFF.h:333
llvm::XCOFF::XMC_TC0
@ XMC_TC0
TOC Anchor for TOC Addressability.
Definition: XCOFF.h:105
llvm::XCOFF::C_REG
@ C_REG
Definition: XCOFF.h:199
llvm::XCOFF::XMC_XO
@ XMC_XO
Extended Operation (Pseudo Machine Instruction)
Definition: XCOFF.h:96
ECase
#define ECase(X)
llvm::XCOFFYAML::AuxiliaryHeader::MaxDataSize
Optional< llvm::yaml::Hex64 > MaxDataSize
Definition: XCOFFYAML.h:58
llvm::XCOFF::XMC_DS
@ XMC_DS
Descriptor csect.
Definition: XCOFF.h:108
llvm::XCOFFYAML::SectAuxEntForDWARF
Definition: XCOFFYAML.h:168
llvm::XCOFF::AUX_FCN
@ AUX_FCN
Identifies a function auxiliary entry.
Definition: XCOFF.h:330
llvm::XCOFF::C_MOS
@ C_MOS
Definition: XCOFF.h:203
llvm::XCOFFYAML::Section::NumberOfLineNumbers
llvm::yaml::Hex16 NumberOfLineNumbers
Definition: XCOFFYAML.h:79
llvm::XCOFFYAML::FileHeader::AuxHeaderSize
uint16_t AuxHeaderSize
Definition: XCOFFYAML.h:28
llvm::XCOFFYAML::CsectAuxEnt::StorageMappingClass
Optional< XCOFF::StorageMappingClass > StorageMappingClass
Definition: XCOFFYAML.h:124
llvm::XCOFF::STYP_DATA
@ STYP_DATA
Definition: XCOFF.h:125
llvm::XCOFFYAML::Section::Address
llvm::yaml::Hex64 Address
Definition: XCOFFYAML.h:73
llvm::XCOFF::STYP_TEXT
@ STYP_TEXT
Definition: XCOFF.h:124
llvm::XCOFF::XMC_RW
@ XMC_RW
Read Write Data.
Definition: XCOFF.h:104
llvm::XCOFF::C_PSYM
@ C_PSYM
Definition: XCOFF.h:177
llvm::yaml::NSectionFlags::NSectionFlags
NSectionFlags(IO &)
Definition: XCOFFYAML.cpp:154
llvm::XCOFFYAML::AuxiliaryHeader::Flag
Optional< llvm::yaml::Hex16 > Flag
Definition: XCOFFYAML.h:61
llvm::XCOFFYAML::FunctionAuxEnt::OffsetToExceptionTbl
Optional< uint32_t > OffsetToExceptionTbl
Definition: XCOFFYAML.h:133
llvm::XCOFFYAML::Section::SectionData
yaml::BinaryRef SectionData
Definition: XCOFFYAML.h:81
llvm::XCOFFYAML::AuxiliaryHeader::DataPageSize
Optional< llvm::yaml::Hex8 > DataPageSize
Definition: XCOFFYAML.h:50
llvm::XCOFFYAML::Section::Relocations
std::vector< Relocation > Relocations
Definition: XCOFFYAML.h:82
llvm::XCOFFYAML::AUX_CSECT
@ AUX_CSECT
Definition: XCOFFYAML.h:90
llvm::XCOFF::CFileStringType
CFileStringType
Definition: XCOFF.h:310
llvm::XCOFF::STYP_TBSS
@ STYP_TBSS
Definition: XCOFF.h:130
llvm::yaml::ScalarEnumerationTraits< XCOFFYAML::AuxSymbolType >::enumeration
static void enumeration(IO &IO, XCOFFYAML::AuxSymbolType &Type)
Definition: XCOFFYAML.cpp:130
llvm::XCOFF::XMC_UL
@ XMC_UL
Uninitialized thread-local variable.
Definition: XCOFF.h:114
llvm::XCOFF::C_EINCL
@ C_EINCL
Definition: XCOFF.h:161
llvm::XCOFF::C_DECL
@ C_DECL
Definition: XCOFF.h:195
llvm::XCOFFYAML::CsectAuxEnt::SymbolAlignmentAndType
Optional< uint8_t > SymbolAlignmentAndType
Definition: XCOFFYAML.h:123
llvm::XCOFFYAML::AuxiliaryHeader::EntryPointAddr
Optional< llvm::yaml::Hex64 > EntryPointAddr
Definition: XCOFFYAML.h:56
llvm::XCOFFYAML::CsectAuxEnt::TypeChkSectNum
Optional< uint16_t > TypeChkSectNum
Definition: XCOFFYAML.h:122
llvm::XCOFFYAML::SectAuxEntForStat
Definition: XCOFFYAML.h:178
llvm::XCOFF::XMC_SV
@ XMC_SV
Supervisor Call (32-bit process only)
Definition: XCOFF.h:97
llvm::XCOFF::C_GTLS
@ C_GTLS
Definition: XCOFF.h:169
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::XCOFFYAML::Symbol
Definition: XCOFFYAML.h:189
llvm::XCOFFYAML::Section::SectionName
StringRef SectionName
Definition: XCOFFYAML.h:72
llvm::XCOFFYAML::AUX_SYM
@ AUX_SYM
Definition: XCOFFYAML.h:88
llvm::XCOFF::XFT_CD
@ XFT_CD
Specifies compiler-defined information.
Definition: XCOFF.h:314
llvm::XCOFFYAML::AuxiliaryHeader::Version
Optional< llvm::yaml::Hex16 > Version
Definition: XCOFFYAML.h:34
llvm::XCOFF::C_ARG
@ C_ARG
Definition: XCOFF.h:204
llvm::XCOFF::XMC_BS
@ XMC_BS
BSS class (uninitialized static internal)
Definition: XCOFF.h:110
llvm::XCOFF::C_AUTO
@ C_AUTO
Definition: XCOFF.h:198