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

Unified Diff: src/IceInstX8632.cpp

Issue 973823003: Subzero: Run sandboxed cross tests, and do some cleanup. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 10 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
Index: src/IceInstX8632.cpp
diff --git a/src/IceInstX8632.cpp b/src/IceInstX8632.cpp
index 622c9edf1de27856429836c36356311f47f44b6c..776a8708b8a31ccf89ec250629bac6fd42f30f44 100644
--- a/src/IceInstX8632.cpp
+++ b/src/IceInstX8632.cpp
@@ -34,7 +34,7 @@ const struct InstX8632BrAttributes_ {
#define X(tag, encode, opp, dump, emit) \
{ CondX86::opp, dump, emit } \
,
- ICEINSTX8632BR_TABLE
+ ICEINSTX8632BR_TABLE
#undef X
};
@@ -44,7 +44,7 @@ const struct InstX8632CmppsAttributes_ {
#define X(tag, emit) \
{ emit } \
,
- ICEINSTX8632CMPPS_TABLE
+ ICEINSTX8632CMPPS_TABLE
#undef X
};
@@ -58,7 +58,7 @@ const struct TypeX8632Attributes_ {
#define X(tag, elementty, cvt, sdss, pack, width, fld) \
{ cvt, sdss, pack, width, fld } \
,
- ICETYPEX8632_TABLE
+ ICETYPEX8632_TABLE
#undef X
};
@@ -1256,9 +1256,9 @@ void emitVariableBlendInst(const char *Opcode, const Inst *Inst,
Inst->getDest()->emit(Func);
}
-void
-emitIASVariableBlendInst(const Inst *Inst, const Cfg *Func,
- const x86::AssemblerX86::XmmEmitterRegOp &Emitter) {
+void emitIASVariableBlendInst(
+ const Inst *Inst, const Cfg *Func,
+ const x86::AssemblerX86::XmmEmitterRegOp &Emitter) {
assert(Inst->getSrcSize() == 3);
assert(llvm::cast<Variable>(Inst->getSrc(2))->getRegNum() ==
RegX8632::Reg_xmm0);
@@ -1640,11 +1640,7 @@ void InstX8632Cmpxchg::emitIAS(const Cfg *Func) const {
assert(VarReg->hasReg());
const RegX8632::GPRRegister Reg =
RegX8632::getEncodedGPR(VarReg->getRegNum());
- if (Locked) {
- Asm->LockCmpxchg(Ty, Addr, Reg);
- } else {
- Asm->cmpxchg(Ty, Addr, Reg);
- }
+ Asm->cmpxchg(Ty, Addr, Reg, Locked);
}
void InstX8632Cmpxchg::dump(const Cfg *Func) const {
@@ -1676,10 +1672,7 @@ void InstX8632Cmpxchg8b::emitIAS(const Cfg *Func) const {
const auto Mem = llvm::cast<OperandX8632Mem>(getSrc(0));
assert(Mem->getSegmentRegister() == OperandX8632Mem::DefaultSegment);
const x86::Address Addr = Mem->toAsmAddress(Asm);
- if (Locked) {
- Asm->lock();
- }
- Asm->cmpxchg8b(Addr);
+ Asm->cmpxchg8b(Addr, Locked);
}
void InstX8632Cmpxchg8b::dump(const Cfg *Func) const {
@@ -2731,10 +2724,7 @@ void InstX8632Xadd::emitIAS(const Cfg *Func) const {
assert(VarReg->hasReg());
const RegX8632::GPRRegister Reg =
RegX8632::getEncodedGPR(VarReg->getRegNum());
- if (Locked) {
- Asm->lock();
- }
- Asm->xadd(Ty, Addr, Reg);
+ Asm->xadd(Ty, Addr, Reg, Locked);
}
void InstX8632Xadd::dump(const Cfg *Func) const {
« src/IceELFObjectWriter.cpp ('K') | « src/IceInst.cpp ('k') | src/IceIntrinsics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698