3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

Change how 64 bit builds are detected.

Instead of doing this at configure time, we look at the actual
compile time status. This also avoids hardcoding checks based on
what CPU architecture is present, which doesn't work when Z3 is
being built on non-x86_64 platforms.
This commit is contained in:
Bruce Mitchener 2018-12-09 16:16:20 +07:00
parent 559f57470e
commit 51a947b73d
12 changed files with 17 additions and 22 deletions

View file

@ -21,7 +21,7 @@ Revision History:
namespace smt {
#define DEFAULT_WATCH_LIST_SIZE (sizeof(clause *) * 4)
#ifdef _AMD64_
#if defined(__LP64__) || defined(_WIN64)
// make sure data is aligned in 64 bit machines
#define HEADER_SIZE (4 * sizeof(unsigned))
#else
@ -38,7 +38,7 @@ namespace smt {
if (m_data == nullptr) {
unsigned size = DEFAULT_WATCH_LIST_SIZE + HEADER_SIZE;
unsigned * mem = reinterpret_cast<unsigned*>(alloc_svect(char, size));
#ifdef _AMD64_
#if defined(__LP64__) || defined(_WIN64)
++mem; // make sure data is aligned in 64 bit machines
#endif
*mem = 0;
@ -61,7 +61,7 @@ namespace smt {
unsigned new_capacity = (((curr_capacity * 3 + sizeof(clause *)) >> 1)+3)&~3U;
unsigned * mem = reinterpret_cast<unsigned*>(alloc_svect(char, new_capacity + HEADER_SIZE));
unsigned curr_end_cls = end_cls_core();
#ifdef _AMD64_
#if defined(__LP64__) || defined(_WIN64)
++mem; // make sure data is aligned in 64 bit machines
#endif
*mem = curr_end_cls;