[Vm-dev] [commit][3218]
Rename DOUBLE_WORD_ALIGNMENT to OBJECTS_32BIT_ALIGNED and use aligned access
on
commits at squeakvm.org
commits at squeakvm.org
Wed Jan 7 19:23:25 UTC 2015
Revision: 3218
Author: eliot
Date: 2015-01-07 11:23:24 -0800 (Wed, 07 Jan 2015)
Log Message:
-----------
Rename DOUBLE_WORD_ALIGNMENT to OBJECTS_32BIT_ALIGNED and use aligned access on
Spur. Nuke HAVE_INTERP_H. Add iOS/vm/OSX/config.h.
Modified Paths:
--------------
branches/Cog/build.macos64x64/squeak.stack.spur/CoreVM.xcodeproj/project.pbxproj
branches/Cog/platforms/Cross/vm/sqMemoryAccess.h
branches/Cog/platforms/Mac OS/vm/config.h
branches/Cog/platforms/Plan9/vm/config.h
branches/Cog/platforms/RiscOS/vm/config.h
branches/Cog/platforms/iOS/vm/iPhone/config.h
branches/Cog/platforms/win32/vm/config.h
Added Paths:
-----------
branches/Cog/platforms/iOS/vm/OSX/config.h
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/build.macos64x64/squeak.stack.spur/CoreVM.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/build.macos64x64/squeak.stack.spur/CoreVM.xcodeproj/project.pbxproj 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/build.macos64x64/squeak.stack.spur/CoreVM.xcodeproj/project.pbxproj 2015-01-07 19:23:24 UTC (rev 3218)
@@ -20,6 +20,7 @@
73B54C530E55EFED00FE780C /* sqUnixVMProfile.c in Sources */ = {isa = PBXBuildFile; fileRef = 73B54C520E55EFED00FE780C /* sqUnixVMProfile.c */; };
73B96E490E47D7A10079C51B /* sqUnixHeartbeat.c in Sources */ = {isa = PBXBuildFile; fileRef = 73B96E480E47D7A10079C51B /* sqUnixHeartbeat.c */; };
73BC1BBE0F576864003412C5 /* gcc3x-interp.c in Sources */ = {isa = PBXBuildFile; fileRef = 73BC1BB90F576864003412C5 /* gcc3x-interp.c */; };
+ 73D16CAD1A5DBAA100E316FB /* config.h in Headers */ = {isa = PBXBuildFile; fileRef = 73D16CAC1A5DBAA100E316FB /* config.h */; };
73DFFAC018D380C200C3C543 /* AioPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 73DFFABF18D380C200C3C543 /* AioPlugin.c */; };
73F1E42E1A5CB5F70072BF0D /* sqMacOpenGL.c in Sources */ = {isa = PBXBuildFile; fileRef = 73F1E4071A5CB5F70072BF0D /* sqMacOpenGL.c */; };
73F1E42F1A5CB5F70072BF0D /* sqMacOpenGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 73F1E4081A5CB5F70072BF0D /* sqMacOpenGL.h */; };
@@ -337,6 +338,7 @@
73B54C520E55EFED00FE780C /* sqUnixVMProfile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixVMProfile.c; path = vm/sqUnixVMProfile.c; sourceTree = "<group>"; };
73B96E480E47D7A10079C51B /* sqUnixHeartbeat.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sqUnixHeartbeat.c; path = vm/sqUnixHeartbeat.c; sourceTree = "<group>"; };
73BC1BB90F576864003412C5 /* gcc3x-interp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = "gcc3x-interp.c"; sourceTree = "<group>"; };
+ 73D16CAC1A5DBAA100E316FB /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
73DFFABF18D380C200C3C543 /* AioPlugin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AioPlugin.c; path = AioPlugin/AioPlugin.c; sourceTree = "<group>"; };
73F1E4071A5CB5F70072BF0D /* sqMacOpenGL.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sqMacOpenGL.c; sourceTree = "<group>"; };
73F1E4081A5CB5F70072BF0D /* sqMacOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqMacOpenGL.h; sourceTree = "<group>"; };
@@ -1031,6 +1033,7 @@
73F1E4811A5CBA650072BF0D /* OSX */ = {
isa = PBXGroup;
children = (
+ 73D16CAC1A5DBAA100E316FB /* config.h */,
73F1E4821A5CBA650072BF0D /* BitMapConversionLogicFromX11.c */,
73F1E4831A5CBA650072BF0D /* BitMapConversionLogicFromX11.h */,
73F1E4851A5CBA650072BF0D /* SqViewBitmapConversion.h */,
@@ -1767,6 +1770,7 @@
73F1E5201A5CBA650072BF0D /* sqSqueakOSXOpenGLView.h in Headers */,
73F1E5221A5CBA650072BF0D /* sqSqueakOSXScreenAndWindow.h in Headers */,
73F1E5241A5CBA650072BF0D /* sqSqueakOSXView.h in Headers */,
+ 73D16CAD1A5DBAA100E316FB /* config.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: branches/Cog/platforms/Cross/vm/sqMemoryAccess.h
===================================================================
--- branches/Cog/platforms/Cross/vm/sqMemoryAccess.h 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/platforms/Cross/vm/sqMemoryAccess.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -16,29 +16,20 @@
#define __sqMemoryAccess_h
#include "config.h"
+#include "interp.h"
-#if defined(HAVE_INTERP_H)
-# include "interp.h"
-#else
-# define SQ_VI_BYTES_PER_WORD 4 /* build a 32-bit VM */
-# warning
-# warning ***************************************************
-# warning *
-# warning * interp.h not found -- defaulting to a 32-bit VM
-# warning *
-# warning * update your image-side VM sources to the latest
-# warning * version to avoid this message
-# warning *
-# warning ***************************************************
-# warning
-#endif
-
#if (SQ_VI_BYTES_PER_WORD == 4)
# define SQ_IMAGE32 1
#else
# 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)
@@ -157,7 +148,7 @@
* Pre-Cog systems stored floats in Mac PowerPC big-endian format.
* BigEndianFloats selects this behaviour for backwards-compatibility.
* RISC systems typically insist on double-word alignment of double-words, but
- * the heap is only word-aligned. DOUBLE_WORD_ALIGNMENT selects word access.
+ * the heap is only word-aligned. OBJECTS_32BIT_ALIGNED selects word access.
*/
#if BigEndianFloats && !VMBIGENDIAN
/* this is to allow strict aliasing assumption in the optimizer */
@@ -171,7 +162,7 @@
((_swapper *)(&doubleVar))->i[1] = *((int *)(intPointerToFloat) + 0); \
((_swapper *)(&doubleVar))->i[0] = *((int *)(intPointerToFloat) + 1); \
} while (0)
-# elif defined(DOUBLE_WORD_ALIGNMENT)
+# elif defined(OBJECTS_32BIT_ALIGNED)
/* this is to allow strict aliasing assumption in the optimizer */
typedef union { double d; int i[sizeof(double) / sizeof(int)]; } _aligner;
/* word-based copy for machines with alignment restrictions */
@@ -183,11 +174,11 @@
((_aligner *)(&doubleVar))->i[0] = *((int *)(intPointerToFloat) + 0); \
((_aligner *)(&doubleVar))->i[1] = *((int *)(intPointerToFloat) + 1); \
} while (0)
-#else /* !(BigEndianFloats && !VMBIGENDIAN) && !DOUBLE_WORD_ALIGNMENT */
+#else /* !(BigEndianFloats && !VMBIGENDIAN) && !OBJECTS_32BIT_ALIGNED */
/* for machines that allow doubles to be on any word boundary */
# define storeFloatAtPointerfrom(i, doubleVar) (*((double *) (i)) = (doubleVar))
# define fetchFloatAtPointerinto(i, doubleVar) ((doubleVar) = *((double *) (i)))
-#endif /* !(BigEndianFloats && !VMBIGENDIAN) && !DOUBLE_WORD_ALIGNMENT */
+#endif /* !(BigEndianFloats && !VMBIGENDIAN) && !OBJECTS_32BIT_ALIGNED */
#define storeFloatAtfrom(i, doubleVar) storeFloatAtPointerfrom(pointerForOop(i), doubleVar)
#define fetchFloatAtinto(i, doubleVar) fetchFloatAtPointerinto(pointerForOop(i), doubleVar)
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
- Tue Jan 6 14:58:34 PST 2015
+ Wed Jan 7 11:22:52 PST 2015
Modified: branches/Cog/platforms/Mac OS/vm/config.h
===================================================================
--- branches/Cog/platforms/Mac OS/vm/config.h 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/platforms/Mac OS/vm/config.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -39,10 +39,6 @@
#ifndef __sq_config_h
#define __sq_config_h
-/* explicit image width */
-
-#define HAVE_INTERP_H 1
-
/* package options */
#define USE_X11 1
@@ -101,8 +97,6 @@
/* #undef HAVE_GL_GL_H */
#define HAVE_OPENGL_GL_H 1
-/* #undef NEED_SUNOS_H */
-
/* system calls/library functions */
#define AT_EXIT atexit
@@ -168,19 +162,18 @@
#endif
#define HAVE_LIBDL 1
-/* #undef DOUBLE_WORD_ALIGNMENT */
/* damage containment */
#define DARWIN 1
-#ifdef NEED_SUNOS_H
-# include "sunos.h"
-#endif
-
/* other configured variables */
-#define VM_VERSION "4.0"
+#if SPURVM
+# define VM_VERSION "5.0"
+#else
+# define VM_VERSION "4.5"
+#endif
#define VM_MODULE_PREFIX ""
/* #undef VM_DLSYM_PREFIX */
#define VM_X11DIR "/usr/X11R6/lib"
Modified: branches/Cog/platforms/Plan9/vm/config.h
===================================================================
--- branches/Cog/platforms/Plan9/vm/config.h 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/platforms/Plan9/vm/config.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -43,8 +43,6 @@
#ifndef __sq_config_h
#define __sq_config_h
-#define HAVE_INTERP_H 1
-
/* header files */
#undef HAVE_UNISTD_H
@@ -119,7 +117,6 @@
#endif
#undef HAVE_LIBDL
-/* #undef DOUBLE_WORD_ALIGNMENT */
/* #undef DOUBLE_WORD_ORDER */
/* other configured variables */
Modified: branches/Cog/platforms/RiscOS/vm/config.h
===================================================================
--- branches/Cog/platforms/RiscOS/vm/config.h 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/platforms/RiscOS/vm/config.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -27,5 +27,4 @@
#define SIZEOF_VOID_P 4
-#define HAVE_INTERP_H 1
#define SIZEOF_LONG_LONG 8
Copied: branches/Cog/platforms/iOS/vm/OSX/config.h (from rev 3216, branches/Cog/platforms/Mac OS/vm/config.h)
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/config.h (rev 0)
+++ branches/Cog/platforms/iOS/vm/OSX/config.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -0,0 +1,189 @@
+/* config.h. Generated by configure. */
+/* config.h.in -- template for config.h -*- C -*-
+ *
+ * Copyright (C) 1996-2014 by Ian Piumarta and other authors/contributors
+ * listed elsewhere in this file.
+ * All rights reserved.
+ *
+ * This file is part of Unix Squeak.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/* Author: Ian.Piumarta at squeakland.org
+ *
+ * Last edited: 2014-12-02 11:16 by eliot.miranda at gmail.com
+ *
+ * THIS FILE IS A BUG!! It *SHOULD NOT* exist! Any automatically-derived
+ * configuration should be produced at compile-time, not hard-wired like this
+ * excressence. But at least for the time being we're stuck with it.
+ * eem 12/2/2014 11:16
+ */
+
+#ifndef __sq_config_h
+#define __sq_config_h
+
+/* package options */
+
+#define USE_X11 1
+/* #undef USE_X11_GLX */
+#define USE_QUARTZ 1
+#define USE_QUARTZ_CGL 1
+/* #undef USE_RFB */
+
+/* libraries */
+
+/* #undef HAVE_LIBX11 */
+#define HAVE_LIBXEXT 1
+/* #undef HAVE_LIBDL */
+#define HAVE_DYLD 1
+/* #undef HAVE_LIBFFI */
+/* #undef HAVE_ICONV */
+
+/* #undef USE_AUDIO_NONE */
+/* #undef USE_AUDIO_SUN */
+/* #undef USE_AUDIO_NAS */
+/* #undef USE_AUDIO_OSS */
+/* #undef USE_AUDIO_MACOSX */
+/* #undef OSS_DEVICE */
+
+/* header files */
+
+#define HAVE_UNISTD_H 1
+/* #undef NEED_GETHOSTNAME_P */
+
+#define HAVE_DIRENT_H 1
+/* #undef HAVE_SYS_NDIR_H */
+/* #undef HAVE_SYS_DIR_H */
+/* #undef HAVE_NDIR_H */
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3
+#undef HAVE_DLFCN_H
+#else
+#define HAVE_DLFCN_H 1
+#endif
+
+#define HAVE_ICONV_H 1
+
+#define HAVE_SYS_TIME_H 1
+#define TIME_WITH_SYS_TIME 1
+
+#define HAVE_SYS_FILIO_H 1
+
+/* #undef HAVE_SYS_AUDIOIO_H */
+/* #undef HAVE_SUN_AUDIOIO_H */
+
+/* #undef HAVE_PTY_H */
+#define HAVE_UTIL_H 1
+/* #undef HAVE_LIBUTIL_H */
+/* #undef HAVE_STROPTS_H */
+
+/* #undef HAVE_GL_GL_H */
+#define HAVE_OPENGL_GL_H 1
+
+/* system calls/library functions */
+
+#define AT_EXIT atexit
+
+#define HAVE_TZSET 1
+
+#define HAVE_OPENPTY 1
+/* #undef HAVE_UNIX98_PTYS */
+
+#define HAVE_SNPRINTF 1
+/* #undef HAVE___SNPRINTF */
+
+#define HAVE_MMAP 1
+
+#define HAVE_DYLD 1
+
+#define HAVE_LANGINFO_CODESET 1
+
+#define HAVE_ALLOCA 1
+#define HAVE_ALLOCA_H 1
+
+#define HAVE_UNSETENV 1
+
+/* widths of primitive types */
+
+#if _LP64 || __x86_64 || __x86_64__
+# define SIZEOF_INT 4
+# define SIZEOF_LONG 8
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_VOID_P 8
+#endif
+
+#if (i386 || __i386 || __i386__) || (ppc || __ppc || __ppc__)
+# define SIZEOF_INT 4
+# define SIZEOF_LONG 4
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_VOID_P 4
+#endif
+
+/* structures */
+
+#define HAVE_TM_GMTOFF 1
+#define HAVE_TIMEZONE 1
+
+/* typedefs */
+
+/* #undef size_t */
+
+/* architecture */
+
+#define OS_TYPE "unix"
+
+/* #undef VM_HOST_VENDOR */
+/* #undef VM_HOST_OS */
+
+#if defined(__BIG_ENDIAN__)
+# define WORDS_BIGENDIAN 1
+# define VMENDIANNESS 1
+#else
+# undef WORDS_BIGENDIAN
+# define VMENDIANNESS 0
+# define LSB_FIRST 1
+#endif
+
+#define HAVE_LIBDL 1
+
+/* damage containment */
+
+#define DARWIN 1
+
+/* other configured variables */
+
+#if SPURVM
+# define VM_VERSION "5.0"
+#else
+# define VM_VERSION "4.5"
+#endif
+#define VM_MODULE_PREFIX ""
+/* #undef VM_DLSYM_PREFIX */
+#define VM_X11DIR "/usr/X11R6/lib"
+
+/* avoid dependencies on glibc2.3 */
+
+/* #undef HAVE_FEATURES_H */
+
+#if defined(HAVE_FEATURES_H)
+# include "glibc.h"
+#endif
+
+#endif /* __sq_config_h */
Modified: branches/Cog/platforms/iOS/vm/iPhone/config.h
===================================================================
--- branches/Cog/platforms/iOS/vm/iPhone/config.h 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/platforms/iOS/vm/iPhone/config.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -35,10 +35,6 @@
#ifndef __sq_config_h
#define __sq_config_h
-/* explicit image width */
-
-#define HAVE_INTERP_H 1
-
/* package options */
#define USE_X11 1
@@ -97,8 +93,6 @@
/* #undef HAVE_GL_GL_H */
#define HAVE_OPENGL_GL_H 1
-/* #undef NEED_SUNOS_H */
-
/* system calls/library functions */
#define AT_EXIT atexit
@@ -170,22 +164,19 @@
#endif
#define HAVE_LIBDL 1
-/* #undef DOUBLE_WORD_ALIGNMENT */
/* #undef DOUBLE_WORD_ORDER */
/* damage containment */
#define DARWIN 1
-#ifdef NEED_SUNOS_H
-# include "sunos.h"
-#endif
-
/* other configured variables */
-#define SQ_VERSION "3.8g-6548"
-#define VM_VERSION "3.8a-2"
-#define VM_LIBDIR "/usr/local/lib/squeak/3.8a-2"
+#if SPURVM
+# define VM_VERSION "5.0"
+#else
+# define VM_VERSION "4.5"
+#endif
#define VM_MODULE_PREFIX ""
/* #undef VM_DLSYM_PREFIX */
#define VM_X11DIR "/usr/X11R6/lib"
Modified: branches/Cog/platforms/win32/vm/config.h
===================================================================
--- branches/Cog/platforms/win32/vm/config.h 2015-01-07 18:50:12 UTC (rev 3217)
+++ branches/Cog/platforms/win32/vm/config.h 2015-01-07 19:23:24 UTC (rev 3218)
@@ -1,3 +1,2 @@
-#define HAVE_INTERP_H
#define SIZEOF_VOID_P 4
-
+#define SIZEOF_LONG_LONG 8
More information about the Vm-dev
mailing list