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

Side by Side Diff: src/IceOperand.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 | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632.cpp » ('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/IceOperand.cpp - High-level operand implementation -----===// 1 //===- subzero/src/IceOperand.cpp - High-level operand 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 Operand class and its target-independent 10 // This file implements the Operand class and its target-independent
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 int32_t Offset = getStackOffset(); 463 int32_t Offset = getStackOffset();
464 if (Offset) { 464 if (Offset) {
465 if (Offset > 0) 465 if (Offset > 0)
466 Str << "+"; 466 Str << "+";
467 Str << Offset; 467 Str << Offset;
468 } 468 }
469 Str << "]"; 469 Str << "]";
470 } 470 }
471 } 471 }
472 472
473 void ConstantRelocatable::emit(GlobalContext *Ctx) const { 473 void ConstantRelocatable::emitWithoutDollar(GlobalContext *Ctx) const {
474 Ostream &Str = Ctx->getStrEmit(); 474 Ostream &Str = Ctx->getStrEmit();
475 if (SuppressMangling) 475 if (SuppressMangling)
476 Str << Name; 476 Str << Name;
477 else 477 else
478 Str << Ctx->mangleName(Name); 478 Str << Ctx->mangleName(Name);
479 if (Offset) { 479 if (Offset) {
480 if (Offset > 0) 480 if (Offset > 0)
481 Str << "+"; 481 Str << "+";
482 Str << Offset; 482 Str << Offset;
483 } 483 }
484 } 484 }
485 485
486 void ConstantRelocatable::emit(GlobalContext *Ctx) const {
487 Ostream &Str = Ctx->getStrEmit();
488 Str << "$";
489 emitWithoutDollar(Ctx);
490 }
491
486 void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const { 492 void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const {
487 Str << "@"; 493 Str << "@";
488 if (Func && !SuppressMangling) { 494 if (Func && !SuppressMangling) {
489 Str << Func->getContext()->mangleName(Name); 495 Str << Func->getContext()->mangleName(Name);
490 } else { 496 } else {
491 Str << Name; 497 Str << Name;
492 } 498 }
493 if (Offset) 499 if (Offset)
494 Str << "+" << Offset; 500 Str << "+" << Offset;
495 } 501 }
(...skipping 16 matching lines...) Expand all
512 518
513 Ostream &operator<<(Ostream &Str, const RegWeight &W) { 519 Ostream &operator<<(Ostream &Str, const RegWeight &W) {
514 if (W.getWeight() == RegWeight::Inf) 520 if (W.getWeight() == RegWeight::Inf)
515 Str << "Inf"; 521 Str << "Inf";
516 else 522 else
517 Str << W.getWeight(); 523 Str << W.getWeight();
518 return Str; 524 return Str;
519 } 525 }
520 526
521 } // end of namespace Ice 527 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698