use of com.dat3m.dartagnan.program.Register in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitReReadNa.
@Override
public IExpr visitReReadNa(LitmusCParser.ReReadNaContext ctx) {
Register register = getReturnRegister(true);
Event event = EventFactory.newLoad(register, getAddress(ctx.address), "NA");
programBuilder.addChild(currentThread, event);
return register;
}
use of com.dat3m.dartagnan.program.Register in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitThreadArguments.
@Override
public Object visitThreadArguments(LitmusCParser.ThreadArgumentsContext ctx) {
if (ctx != null) {
for (LitmusCParser.VarNameContext varName : ctx.varName()) {
String name = varName.getText();
MemoryObject object = programBuilder.getOrNewObject(name);
Register register = programBuilder.getOrCreateRegister(scope, name, ARCH_PRECISION);
programBuilder.addChild(currentThread, EventFactory.newLocal(register, object));
}
}
return null;
}
use of com.dat3m.dartagnan.program.Register in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitReOpBool.
@Override
public ExprInterface visitReOpBool(LitmusCParser.ReOpBoolContext ctx) {
Register register = getReturnRegister(false);
ExprInterface v1 = (ExprInterface) ctx.re(0).accept(this);
ExprInterface v2 = (ExprInterface) ctx.re(1).accept(this);
BExprBin result = new BExprBin(v1, ctx.opBool().op, v2);
return assignToReturnRegister(register, result);
}
use of com.dat3m.dartagnan.program.Register in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitReXchg.
@Override
public IExpr visitReXchg(LitmusCParser.ReXchgContext ctx) {
Register register = getReturnRegister(true);
IExpr value = (IExpr) ctx.value.accept(this);
Event event = EventFactory.Linux.newRMWExchange(getAddress(ctx.address), register, value, ctx.mo);
programBuilder.addChild(currentThread, event);
return register;
}
use of com.dat3m.dartagnan.program.Register in project Dat3M by hernanponcedeleon.
the class VisitorLitmusC method visitReConst.
@Override
public ExprInterface visitReConst(LitmusCParser.ReConstContext ctx) {
Register register = getReturnRegister(false);
IValue result = new IValue(new BigInteger(ctx.getText()), ARCH_PRECISION);
return assignToReturnRegister(register, result);
}
Aggregations