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

Side by Side Diff: src/IceOperand.cpp

Issue 1241763002: ARM: Add a postRA pass to legalize stack offsets. Greedy approach (reserve IP). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: review Created 5 years, 4 months 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/IceTargetLowering.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/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...) Expand 10 before | Expand all | Expand 10 after
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...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698