disable constant offset check when cross-compiling for a different word size

This commit is contained in:
Joel Dice 2012-06-28 16:21:24 -06:00
parent 0c28fd8289
commit 365f863080
2 changed files with 8 additions and 0 deletions

View File

@ -58,11 +58,13 @@ typedef int32_t intptr_t;
typedef uint32_t uintptr_t;
# define UINT64_C(x) x##LL
# define ARCH_x86_32
@ define BYTES_PER_WORD 4
# elif defined _M_X64
typedef int64_t intptr_t;
typedef uint64_t uintptr_t;
# define UINT64_C(x) x##L
# define ARCH_x86_64
@ define BYTES_PER_WORD 8
# else
# error "unsupported architecture"
# endif
@ -77,6 +79,8 @@ typedef intptr_t intptr_alias_t;
# include "stdint.h"
# define BYTES_PER_WORD __SIZEOF_POINTER__
# define LIKELY(v) __builtin_expect((v) != 0, true)
# define UNLIKELY(v) __builtin_expect((v) != 0, false)

View File

@ -8614,6 +8614,8 @@ class MyProcessor: public Processor {
t->codeImage = codeImage;
t->thunkTable = thunkTable;
#if TARGET_BYTES_PER_WORD == BYTES_PER_WORD
int mismatches =
checkConstant(t, TARGET_THREAD_EXCEPTION, &Thread::exception, "TARGET_THREAD_EXCEPTION") +
checkConstant(t, TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT, &MyThread::exceptionStackAdjustment, "TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT") +
@ -8635,6 +8637,8 @@ class MyProcessor: public Processor {
abort(t);
}
#endif
t->init();
return t;