Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Side by Side Diff: src/IceCfg.cpp

Issue 695993004: Subzero: Switch to AT&T asm syntax. I give up. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add opcode suffix to xchg. Use .L$ prefix for constant pool entries. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pydir/szbuild.py ('k') | src/IceInstX8632.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // This file implements the Cfg class, including constant pool 10 // This file implements the Cfg class, including constant pool
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 void Cfg::emit() { 398 void Cfg::emit() {
399 TimerMarker T(TimerStack::TT_emit, this); 399 TimerMarker T(TimerStack::TT_emit, this);
400 Ostream &Str = Ctx->getStrEmit(); 400 Ostream &Str = Ctx->getStrEmit();
401 if (!Ctx->testAndSetHasEmittedFirstMethod()) { 401 if (!Ctx->testAndSetHasEmittedFirstMethod()) {
402 // Print a helpful command for assembling the output. 402 // Print a helpful command for assembling the output.
403 // TODO: have the Target emit the header 403 // TODO: have the Target emit the header
404 // TODO: need a per-file emit in addition to per-CFG 404 // TODO: need a per-file emit in addition to per-CFG
405 Str << "# $LLVM_BIN_PATH/llvm-mc" 405 Str << "# $LLVM_BIN_PATH/llvm-mc"
406 << " -arch=x86" 406 << " -arch=x86"
407 << " -x86-asm-syntax=intel"
408 << " -filetype=obj" 407 << " -filetype=obj"
409 << " -o=MyObj.o" 408 << " -o=MyObj.o"
410 << "\n\n"; 409 << "\n\n";
411 } 410 }
412 Str << "\t.text\n"; 411 Str << "\t.text\n";
413 IceString MangledName = getContext()->mangleName(getFunctionName()); 412 IceString MangledName = getContext()->mangleName(getFunctionName());
414 if (Ctx->getFlags().FunctionSections) 413 if (Ctx->getFlags().FunctionSections)
415 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; 414 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n";
416 if (!getInternal() || Ctx->getFlags().DisableInternal) { 415 if (!getInternal() || Ctx->getFlags().DisableInternal) {
417 Str << "\t.globl\t" << MangledName << "\n"; 416 Str << "\t.globl\t" << MangledName << "\n";
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 462 }
464 } 463 }
465 // Print each basic block 464 // Print each basic block
466 for (CfgNode *Node : Nodes) 465 for (CfgNode *Node : Nodes)
467 Node->dump(this); 466 Node->dump(this);
468 if (getContext()->isVerbose(IceV_Instructions)) 467 if (getContext()->isVerbose(IceV_Instructions))
469 Str << "}\n"; 468 Str << "}\n";
470 } 469 }
471 470
472 } // end of namespace Ice 471 } // end of namespace Ice
OLDNEW
« no previous file with comments | « pydir/szbuild.py ('k') | src/IceInstX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698