Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// | 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 675 // emitTextHeader() is not target-specific (apart from what is abstracted by | 675 // emitTextHeader() is not target-specific (apart from what is abstracted by |
| 676 // the Assembler), so it is defined here rather than in the target lowering | 676 // the Assembler), so it is defined here rather than in the target lowering |
| 677 // class. | 677 // class. |
| 678 void Cfg::emitTextHeader(const IceString &MangledName, GlobalContext *Ctx, | 678 void Cfg::emitTextHeader(const IceString &MangledName, GlobalContext *Ctx, |
| 679 const Assembler *Asm) { | 679 const Assembler *Asm) { |
| 680 if (!BuildDefs::dump()) | 680 if (!BuildDefs::dump()) |
| 681 return; | 681 return; |
| 682 Ostream &Str = Ctx->getStrEmit(); | 682 Ostream &Str = Ctx->getStrEmit(); |
| 683 Str << "\t.text\n"; | 683 Str << "\t.text\n"; |
| 684 if (Ctx->getFlags().getFunctionSections()) | 684 if (Ctx->getFlags().getFunctionSections()) |
| 685 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; | 685 Str << "\t.section\t.text." << MangledName << ",\"ax\",%progbits\n"; |
|
Jim Stichnoth
2015/10/15 23:34:21
Just checking -- is this syntax also valid for x86
John
2015/11/05 20:25:13
well, szbuild_spec2k.py --target=x8632 --filetype=
| |
| 686 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) { | 686 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) { |
| 687 Str << "\t.globl\t" << MangledName << "\n"; | 687 Str << "\t.globl\t" << MangledName << "\n"; |
| 688 Str << "\t.type\t" << MangledName << ",%function\n"; | 688 Str << "\t.type\t" << MangledName << ",%function\n"; |
| 689 } | 689 } |
| 690 Str << "\t" << Asm->getAlignDirective() << " " | 690 Str << "\t" << Asm->getAlignDirective() << " " |
| 691 << Asm->getBundleAlignLog2Bytes() << ",0x"; | 691 << Asm->getBundleAlignLog2Bytes() << ",0x"; |
| 692 for (uint8_t I : Asm->getNonExecBundlePadding()) | 692 for (uint8_t I : Asm->getNonExecBundlePadding()) |
| 693 Str.write_hex(I); | 693 Str.write_hex(I); |
| 694 Str << "\n"; | 694 Str << "\n"; |
| 695 Str << MangledName << ":\n"; | 695 Str << MangledName << ":\n"; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 832 } | 832 } |
| 833 } | 833 } |
| 834 // Print each basic block | 834 // Print each basic block |
| 835 for (CfgNode *Node : Nodes) | 835 for (CfgNode *Node : Nodes) |
| 836 Node->dump(this); | 836 Node->dump(this); |
| 837 if (isVerbose(IceV_Instructions)) | 837 if (isVerbose(IceV_Instructions)) |
| 838 Str << "}\n"; | 838 Str << "}\n"; |
| 839 } | 839 } |
| 840 | 840 |
| 841 } // end of namespace Ice | 841 } // end of namespace Ice |
| OLD | NEW |