klee
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ConstantDivision.cpp File Reference
#include "ConstantDivision.h"
#include "klee/util/Bits.h"
#include <algorithm>
#include <cassert>
Include dependency graph for ConstantDivision.cpp:

Go to the source code of this file.

Namespaces

 klee
 

Macros

#define TWO_TO_THE_32_U64   (1ULL << 32)
 
#define TWO_TO_THE_31_S64   (1LL << 31)
 
#define ABS(x)   ( ((x)>0)?x:-(x) ) /* fails if x is the min value of its type */
 
#define XSIGN(x)   ( (x) >> 31 )
 
#define LOG2_CEIL(x)   ( 32 - ldz(x - 1) )
 

Functions

static uint32_t klee::ones (register uint32_t x)
 
static uint32_t klee::ldz (register uint32_t x)
 
static uint32_t klee::exp_base_2 (register int32_t n)
 
void klee::ComputeMultConstants64 (uint64_t multiplicand, uint64_t &add, uint64_t &sub)
 
void klee::ComputeUDivConstants32 (uint32_t d, uint32_t &mprime, uint32_t &sh1, uint32_t &sh2)
 
void klee::ComputeSDivConstants32 (int32_t d, int32_t &mprime, int32_t &dsign, int32_t &shpost)
 

Macro Definition Documentation

#define ABS (   x)    ( ((x)>0)?x:-(x) ) /* fails if x is the min value of its type */

Definition at line 34 of file ConstantDivision.cpp.

Referenced by klee::ComputeSDivConstants32().

#define LOG2_CEIL (   x)    ( 32 - ldz(x - 1) )
#define TWO_TO_THE_31_S64   (1LL << 31)

Definition at line 31 of file ConstantDivision.cpp.

Referenced by klee::ComputeSDivConstants32().

#define TWO_TO_THE_32_U64   (1ULL << 32)
#define XSIGN (   x)    ( (x) >> 31 )

Definition at line 37 of file ConstantDivision.cpp.

Referenced by klee::ComputeSDivConstants32().