[Vm-dev] [commit][3220]
Step 2 of replacing DOUBLE_WORD_ALIGNMENT with OBJECTS_32BIT_ALIGNED.
commits at squeakvm.org
commits at squeakvm.org
Thu Jan 8 00:48:08 UTC 2015
Revision: 3220
Author: eliot
Date: 2015-01-07 16:48:08 -0800 (Wed, 07 Jan 2015)
Log Message:
-----------
Step 2 of replacing DOUBLE_WORD_ALIGNMENT with OBJECTS_32BIT_ALIGNED.
Update sqMemoryAccess.h and nuke all the refs in the config.h files.
Modified Paths:
--------------
trunk/platforms/Cross/vm/sqMemoryAccess.h
trunk/platforms/Mac OS/vm/config.h
trunk/platforms/unix/vm/config.cmake
trunk/platforms/win32/vm/sqConfig.h
trunk/platforms/win32/vm/sqWin32.h
Modified: trunk/platforms/Cross/vm/sqMemoryAccess.h
===================================================================
--- trunk/platforms/Cross/vm/sqMemoryAccess.h 2015-01-08 00:42:17 UTC (rev 3219)
+++ trunk/platforms/Cross/vm/sqMemoryAccess.h 2015-01-08 00:48:08 UTC (rev 3220)
@@ -40,6 +40,12 @@
# define SQ_IMAGE64 1
#endif
+#if (SQ_IMAGE64 || SPURVM)
+# define OBJECTS_32BIT_ALIGNED 0
+#else
+# define OBJECTS_32BIT_ALIGNED 1
+#endif
+
#if (SIZEOF_VOID_P == 4)
# define SQ_HOST32 1
#elif (SIZEOF_VOID_P == 8)
@@ -129,7 +135,7 @@
these macros to swap words if necessary. This costs no extra and
obviates sometimes having to word-swap floats when reading an image.
*/
-#if defined(DOUBLE_WORD_ALIGNMENT) || defined(DOUBLE_WORD_ORDER)
+#if defined(OBJECTS_32BIT_ALIGNED) || defined(DOUBLE_WORD_ORDER)
/* this is to allow strict aliasing assumption in the optimizer */
typedef union { double d; int i[sizeof(double) / sizeof(int)]; } _swapper;
# ifdef DOUBLE_WORD_ORDER
@@ -149,7 +155,7 @@
((_swapper *)(&floatVarName))->i[0] = *((int *)(intPointerToFloat) + 0); \
((_swapper *)(&floatVarName))->i[1] = *((int *)(intPointerToFloat) + 1);
# endif /*!DOUBLE_WORD_ORDER*/
-#else /*!(DOUBLE_WORD_ORDER||DOUBLE_WORD_ALIGNMENT)*/
+#else /*!(DOUBLE_WORD_ORDER||OBJECTS_32BIT_ALIGNED)*/
/* for machines that allow doubles to be on any word boundary */
# define storeFloatAtPointerfrom(i, floatVarName) \
*((double *) (i)) = (floatVarName);
Modified: trunk/platforms/Mac OS/vm/config.h
===================================================================
--- trunk/platforms/Mac OS/vm/config.h 2015-01-08 00:42:17 UTC (rev 3219)
+++ trunk/platforms/Mac OS/vm/config.h 2015-01-08 00:48:08 UTC (rev 3220)
@@ -170,7 +170,6 @@
#endif
#define HAVE_LIBDL 1
-/* #undef DOUBLE_WORD_ALIGNMENT */
/* #undef DOUBLE_WORD_ORDER */
/* damage containment */
Modified: trunk/platforms/unix/vm/config.cmake
===================================================================
--- trunk/platforms/unix/vm/config.cmake 2015-01-08 00:42:17 UTC (rev 3219)
+++ trunk/platforms/unix/vm/config.cmake 2015-01-08 00:48:08 UTC (rev 3220)
@@ -106,10 +106,10 @@
CONFIG_DEFINE (SIZEOF_LONG_LONG)
CONFIG_DEFINE (SIZEOF_VOID_P)
-TRY_RUN (DOUBLE_WORD_ALIGNMENT tmp ${bld} ${config}/testDoubleWordAlignment.c)
+# TRY_RUN (DOUBLE_WORD_ALIGNMENT tmp ${bld} ${config}/testDoubleWordAlignment.c)
TRY_RUN (DOUBLE_WORD_ORDER tmp ${bld} ${config}/testDoubleWordOrder.c)
-CONFIG_DEFINE (DOUBLE_WORD_ALIGNMENT)
+# CONFIG_DEFINE (DOUBLE_WORD_ALIGNMENT)
CONFIG_DEFINE (DOUBLE_WORD_ORDER)
# sqPlatformSpecific.h
Modified: trunk/platforms/win32/vm/sqConfig.h
===================================================================
--- trunk/platforms/win32/vm/sqConfig.h 2015-01-08 00:42:17 UTC (rev 3219)
+++ trunk/platforms/win32/vm/sqConfig.h 2015-01-08 00:48:08 UTC (rev 3220)
@@ -15,7 +15,6 @@
# endif
# if defined(_M_IX86) || defined(X86)
/* x86 systems */
-# define DOUBLE_WORD_ALIGNMENT
# define DOUBLE_WORD_ORDER
/* Note: We include a generic sqWin32.h to override some settings */
# include "sqWin32.h"
Modified: trunk/platforms/win32/vm/sqWin32.h
===================================================================
--- trunk/platforms/win32/vm/sqWin32.h 2015-01-08 00:42:17 UTC (rev 3219)
+++ trunk/platforms/win32/vm/sqWin32.h 2015-01-08 00:48:08 UTC (rev 3220)
@@ -59,7 +59,6 @@
#endif
#ifdef _MIPS_
-# undef DOUBLE_WORD_ALIGNMENT
# define DOUBLE_WORD_ORDER
#endif
More information about the Vm-dev
mailing list