10#ifndef KLEE_INTEVALUATION_H
11#define KLEE_INTEVALUATION_H
15#define MAX_BITS (sizeof(uint64_t) * 8)
25inline uint64_t
add(uint64_t l, uint64_t r,
unsigned inWidth) {
30inline uint64_t
sub(uint64_t l, uint64_t r,
unsigned inWidth) {
35inline uint64_t
mul(uint64_t l, uint64_t r,
unsigned inWidth) {
40inline uint64_t
trunc(uint64_t l,
unsigned outWidth,
unsigned inWidth) {
45inline uint64_t
zext(uint64_t l,
unsigned outWidth,
unsigned inWidth) {
50inline uint64_t
sext(uint64_t l,
unsigned outWidth,
unsigned inWidth) {
51 uint32_t numInvalidBits =
MAX_BITS - inWidth;
56inline uint64_t
udiv(uint64_t l, uint64_t r,
unsigned inWidth) {
61inline uint64_t
urem(uint64_t l, uint64_t r,
unsigned inWidth) {
66inline uint64_t
sdiv(uint64_t l, uint64_t r,
unsigned inWidth) {
74inline uint64_t
srem(uint64_t l, uint64_t r,
unsigned inWidth) {
82inline uint64_t
ashr(uint64_t l, uint64_t shift,
unsigned inWidth) {
88inline uint64_t
lshr(uint64_t l, uint64_t shift,
unsigned inWidth) {
93inline uint64_t
shl(uint64_t l, uint64_t shift,
unsigned inWidth) {
98inline uint64_t
land(uint64_t l, uint64_t r,
unsigned inWidth) {
103inline uint64_t
lor(uint64_t l, uint64_t r,
unsigned inWidth) {
108inline uint64_t
lxor(uint64_t l, uint64_t r,
unsigned inWidth) {
113inline uint64_t
eq(uint64_t l, uint64_t r,
unsigned inWidth) {
117inline uint64_t
ne(uint64_t l, uint64_t r,
unsigned inWidth) {
121inline uint64_t
ult(uint64_t l, uint64_t r,
unsigned inWidth) {
125inline uint64_t
ule(uint64_t l, uint64_t r,
unsigned inWidth) {
129inline uint64_t
ugt(uint64_t l, uint64_t r,
unsigned inWidth) {
133inline uint64_t
uge(uint64_t l, uint64_t r,
unsigned inWidth) {
137inline uint64_t
slt(uint64_t l, uint64_t r,
unsigned inWidth) {
143inline uint64_t
sle(uint64_t l, uint64_t r,
unsigned inWidth) {
149inline uint64_t
sgt(uint64_t l, uint64_t r,
unsigned inWidth) {
155inline uint64_t
sge(uint64_t l, uint64_t r,
unsigned inWidth) {
uint64_t truncateToNBits(uint64_t x, unsigned N)
uint64_t add(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t urem(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t trunc(uint64_t l, unsigned outWidth, unsigned inWidth)
uint64_t eq(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t srem(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t lor(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t shl(uint64_t l, uint64_t shift, unsigned inWidth)
uint64_t ne(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t sge(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t land(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t ugt(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t slt(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t uge(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t zext(uint64_t l, unsigned outWidth, unsigned inWidth)
uint64_t sle(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t ashr(uint64_t l, uint64_t shift, unsigned inWidth)
uint64_t sdiv(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t sgt(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t ule(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t ult(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t sub(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t sext(uint64_t l, unsigned outWidth, unsigned inWidth)
uint64_t lxor(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t udiv(uint64_t l, uint64_t r, unsigned inWidth)
uint64_t lshr(uint64_t l, uint64_t shift, unsigned inWidth)
uint64_t mul(uint64_t l, uint64_t r, unsigned inWidth)