atomics wrap around on overflow

This commit is contained in:
Ralf Jung 2018-10-12 09:07:56 +02:00
parent 616645255a
commit b99e1267be

View file

@ -134,7 +134,7 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'mir, 'tcx, super:
"xsub" => mir::BinOp::Sub,
_ => bug!(),
};
// FIXME: what do atomics do on overflow?
// Atomics wrap around on overflow.
self.binop_ignore_overflow(op, old, rhs, ptr.into())?;
}