diff options
-rw-r--r-- | lib/Target/JSBackend/JSBackend.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp index 7222c28992..1620d3e10e 100644 --- a/lib/Target/JSBackend/JSBackend.cpp +++ b/lib/Target/JSBackend/JSBackend.cpp @@ -1492,12 +1492,12 @@ void JSWriter::generateInstruction(const Instruction *I, raw_string_ostream& Cod // Most bitcasts are no-ops for us. However, the exception is int to float and float to int switch (rmwi->getOperation()) { case AtomicRMWInst::Xchg: Code << getStore(I, P, I->getType(), VS, 0); break; - case AtomicRMWInst::Add: Code << getStore(I, P, I->getType(), "((" + VS + '+' + iName + ")|0)", 0); break; - case AtomicRMWInst::Sub: Code << getStore(I, P, I->getType(), "((" + VS + '-' + iName + ")|0)", 0); break; - case AtomicRMWInst::And: Code << getStore(I, P, I->getType(), "(" + VS + '&' + iName + ")", 0); break; - case AtomicRMWInst::Nand: Code << getStore(I, P, I->getType(), "(~(" + VS + '&' + iName + "))", 0); break; - case AtomicRMWInst::Or: Code << getStore(I, P, I->getType(), "(" + VS + '|' + iName + ")", 0); break; - case AtomicRMWInst::Xor: Code << getStore(I, P, I->getType(), "(" + VS + '^' + iName + ")", 0); break; + case AtomicRMWInst::Add: Code << getStore(I, P, I->getType(), "((" + iName + '+' + VS + ")|0)", 0); break; + case AtomicRMWInst::Sub: Code << getStore(I, P, I->getType(), "((" + iName + '-' + VS + ")|0)", 0); break; + case AtomicRMWInst::And: Code << getStore(I, P, I->getType(), "(" + iName + '&' + VS + ")", 0); break; + case AtomicRMWInst::Nand: Code << getStore(I, P, I->getType(), "(~(" + iName + '&' + VS + "))", 0); break; + case AtomicRMWInst::Or: Code << getStore(I, P, I->getType(), "(" + iName + '|' + VS + ")", 0); break; + case AtomicRMWInst::Xor: Code << getStore(I, P, I->getType(), "(" + iName + '^' + VS + ")", 0); break; case AtomicRMWInst::Max: case AtomicRMWInst::Min: case AtomicRMWInst::UMax: |