| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// | 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// |
| 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 TargetLoweringX8632 class, which | 10 // This file implements the TargetLoweringX8632 class, which |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 if (!hasFramePointer()) | 506 if (!hasFramePointer()) |
| 507 Offset += getStackAdjustment(); | 507 Offset += getStackAdjustment(); |
| 508 if (Offset) { | 508 if (Offset) { |
| 509 if (Offset > 0) | 509 if (Offset > 0) |
| 510 Str << "+"; | 510 Str << "+"; |
| 511 Str << Offset; | 511 Str << Offset; |
| 512 } | 512 } |
| 513 Str << "]"; | 513 Str << "]"; |
| 514 } | 514 } |
| 515 | 515 |
| 516 x86::Address TargetX8632::stackVarToAsmOperand(const Variable *Var) const { |
| 517 assert(!Var->hasReg()); |
| 518 int32_t Offset = Var->getStackOffset(); |
| 519 if (!hasFramePointer()) |
| 520 Offset += getStackAdjustment(); |
| 521 return x86::Address(x86::Register(getFrameOrStackReg()), Offset); |
| 522 } |
| 523 |
| 516 void TargetX8632::lowerArguments() { | 524 void TargetX8632::lowerArguments() { |
| 517 VarList &Args = Func->getArgs(); | 525 VarList &Args = Func->getArgs(); |
| 518 // The first four arguments of vector type, regardless of their | 526 // The first four arguments of vector type, regardless of their |
| 519 // position relative to the other arguments in the argument list, are | 527 // position relative to the other arguments in the argument list, are |
| 520 // passed in registers xmm0 - xmm3. | 528 // passed in registers xmm0 - xmm3. |
| 521 unsigned NumXmmArgs = 0; | 529 unsigned NumXmmArgs = 0; |
| 522 | 530 |
| 523 Context.init(Func->getEntryNode()); | 531 Context.init(Func->getEntryNode()); |
| 524 Context.setInsertPoint(Context.getCur()); | 532 Context.setInsertPoint(Context.getCur()); |
| 525 | 533 |
| (...skipping 3928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4454 Str << "\t.align\t" << Align << "\n"; | 4462 Str << "\t.align\t" << Align << "\n"; |
| 4455 Str << MangledName << ":\n"; | 4463 Str << MangledName << ":\n"; |
| 4456 for (SizeT i = 0; i < Size; ++i) { | 4464 for (SizeT i = 0; i < Size; ++i) { |
| 4457 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; | 4465 Str << "\t.byte\t" << (((unsigned)Data[i]) & 0xff) << "\n"; |
| 4458 } | 4466 } |
| 4459 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; | 4467 Str << "\t.size\t" << MangledName << ", " << Size << "\n"; |
| 4460 } | 4468 } |
| 4461 } | 4469 } |
| 4462 | 4470 |
| 4463 } // end of namespace Ice | 4471 } // end of namespace Ice |
| OLD | NEW |