use of com.dat3m.dartagnan.program.event.lang.linux.cond.RMWReadCondUnless in project Dat3M by hernanponcedeleon.
the class VisitorNone method visitRMWAddUnless.
@Override
public List<Event> visitRMWAddUnless(RMWAddUnless e) {
Register resultRegister = e.getResultRegister();
Register dummy = new Register(null, resultRegister.getThreadId(), resultRegister.getPrecision());
RMWReadCondUnless load = Linux.newRMWReadCondUnless(dummy, e.getCmp(), e.getAddress(), Tag.Linux.MO_RELAXED);
return eventSequence(Linux.newConditionalMemoryBarrier(load), load, Linux.newRMWStoreCond(load, e.getAddress(), new IExprBin(dummy, IOpBin.PLUS, (IExpr) e.getMemValue()), Tag.Linux.MO_RELAXED), newLocal(resultRegister, new Atom(dummy, NEQ, e.getCmp())), Linux.newConditionalMemoryBarrier(load));
}
use of com.dat3m.dartagnan.program.event.lang.linux.cond.RMWReadCondUnless in project Dat3M by hernanponcedeleon.
the class VisitorLKMM method visitRMWAddUnless.
@Override
public List<Event> visitRMWAddUnless(RMWAddUnless e) {
Register resultRegister = e.getResultRegister();
Register dummy = e.getThread().newRegister(resultRegister.getPrecision());
RMWReadCondUnless load = Linux.newRMWReadCondUnless(dummy, e.getCmp(), e.getAddress(), Tag.Linux.MO_ONCE);
return eventSequence(Linux.newConditionalMemoryBarrier(load), load, Linux.newRMWStoreCond(load, e.getAddress(), new IExprBin(dummy, IOpBin.PLUS, (IExpr) e.getMemValue()), Tag.Linux.MO_ONCE), newLocal(resultRegister, new Atom(dummy, NEQ, e.getCmp())), Linux.newConditionalMemoryBarrier(load));
}
Aggregations