use of com.dat3m.dartagnan.program.event.lang.linux.cond.RMWReadCond in project Dat3M by hernanponcedeleon.
the class UnrollExceptionsTest method FenceCond.
@Test(expected = ProgramProcessingException.class)
public void FenceCond() throws Exception {
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
pb.initThread(0);
MemoryObject object = pb.getOrNewObject("X");
Label start = pb.getOrCreateLabel("loopStart");
pb.addChild(0, start);
RMWReadCond load = Linux.newRMWReadCondCmp(pb.getOrCreateRegister(0, "r1", 32), BConst.TRUE, object, null);
pb.addChild(0, Linux.newConditionalBarrier(load, null));
pb.addChild(0, EventFactory.newGoto(start));
LoopUnrolling processor = LoopUnrolling.newInstance();
processor.setUnrollingBound(2);
processor.run(pb.build());
}
use of com.dat3m.dartagnan.program.event.lang.linux.cond.RMWReadCond in project Dat3M by hernanponcedeleon.
the class UnrollExceptionsTest method RMWStoreCon.
@Test(expected = ProgramProcessingException.class)
public void RMWStoreCon() throws Exception {
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
pb.initThread(0);
MemoryObject object = pb.getOrNewObject("X");
Label start = pb.getOrCreateLabel("loopStart");
pb.addChild(0, start);
RMWReadCond load = Linux.newRMWReadCondCmp(pb.getOrCreateRegister(0, "r1", 32), BConst.TRUE, object, null);
pb.addChild(0, Linux.newRMWStoreCond(load, object, IValue.ONE, null));
pb.addChild(0, EventFactory.newGoto(start));
LoopUnrolling processor = LoopUnrolling.newInstance();
processor.setUnrollingBound(2);
processor.run(pb.build());
}
Aggregations