Add LJ_TARGET_UNALIGNED.

This commit is contained in:
Mike Pall 2012-10-09 21:42:42 +02:00
parent 0452e97ba0
commit 5ebe4990ba
2 changed files with 7 additions and 1 deletions

View File

@ -131,6 +131,7 @@
#define LJ_TARGET_EHRETREG 0
#define LJ_TARGET_MASKSHIFT 1
#define LJ_TARGET_MASKROT 1
#define LJ_TARGET_UNALIGNED 1
#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL
#elif LUAJIT_TARGET == LUAJIT_ARCH_X64
@ -145,6 +146,7 @@
#define LJ_TARGET_JUMPRANGE 31 /* +-2^31 = +-2GB */
#define LJ_TARGET_MASKSHIFT 1
#define LJ_TARGET_MASKROT 1
#define LJ_TARGET_UNALIGNED 1
#define LJ_ARCH_NUMMODE LJ_NUMMODE_SINGLE_DUAL
#elif LUAJIT_TARGET == LUAJIT_ARCH_ARM
@ -388,6 +390,10 @@
#define LJ_64 1
#endif
#ifndef LJ_TARGET_UNALIGNED
#define LJ_TARGET_UNALIGNED 0
#endif
/* Various workarounds for embedded operating systems. */
#if defined(__ANDROID__) || defined(__symbian__)
#define LUAJIT_NO_LOG2

View File

@ -1800,7 +1800,7 @@ LJFOLDF(merge_eqne_snew_kgc)
int32_t len = (int32_t)kstr->len;
lua_assert(irt_isstr(fins->t));
#if LJ_TARGET_X86ORX64
#if LJ_TARGET_UNALIGNED
#define FOLD_SNEW_MAX_LEN 4 /* Handle string lengths 0, 1, 2, 3, 4. */
#define FOLD_SNEW_TYPE8 IRT_I8 /* Creates shorter immediates. */
#else