| OLD | NEW |
| 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 /// \file | 10 /// \file |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 | 547 |
| 548 void ConstantRelocatable::emit(TargetLowering *Target) const { | 548 void ConstantRelocatable::emit(TargetLowering *Target) const { |
| 549 Target->emit(this); | 549 Target->emit(this); |
| 550 } | 550 } |
| 551 | 551 |
| 552 void ConstantRelocatable::emitWithoutPrefix(const TargetLowering *Target, | 552 void ConstantRelocatable::emitWithoutPrefix(const TargetLowering *Target, |
| 553 const char *Suffix) const { | 553 const char *Suffix) const { |
| 554 Target->emitWithoutPrefix(this, Suffix); | 554 Target->emitWithoutPrefix(this, Suffix); |
| 555 } | 555 } |
| 556 | 556 |
| 557 void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const { | 557 void ConstantRelocatable::dump(const Cfg *, Ostream &Str) const { |
| 558 if (!BuildDefs::dump()) | 558 if (!BuildDefs::dump()) |
| 559 return; | 559 return; |
| 560 if (!EmitString.empty()) { | 560 if (!EmitString.empty()) { |
| 561 Str << EmitString; | 561 Str << EmitString; |
| 562 return; | 562 return; |
| 563 } | 563 } |
| 564 Str << "@"; | 564 Str << "@" << Name; |
| 565 if (Func && !SuppressMangling) { | |
| 566 Str << Func->getContext()->mangleName(Name); | |
| 567 } else { | |
| 568 Str << Name; | |
| 569 } | |
| 570 const RelocOffsetT Offset = getOffset(); | 565 const RelocOffsetT Offset = getOffset(); |
| 571 if (Offset) { | 566 if (Offset) { |
| 572 if (Offset >= 0) { | 567 if (Offset >= 0) { |
| 573 Str << "+"; | 568 Str << "+"; |
| 574 } | 569 } |
| 575 Str << Offset; | 570 Str << Offset; |
| 576 } | 571 } |
| 577 } | 572 } |
| 578 | 573 |
| 579 void ConstantUndef::emit(TargetLowering *Target) const { Target->emit(this); } | 574 void ConstantUndef::emit(TargetLowering *Target) const { Target->emit(this); } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 if (getType() != IceType_i32 && getType() != IceType_i16 && | 613 if (getType() != IceType_i32 && getType() != IceType_i16 && |
| 619 getType() != IceType_i8) | 614 getType() != IceType_i8) |
| 620 return false; | 615 return false; |
| 621 // The Following checks if the signed representation of Value is between | 616 // The Following checks if the signed representation of Value is between |
| 622 // -Threshold/2 and +Threshold/2 | 617 // -Threshold/2 and +Threshold/2 |
| 623 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; | 618 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; |
| 624 return largerThanThreshold; | 619 return largerThanThreshold; |
| 625 } | 620 } |
| 626 | 621 |
| 627 } // end of namespace Ice | 622 } // end of namespace Ice |
| OLD | NEW |