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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 331743002: Ignore stack adjustment for ebp-based variables (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | tests_lit/llvm2ice_tests/ebp_args.ll » ('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/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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 void TargetX8632::emitVariable(const Variable *Var, const Cfg *Func) const { 383 void TargetX8632::emitVariable(const Variable *Var, const Cfg *Func) const {
384 Ostream &Str = Ctx->getStrEmit(); 384 Ostream &Str = Ctx->getStrEmit();
385 assert(Var->getLocalUseNode() == NULL || 385 assert(Var->getLocalUseNode() == NULL ||
386 Var->getLocalUseNode() == Func->getCurrentNode()); 386 Var->getLocalUseNode() == Func->getCurrentNode());
387 if (Var->hasReg()) { 387 if (Var->hasReg()) {
388 Str << getRegName(Var->getRegNum(), Var->getType()); 388 Str << getRegName(Var->getRegNum(), Var->getType());
389 return; 389 return;
390 } 390 }
391 Str << InstX8632::getWidthString(Var->getType()); 391 Str << InstX8632::getWidthString(Var->getType());
392 Str << " [" << getRegName(getFrameOrStackReg(), IceType_i32); 392 Str << " [" << getRegName(getFrameOrStackReg(), IceType_i32);
393 int32_t Offset = Var->getStackOffset() + getStackAdjustment(); 393 int32_t Offset = Var->getStackOffset();
394 if (!hasFramePointer())
395 Offset += getStackAdjustment();
394 if (Offset) { 396 if (Offset) {
395 if (Offset > 0) 397 if (Offset > 0)
396 Str << "+"; 398 Str << "+";
397 Str << Offset; 399 Str << Offset;
398 } 400 }
399 Str << "]"; 401 Str << "]";
400 } 402 }
401 403
402 // Helper function for addProlog(). Sets the frame offset for Arg, 404 // Helper function for addProlog(). Sets the frame offset for Arg,
403 // updates InArgsSizeBytes according to Arg's width, and generates an 405 // updates InArgsSizeBytes according to Arg's width, and generates an
(...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 // llvm-mc doesn't parse "dword ptr [.L$foo]". 2261 // llvm-mc doesn't parse "dword ptr [.L$foo]".
2260 Str << "dword ptr [L$" << IceType_f32 << "$" << getPoolEntryID() << "]"; 2262 Str << "dword ptr [L$" << IceType_f32 << "$" << getPoolEntryID() << "]";
2261 } 2263 }
2262 2264
2263 template <> void ConstantDouble::emit(GlobalContext *Ctx) const { 2265 template <> void ConstantDouble::emit(GlobalContext *Ctx) const {
2264 Ostream &Str = Ctx->getStrEmit(); 2266 Ostream &Str = Ctx->getStrEmit();
2265 Str << "qword ptr [L$" << IceType_f64 << "$" << getPoolEntryID() << "]"; 2267 Str << "qword ptr [L$" << IceType_f64 << "$" << getPoolEntryID() << "]";
2266 } 2268 }
2267 2269
2268 } // end of namespace Ice 2270 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/ebp_args.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698