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

Unified Diff: src/IceInstX8632.cpp

Issue 1197863003: Subzero: Reduce the amount of #ifdef'd code. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceInstX8632.h ('k') | src/IceOperand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.cpp
diff --git a/src/IceInstX8632.cpp b/src/IceInstX8632.cpp
index 750377ffeaca2436f8aba63650c89b1dfe4cbbb5..60a58c4d08db1f355bfba6eff92ec9447e8cca2f 100644
--- a/src/IceInstX8632.cpp
+++ b/src/IceInstX8632.cpp
@@ -371,7 +371,7 @@ InstX8632Xchg::InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source)
// ======================== Dump routines ======================== //
void InstX8632::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "[X8632] ";
@@ -379,7 +379,7 @@ void InstX8632::dump(const Cfg *Func) const {
}
void InstX8632FakeRMW::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = getData()->getType();
@@ -392,7 +392,7 @@ void InstX8632FakeRMW::dump(const Cfg *Func) const {
}
void InstX8632Label::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Str << getName(Func) << ":";
@@ -404,14 +404,14 @@ void InstX8632Label::emitIAS(const Cfg *Func) const {
}
void InstX8632Label::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << getName(Func) << ":";
}
void InstX8632Br::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Str << "\t";
@@ -470,7 +470,7 @@ void InstX8632Br::emitIAS(const Cfg *Func) const {
}
void InstX8632Br::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "br ";
@@ -493,7 +493,7 @@ void InstX8632Br::dump(const Cfg *Func) const {
}
void InstX8632Jmp::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -538,7 +538,7 @@ void InstX8632Jmp::emitIAS(const Cfg *Func) const {
}
void InstX8632Jmp::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "jmp ";
@@ -546,7 +546,7 @@ void InstX8632Jmp::dump(const Cfg *Func) const {
}
void InstX8632Call::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -589,7 +589,7 @@ void InstX8632Call::emitIAS(const Cfg *Func) const {
}
void InstX8632Call::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
if (getDest()) {
@@ -606,7 +606,7 @@ void InstX8632Call::dump(const Cfg *Func) const {
// template issues.
void InstX8632::emitTwoAddress(const char *Opcode, const Inst *Inst,
const Cfg *Func, bool ShiftHack) {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(Inst->getSrcSize() == 2);
@@ -1154,7 +1154,7 @@ const X8632::AssemblerX8632::XmmEmitterShiftOp InstX8632Psrl::Emitter = {
&X8632::AssemblerX8632::psrl};
template <> void InstX8632Sqrtss::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -1167,7 +1167,7 @@ template <> void InstX8632Sqrtss::emit(const Cfg *Func) const {
}
template <> void InstX8632Addss::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "add%s",
@@ -1176,7 +1176,7 @@ template <> void InstX8632Addss::emit(const Cfg *Func) const {
}
template <> void InstX8632Padd::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "padd%s",
@@ -1185,7 +1185,7 @@ template <> void InstX8632Padd::emit(const Cfg *Func) const {
}
template <> void InstX8632Pmull::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
bool TypesAreValid = getDest()->getType() == IceType_v4i32 ||
@@ -1220,7 +1220,7 @@ template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Subss::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "sub%s",
@@ -1229,7 +1229,7 @@ template <> void InstX8632Subss::emit(const Cfg *Func) const {
}
template <> void InstX8632Psub::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "psub%s",
@@ -1238,7 +1238,7 @@ template <> void InstX8632Psub::emit(const Cfg *Func) const {
}
template <> void InstX8632Mulss::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "mul%s",
@@ -1247,7 +1247,7 @@ template <> void InstX8632Mulss::emit(const Cfg *Func) const {
}
template <> void InstX8632Pmuludq::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
assert(getSrc(0)->getType() == IceType_v4i32 &&
getSrc(1)->getType() == IceType_v4i32);
@@ -1255,7 +1255,7 @@ template <> void InstX8632Pmuludq::emit(const Cfg *Func) const {
}
template <> void InstX8632Divss::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "div%s",
@@ -1264,7 +1264,7 @@ template <> void InstX8632Divss::emit(const Cfg *Func) const {
}
template <> void InstX8632Div::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3);
@@ -1283,7 +1283,7 @@ template <> void InstX8632Div::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Idiv::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3);
@@ -1306,7 +1306,7 @@ namespace {
// pblendvb and blendvps take xmm0 as a final implicit argument.
void emitVariableBlendInst(const char *Opcode, const Inst *Inst,
const Cfg *Func) {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(Inst->getSrcSize() == 3);
@@ -1332,7 +1332,7 @@ void emitIASVariableBlendInst(
} // end anonymous namespace
template <> void InstX8632Blendvps::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
assert(static_cast<TargetX8632 *>(Func->getTarget())->getInstructionSet() >=
TargetX8632::SSE4_1);
@@ -1348,7 +1348,7 @@ template <> void InstX8632Blendvps::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Pblendvb::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
assert(static_cast<TargetX8632 *>(Func->getTarget())->getInstructionSet() >=
TargetX8632::SSE4_1);
@@ -1364,7 +1364,7 @@ template <> void InstX8632Pblendvb::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Imul::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -1428,7 +1428,7 @@ template <> void InstX8632Insertps::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Cbwdq::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -1480,7 +1480,7 @@ template <> void InstX8632Cbwdq::emitIAS(const Cfg *Func) const {
}
void InstX8632Mul::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -1504,7 +1504,7 @@ void InstX8632Mul::emitIAS(const Cfg *Func) const {
}
void InstX8632Mul::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
@@ -1513,7 +1513,7 @@ void InstX8632Mul::dump(const Cfg *Func) const {
}
void InstX8632Shld::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Variable *Dest = getDest();
@@ -1545,7 +1545,7 @@ void InstX8632Shld::emitIAS(const Cfg *Func) const {
}
void InstX8632Shld::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
@@ -1554,7 +1554,7 @@ void InstX8632Shld::dump(const Cfg *Func) const {
}
void InstX8632Shrd::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Variable *Dest = getDest();
@@ -1586,7 +1586,7 @@ void InstX8632Shrd::emitIAS(const Cfg *Func) const {
}
void InstX8632Shrd::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
@@ -1595,7 +1595,7 @@ void InstX8632Shrd::dump(const Cfg *Func) const {
}
void InstX8632Cmov::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Variable *Dest = getDest();
@@ -1638,7 +1638,7 @@ void InstX8632Cmov::emitIAS(const Cfg *Func) const {
}
void InstX8632Cmov::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "cmov" << InstX8632BrAttributes[Condition].DisplayString << ".";
@@ -1649,7 +1649,7 @@ void InstX8632Cmov::dump(const Cfg *Func) const {
}
void InstX8632Cmpps::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -1682,7 +1682,7 @@ void InstX8632Cmpps::emitIAS(const Cfg *Func) const {
}
void InstX8632Cmpps::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
assert(Condition < CondX86::Cmpps_Invalid);
@@ -1693,7 +1693,7 @@ void InstX8632Cmpps::dump(const Cfg *Func) const {
}
void InstX8632Cmpxchg::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3);
@@ -1721,7 +1721,7 @@ void InstX8632Cmpxchg::emitIAS(const Cfg *Func) const {
}
void InstX8632Cmpxchg::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
if (Locked) {
@@ -1732,7 +1732,7 @@ void InstX8632Cmpxchg::dump(const Cfg *Func) const {
}
void InstX8632Cmpxchg8b::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 5);
@@ -1753,7 +1753,7 @@ void InstX8632Cmpxchg8b::emitIAS(const Cfg *Func) const {
}
void InstX8632Cmpxchg8b::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
if (Locked) {
@@ -1764,7 +1764,7 @@ void InstX8632Cmpxchg8b::dump(const Cfg *Func) const {
}
void InstX8632Cvt::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -1839,7 +1839,7 @@ void InstX8632Cvt::emitIAS(const Cfg *Func) const {
}
void InstX8632Cvt::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
@@ -1852,7 +1852,7 @@ void InstX8632Cvt::dump(const Cfg *Func) const {
}
void InstX8632Icmp::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -1882,7 +1882,7 @@ void InstX8632Icmp::emitIAS(const Cfg *Func) const {
}
void InstX8632Icmp::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "cmp." << getSrc(0)->getType() << " ";
@@ -1890,7 +1890,7 @@ void InstX8632Icmp::dump(const Cfg *Func) const {
}
void InstX8632Ucomiss::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -1914,7 +1914,7 @@ void InstX8632Ucomiss::emitIAS(const Cfg *Func) const {
}
void InstX8632Ucomiss::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "ucomiss." << getSrc(0)->getType() << " ";
@@ -1922,7 +1922,7 @@ void InstX8632Ucomiss::dump(const Cfg *Func) const {
}
void InstX8632UD2::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 0);
@@ -1935,14 +1935,14 @@ void InstX8632UD2::emitIAS(const Cfg *Func) const {
}
void InstX8632UD2::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "ud2\n";
}
void InstX8632Test::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -1973,7 +1973,7 @@ void InstX8632Test::emitIAS(const Cfg *Func) const {
}
void InstX8632Test::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "test." << getSrc(0)->getType() << " ";
@@ -1981,7 +1981,7 @@ void InstX8632Test::dump(const Cfg *Func) const {
}
void InstX8632Mfence::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 0);
@@ -1994,14 +1994,14 @@ void InstX8632Mfence::emitIAS(const Cfg *Func) const {
}
void InstX8632Mfence::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "mfence\n";
}
void InstX8632Store::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -2044,7 +2044,7 @@ void InstX8632Store::emitIAS(const Cfg *Func) const {
}
void InstX8632Store::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "mov." << getSrc(0)->getType() << " ";
@@ -2054,7 +2054,7 @@ void InstX8632Store::dump(const Cfg *Func) const {
}
void InstX8632StoreP::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -2076,7 +2076,7 @@ void InstX8632StoreP::emitIAS(const Cfg *Func) const {
}
void InstX8632StoreP::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "storep." << getSrc(0)->getType() << " ";
@@ -2086,7 +2086,7 @@ void InstX8632StoreP::dump(const Cfg *Func) const {
}
void InstX8632StoreQ::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -2110,7 +2110,7 @@ void InstX8632StoreQ::emitIAS(const Cfg *Func) const {
}
void InstX8632StoreQ::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "storeq." << getSrc(0)->getType() << " ";
@@ -2120,7 +2120,7 @@ void InstX8632StoreQ::dump(const Cfg *Func) const {
}
template <> void InstX8632Lea::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -2140,7 +2140,7 @@ template <> void InstX8632Lea::emit(const Cfg *Func) const {
}
template <> void InstX8632Mov::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -2270,7 +2270,7 @@ template <> void InstX8632Movd::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Movp::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
// TODO(wala,stichnot): movups works with all vector operands, but
// there exist other instructions (movaps, movdqa, movdqu) that may
@@ -2296,7 +2296,7 @@ template <> void InstX8632Movp::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Movq::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -2357,7 +2357,7 @@ template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const {
}
void InstX8632Nop::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
// TODO: Emit the right code for each variant.
@@ -2371,14 +2371,14 @@ void InstX8632Nop::emitIAS(const Cfg *Func) const {
}
void InstX8632Nop::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "nop (variant = " << Variant << ")";
}
void InstX8632Fld::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -2433,7 +2433,7 @@ void InstX8632Fld::emitIAS(const Cfg *Func) const {
}
void InstX8632Fld::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "fld." << getSrc(0)->getType() << " ";
@@ -2441,7 +2441,7 @@ void InstX8632Fld::dump(const Cfg *Func) const {
}
void InstX8632Fstp::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 0);
@@ -2506,7 +2506,7 @@ void InstX8632Fstp::emitIAS(const Cfg *Func) const {
}
void InstX8632Fstp::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
@@ -2515,7 +2515,7 @@ void InstX8632Fstp::dump(const Cfg *Func) const {
}
template <> void InstX8632Pcmpeq::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "pcmpeq%s",
@@ -2524,7 +2524,7 @@ template <> void InstX8632Pcmpeq::emit(const Cfg *Func) const {
}
template <> void InstX8632Pcmpgt::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "pcmpgt%s",
@@ -2533,7 +2533,7 @@ template <> void InstX8632Pcmpgt::emit(const Cfg *Func) const {
}
template <> void InstX8632Pextr::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 2);
@@ -2579,7 +2579,7 @@ template <> void InstX8632Pextr::emitIAS(const Cfg *Func) const {
}
template <> void InstX8632Pinsr::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 3);
@@ -2654,7 +2654,7 @@ template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const {
}
void InstX8632Pop::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 0);
@@ -2674,7 +2674,7 @@ void InstX8632Pop::emitIAS(const Cfg *Func) const {
}
void InstX8632Pop::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func);
@@ -2682,7 +2682,7 @@ void InstX8632Pop::dump(const Cfg *Func) const {
}
void InstX8632AdjustStack::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Str << "\tsubl\t$" << Amount << ", %esp";
@@ -2696,14 +2696,14 @@ void InstX8632AdjustStack::emitIAS(const Cfg *Func) const {
}
void InstX8632AdjustStack::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "esp = sub.i32 esp, " << Amount;
}
void InstX8632Push::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(getSrcSize() == 1);
@@ -2724,7 +2724,7 @@ void InstX8632Push::emitIAS(const Cfg *Func) const {
}
void InstX8632Push::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "push." << getSrc(0)->getType() << " ";
@@ -2732,7 +2732,7 @@ void InstX8632Push::dump(const Cfg *Func) const {
}
template <> void InstX8632Psll::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
assert(getDest()->getType() == IceType_v8i16 ||
getDest()->getType() == IceType_v8i1 ||
@@ -2745,7 +2745,7 @@ template <> void InstX8632Psll::emit(const Cfg *Func) const {
}
template <> void InstX8632Psra::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
assert(getDest()->getType() == IceType_v8i16 ||
getDest()->getType() == IceType_v8i1 ||
@@ -2758,7 +2758,7 @@ template <> void InstX8632Psra::emit(const Cfg *Func) const {
}
template <> void InstX8632Psrl::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
char buf[30];
snprintf(buf, llvm::array_lengthof(buf), "psrl%s",
@@ -2767,7 +2767,7 @@ template <> void InstX8632Psrl::emit(const Cfg *Func) const {
}
void InstX8632Ret::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Str << "\tret";
@@ -2779,7 +2779,7 @@ void InstX8632Ret::emitIAS(const Cfg *Func) const {
}
void InstX8632Ret::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = (getSrcSize() == 0 ? IceType_void : getSrc(0)->getType());
@@ -2788,7 +2788,7 @@ void InstX8632Ret::dump(const Cfg *Func) const {
}
void InstX8632Setcc::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Str << "\tset" << InstX8632BrAttributes[Condition].DisplayString << "\t";
@@ -2809,7 +2809,7 @@ void InstX8632Setcc::emitIAS(const Cfg *Func) const {
}
void InstX8632Setcc::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Str << "setcc." << InstX8632BrAttributes[Condition].DisplayString << " ";
@@ -2817,7 +2817,7 @@ void InstX8632Setcc::dump(const Cfg *Func) const {
}
void InstX8632Xadd::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
if (Locked) {
@@ -2844,7 +2844,7 @@ void InstX8632Xadd::emitIAS(const Cfg *Func) const {
}
void InstX8632Xadd::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
if (Locked) {
@@ -2856,7 +2856,7 @@ void InstX8632Xadd::dump(const Cfg *Func) const {
}
void InstX8632Xchg::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
Str << "\txchg" << getWidthString(getSrc(0)->getType()) << "\t";
@@ -2880,7 +2880,7 @@ void InstX8632Xchg::emitIAS(const Cfg *Func) const {
}
void InstX8632Xchg::dump(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrDump();
Type Ty = getSrc(0)->getType();
@@ -2889,7 +2889,7 @@ void InstX8632Xchg::dump(const Cfg *Func) const {
}
void OperandX8632Mem::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
if (SegmentReg != DefaultSegment) {
@@ -2925,7 +2925,7 @@ void OperandX8632Mem::emit(const Cfg *Func) const {
}
void OperandX8632Mem::dump(const Cfg *Func, Ostream &Str) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
if (SegmentReg != DefaultSegment) {
assert(SegmentReg >= 0 && SegmentReg < SegReg_NUM);
@@ -3026,7 +3026,7 @@ X8632::Address VariableSplit::toAsmAddress(const Cfg *Func) const {
}
void VariableSplit::emit(const Cfg *Func) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
Ostream &Str = Func->getContext()->getStrEmit();
assert(!Var->hasReg());
@@ -3041,7 +3041,7 @@ void VariableSplit::emit(const Cfg *Func) const {
}
void VariableSplit::dump(const Cfg *Func, Ostream &Str) const {
- if (!ALLOW_DUMP)
+ if (!BuildDefs::dump())
return;
switch (Part) {
case Low:
« no previous file with comments | « src/IceInstX8632.h ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698