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 397 matching lines...) Loading... |
408 if (Func->isVerbose(IceV_RegOrigins) || | 408 if (Func->isVerbose(IceV_RegOrigins) || |
409 (!hasReg() && !Func->getTarget()->hasComputedFrame())) | 409 (!hasReg() && !Func->getTarget()->hasComputedFrame())) |
410 Str << "%" << getName(Func); | 410 Str << "%" << getName(Func); |
411 if (hasReg()) { | 411 if (hasReg()) { |
412 if (Func->isVerbose(IceV_RegOrigins)) | 412 if (Func->isVerbose(IceV_RegOrigins)) |
413 Str << ":"; | 413 Str << ":"; |
414 Str << Func->getTarget()->getRegName(RegNum, getType()); | 414 Str << Func->getTarget()->getRegName(RegNum, getType()); |
415 } else if (Func->getTarget()->hasComputedFrame()) { | 415 } else if (Func->getTarget()->hasComputedFrame()) { |
416 if (Func->isVerbose(IceV_RegOrigins)) | 416 if (Func->isVerbose(IceV_RegOrigins)) |
417 Str << ":"; | 417 Str << ":"; |
| 418 int32_t BaseRegisterNumber = getBaseRegNum(); |
| 419 if (BaseRegisterNumber == NoRegister) |
| 420 BaseRegisterNumber = Func->getTarget()->getFrameOrStackReg(); |
418 Str << "[" | 421 Str << "[" |
419 << Func->getTarget()->getRegName( | 422 << Func->getTarget()->getRegName(BaseRegisterNumber, IceType_i32); |
420 Func->getTarget()->getFrameOrStackReg(), IceType_i32); | |
421 int32_t Offset = getStackOffset(); | 423 int32_t Offset = getStackOffset(); |
422 if (Offset) { | 424 if (Offset) { |
423 if (Offset > 0) | 425 if (Offset > 0) |
424 Str << "+"; | 426 Str << "+"; |
425 Str << Offset; | 427 Str << Offset; |
426 } | 428 } |
427 Str << "]"; | 429 Str << "]"; |
428 } | 430 } |
429 } | 431 } |
430 | 432 |
(...skipping 78 matching lines...) Loading... |
509 if (getType() != IceType_i32 && getType() != IceType_i16 && | 511 if (getType() != IceType_i32 && getType() != IceType_i16 && |
510 getType() != IceType_i8) | 512 getType() != IceType_i8) |
511 return false; | 513 return false; |
512 // The Following checks if the signed representation of Value is between | 514 // The Following checks if the signed representation of Value is between |
513 // -Threshold/2 and +Threshold/2 | 515 // -Threshold/2 and +Threshold/2 |
514 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; | 516 bool largerThanThreshold = Threshold / 2 + Value >= Threshold; |
515 return largerThanThreshold; | 517 return largerThanThreshold; |
516 } | 518 } |
517 | 519 |
518 } // end of namespace Ice | 520 } // end of namespace Ice |
OLD | NEW |