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

Side by Side Diff: src/IceInst.cpp

Issue 1506653002: Subzero: Add Non-SFI support for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 11 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/IceInst.h ('k') | src/IceInstX8632.cpp » ('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/IceInst.cpp - High-level instruction implementation ----===// 1 //===- subzero/src/IceInst.cpp - High-level instruction 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 InstBundleUnlock::InstBundleUnlock(Cfg *Func) 486 InstBundleUnlock::InstBundleUnlock(Cfg *Func)
487 : InstHighLevel(Func, Inst::BundleUnlock, 0, nullptr) {} 487 : InstHighLevel(Func, Inst::BundleUnlock, 0, nullptr) {}
488 488
489 InstFakeDef::InstFakeDef(Cfg *Func, Variable *Dest, Variable *Src) 489 InstFakeDef::InstFakeDef(Cfg *Func, Variable *Dest, Variable *Src)
490 : InstHighLevel(Func, Inst::FakeDef, Src ? 1 : 0, Dest) { 490 : InstHighLevel(Func, Inst::FakeDef, Src ? 1 : 0, Dest) {
491 assert(Dest); 491 assert(Dest);
492 if (Src) 492 if (Src)
493 addSource(Src); 493 addSource(Src);
494 } 494 }
495 495
496 InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src) 496 InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src, uint32_t Weight)
497 : InstHighLevel(Func, Inst::FakeUse, 1, nullptr) { 497 : InstHighLevel(Func, Inst::FakeUse, Weight, nullptr) {
498 assert(Src); 498 assert(Src);
499 addSource(Src); 499 for (uint32_t i = 0; i < Weight; ++i)
500 addSource(Src);
500 } 501 }
501 502
502 InstFakeKill::InstFakeKill(Cfg *Func, const Inst *Linked) 503 InstFakeKill::InstFakeKill(Cfg *Func, const Inst *Linked)
503 : InstHighLevel(Func, Inst::FakeKill, 0, nullptr), Linked(Linked) {} 504 : InstHighLevel(Func, Inst::FakeKill, 0, nullptr), Linked(Linked) {}
504 505
505 InstJumpTable::InstJumpTable(Cfg *Func, SizeT NumTargets, CfgNode *Default) 506 InstJumpTable::InstJumpTable(Cfg *Func, SizeT NumTargets, CfgNode *Default)
506 : InstHighLevel(Func, Inst::JumpTable, 1, nullptr), 507 : InstHighLevel(Func, Inst::JumpTable, 1, nullptr),
507 Id(Func->getTarget()->makeNextJumpTableNumber()), NumTargets(NumTargets) { 508 Id(Func->getTarget()->makeNextJumpTableNumber()), NumTargets(NumTargets) {
508 Targets = Func->allocateArrayOf<CfgNode *>(NumTargets); 509 Targets = Func->allocateArrayOf<CfgNode *>(NumTargets);
509 for (SizeT I = 0; I < NumTargets; ++I) 510 for (SizeT I = 0; I < NumTargets; ++I)
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 // upper 32 bits of rax. We need to recognize and preserve these. 960 // upper 32 bits of rax. We need to recognize and preserve these.
960 return true; 961 return true;
961 } 962 }
962 if (!Dest->hasReg() && !SrcVar->hasReg() && 963 if (!Dest->hasReg() && !SrcVar->hasReg() &&
963 Dest->getStackOffset() == SrcVar->getStackOffset()) 964 Dest->getStackOffset() == SrcVar->getStackOffset())
964 return true; 965 return true;
965 return false; 966 return false;
966 } 967 }
967 968
968 } // end of namespace Ice 969 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698