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

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: Fix TODO. Fix accidentally reverted required change. 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
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceIntrinsics.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 622c9edf1de27856429836c36356311f47f44b6c..53a431ed88cbe71d290a2565db5fcdc3bb960c9f 100644
--- a/src/IceInstX8632.cpp
+++ b/src/IceInstX8632.cpp
@@ -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 {
« no previous file with comments | « src/IceELFObjectWriter.cpp ('k') | src/IceIntrinsics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698