| 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 if (Func->isVerbose(IceV_RegOrigins)) | 547 if (Func->isVerbose(IceV_RegOrigins)) |
| 548 Str << ":"; | 548 Str << ":"; |
| 549 Str << Func->getTarget()->getRegName(RegNum, getType()); | 549 Str << Func->getTarget()->getRegName(RegNum, getType()); |
| 550 } else if (Func->getTarget()->hasComputedFrame()) { | 550 } else if (Func->getTarget()->hasComputedFrame()) { |
| 551 if (Func->isVerbose(IceV_RegOrigins)) | 551 if (Func->isVerbose(IceV_RegOrigins)) |
| 552 Str << ":"; | 552 Str << ":"; |
| 553 const auto BaseRegisterNumber = | 553 const auto BaseRegisterNumber = |
| 554 hasReg() ? getBaseRegNum() : Func->getTarget()->getFrameOrStackReg(); | 554 hasReg() ? getBaseRegNum() : Func->getTarget()->getFrameOrStackReg(); |
| 555 Str << "[" | 555 Str << "[" |
| 556 << Func->getTarget()->getRegName(BaseRegisterNumber, IceType_i32); | 556 << Func->getTarget()->getRegName(BaseRegisterNumber, IceType_i32); |
| 557 int32_t Offset = getStackOffset(); | 557 if (hasStackOffset()) { |
| 558 if (Offset) { | 558 int32_t Offset = getStackOffset(); |
| 559 if (Offset > 0) | 559 if (Offset) { |
| 560 Str << "+"; | 560 if (Offset > 0) |
| 561 Str << Offset; | 561 Str << "+"; |
| 562 Str << Offset; |
| 563 } |
| 562 } | 564 } |
| 563 Str << "]"; | 565 Str << "]"; |
| 564 } | 566 } |
| 565 } | 567 } |
| 566 | 568 |
| 567 template <> void ConstantInteger32::emit(TargetLowering *Target) const { | 569 template <> void ConstantInteger32::emit(TargetLowering *Target) const { |
| 568 Target->emit(this); | 570 Target->emit(this); |
| 569 } | 571 } |
| 570 | 572 |
| 571 template <> void ConstantInteger64::emit(TargetLowering *Target) const { | 573 template <> void ConstantInteger64::emit(TargetLowering *Target) const { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 if (getType() != IceType_i32 && getType() != IceType_i16 && | 649 if (getType() != IceType_i32 && getType() != IceType_i16 && |
| 648 getType() != IceType_i8) | 650 getType() != IceType_i8) |
| 649 return false; | 651 return false; |
| 650 // The Following checks if the signed representation of Value is between | 652 // The Following checks if the signed representation of Value is between |
| 651 // -Threshold/2 and +Threshold/2 | 653 // -Threshold/2 and +Threshold/2 |
| 652 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; | 654 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; |
| 653 return largerThanThreshold; | 655 return largerThanThreshold; |
| 654 } | 656 } |
| 655 | 657 |
| 656 } // end of namespace Ice | 658 } // end of namespace Ice |
| OLD | NEW |