Add an option to disable use of tagged pointers

pull/661/head
Jonathan G Rennison 2 months ago
parent 7e0acd686e
commit cd40eba453

@ -536,6 +536,10 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DPOINTER_IS_64BIT)
endif()
if(OPTION_NO_TAGGED_PTRS)
add_definitions(-DNO_TAGGED_PTRS)
endif()
enable_testing()
add_subdirectory(regression)

@ -27,7 +27,7 @@
# error "TTD_ENDIAN is not defined; please set it to either TTD_LITTLE_ENDIAN or TTD_BIG_ENDIAN"
#endif /* !TTD_ENDIAN */
#if defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__) || defined(_M_ARM64)
#if !defined(NO_TAGGED_PTRS) && (defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__) || defined(_M_ARM64))
/** Tagged pointers (upper bits) may be used on this architecture */
# define OTTD_UPPER_TAGGED_PTR 1
#else

Loading…
Cancel
Save