[Vm-dev] [commit][3438] CogVM source as per VMMaker.oscog-eem.1455/Cog-eem.276

commits at squeakvm.org commits at squeakvm.org
Tue Sep 15 23:26:24 UTC 2015


Revision: 3438
Author:   eliot
Date:     2015-09-15 16:26:22 -0700 (Tue, 15 Sep 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1455/Cog-eem.276

fix coercion problems on FFI plugin (IA32 & ARM)
- character were not correctly mapped back
- floats were not being well chequed
- external addressed needs to be treated as aliens for the purpose of coercing
  them as pointers (bad regression by Eliot)

Make sure the actual Smalltalk selector is included in error messages and the
comment at the beginning of a generated C function.

Fix C compiler warnings by making sqAssert: answer its argument (as looked to be
the intent from the original version).

Eliminate some compiler warnings in the generated processor plugins.

Modified Paths:
--------------
    branches/Cog/build.macos32x86/bochsx64/conf.COG
    branches/Cog/build.macos32x86/bochsx86/conf.COG
    branches/Cog/build.macos32x86/squeak.cog.spur/BochsX64Plugin/BochsX64Plugin.xcodeproj/project.pbxproj
    branches/Cog/processors/IA32/bochs/bochs.h
    branches/Cog/processors/IA32/bochs/bx_debug/debug.h
    branches/Cog/processors/IA32/bochs/disasm/disasm.h
    branches/Cog/processors/IA32/bochs/fpu/softfloat.h
    branches/Cog/processors/IA32/bochs/gui/textconfig.h
    branches/Cog/processors/IA32/linuxbochs/conf.COG
    branches/Cog/processors/IA32/macbochs/conf.COG
    branches/Cog/processors/IA32/winbochs/conf.COG
    branches/Cog/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
    branches/Cog/src/plugins/BochsX64Plugin/BochsX64Plugin.c
    branches/Cog/src/plugins/GdbARMPlugin/GdbARMPlugin.c
    branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
    branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/build.macos32x86/bochsx64/conf.COG
===================================================================
--- branches/Cog/build.macos32x86/bochsx64/conf.COG	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/build.macos32x86/bochsx64/conf.COG	2015-09-15 23:26:22 UTC (rev 3438)
@@ -6,7 +6,7 @@
 
 # build cpu/libcpu.a disasm/libdisasm.a fpu/libfpu.a using
 # $ ./conf.COG
-# $ ../../../processors/IA32/bochs/makeem
+# $ ../../processors/IA32/bochs/makeem
 
 set echo
 # CFLAGS="-pipe -O3 -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jumps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arrays $CFLAGS"
@@ -23,7 +23,7 @@
 export CXXFLAGS
 export LDFLAGS
 
-../../../processors/IA32/bochs/configure \
+../../processors/IA32/bochs/configure \
 	--enable-Cog \
 	--enable-cpu-level=6 \
 	--enable-sse=2 \
@@ -46,3 +46,9 @@
 # acpi == Advanced Configuration and Power Interface
 # pci == Peripheral Component Interconnect local bus
 # clgd54xx == Cirrus Logic GD54xx video card
+
+# avoid conflict with squeak unix build's config.h
+echo cp config.h bochsconfig.h
+cp config.h bochsconfig.h
+
+echo "and don't forget to run ../../processors/IA32/bochs/makeem"

Modified: branches/Cog/build.macos32x86/bochsx86/conf.COG
===================================================================
--- branches/Cog/build.macos32x86/bochsx86/conf.COG	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/build.macos32x86/bochsx86/conf.COG	2015-09-15 23:26:22 UTC (rev 3438)
@@ -48,3 +48,9 @@
 # acpi == Advanced Configuration and Power Interface
 # pci == Peripheral Component Interconnect local bus
 # clgd54xx == Cirrus Logic GD54xx video card
+
+# avoid conflict with squeak unix build's config.h
+echo cp config.h bochsconfig.h
+cp config.h bochsconfig.h
+
+echo "and don't forget to run ../../processors/IA32/bochs/makeem"

Modified: branches/Cog/build.macos32x86/squeak.cog.spur/BochsX64Plugin/BochsX64Plugin.xcodeproj/project.pbxproj
===================================================================
--- branches/Cog/build.macos32x86/squeak.cog.spur/BochsX64Plugin/BochsX64Plugin.xcodeproj/project.pbxproj	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/build.macos32x86/squeak.cog.spur/BochsX64Plugin/BochsX64Plugin.xcodeproj/project.pbxproj	2015-09-15 23:26:22 UTC (rev 3438)
@@ -19,10 +19,10 @@
 		08EA7FFBFE8413EDC02AAC07 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
 		73020E8C0EE714E60021D217 /* BochsX64Plugin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = BochsX64Plugin.c; path = ../../../src/plugins/BochsX64Plugin/BochsX64Plugin.c; sourceTree = SOURCE_ROOT; };
 		73020E8E0EE7158C0021D217 /* BochsX64Plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = BochsX64Plugin.h; path = ../../../platforms/Cross/plugins/BochsX64Plugin/BochsX64Plugin.h; sourceTree = SOURCE_ROOT; };
-		737482B20EE7339F004E10F8 /* libcpu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcpu.a; path = ../../bochsx86/cpu/libcpu.a; sourceTree = SOURCE_ROOT; };
-		737482B40EE733BD004E10F8 /* libfpu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfpu.a; path = ../../bochsx86/fpu/libfpu.a; sourceTree = SOURCE_ROOT; };
+		737482B20EE7339F004E10F8 /* libcpu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcpu.a; path = ../../bochsx64/cpu/libcpu.a; sourceTree = SOURCE_ROOT; };
+		737482B40EE733BD004E10F8 /* libfpu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfpu.a; path = ../../bochsx64/fpu/libfpu.a; sourceTree = SOURCE_ROOT; };
 		737482B60EE7343B004E10F8 /* sqBochsX64Plugin.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = sqBochsX64Plugin.cpp; path = ../../../platforms/Cross/plugins/BochsX64Plugin/sqBochsX64Plugin.cpp; sourceTree = SOURCE_ROOT; };
-		737483070EE7406A004E10F8 /* libdisasm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdisasm.a; path = ../../bochsx86/disasm/libdisasm.a; sourceTree = SOURCE_ROOT; };
+		737483070EE7406A004E10F8 /* libdisasm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdisasm.a; path = ../../bochsx64/disasm/libdisasm.a; sourceTree = SOURCE_ROOT; };
 		8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
 		8D01CCD20486CAD60068D4B7 /* BochsX64Plugin.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BochsX64Plugin.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
 		DA3A20F50AA63CBF0050B983 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../../../spursrc/vm/interp.h; sourceTree = SOURCE_ROOT; };
@@ -179,9 +179,9 @@
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
 				);
-				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../bochsx86/cpu\"";
-				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../bochsx86/fpu\"";
-				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/../../bochsx86/disasm\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../bochsx64/cpu\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../bochsx64/fpu\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/../../bochsx64/disasm\"";
 				PRODUCT_NAME = BochsX64Plugin;
 				WRAPPER_EXTENSION = bundle;
 				ZERO_LINK = YES;
@@ -202,9 +202,9 @@
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
 					"$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
 				);
-				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../bochsx86/cpu\"";
-				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../bochsx86/fpu\"";
-				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/../../bochsx86/disasm\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../bochsx64/cpu\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../bochsx64/fpu\"";
+				LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/../../bochsx64/disasm\"";
 				PRODUCT_NAME = BochsX64Plugin;
 				WRAPPER_EXTENSION = bundle;
 			};


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Mon Sep 14 18:30:29 PDT 2015
   + Tue Sep 15 16:23:00 PDT 2015

Modified: branches/Cog/processors/IA32/bochs/bochs.h
===================================================================
--- branches/Cog/processors/IA32/bochs/bochs.h	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/bochs/bochs.h	2015-09-15 23:26:22 UTC (rev 3438)
@@ -34,8 +34,8 @@
 #ifndef BX_BOCHS_H
 #  define BX_BOCHS_H 1
 
-#if USE_BOCHS_CONFIG_H // Avoid conflicts with squeak unix build's config.h
-# include "bochsconfig.h"      /* generated by configure script from config.h.in */
+#if USE_BOCHS_CONFIG_H || COG // Avoid conflicts with squeak unix build's config.h
+# include "bochsconfig.h" /* generated by configure script from config.h.in */
 #else
 # include "config.h"      /* generated by configure script from config.h.in */
 #endif

Modified: branches/Cog/processors/IA32/bochs/bx_debug/debug.h
===================================================================
--- branches/Cog/processors/IA32/bochs/bx_debug/debug.h	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/bochs/bx_debug/debug.h	2015-09-15 23:26:22 UTC (rev 3438)
@@ -26,7 +26,11 @@
 
 
 // if including from C parser, need basic types etc
-#include "config.h"
+#if USE_BOCHS_CONFIG_H || COG
+# include "bochsconfig.h" /* generated by configure script from config.h.in */
+#else
+# include "config.h"      /* generated by configure script from config.h.in */
+#endif
 #include "osdep.h"
 
 #define BX_DBG_NO_HANDLE 1000

Modified: branches/Cog/processors/IA32/bochs/disasm/disasm.h
===================================================================
--- branches/Cog/processors/IA32/bochs/disasm/disasm.h	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/bochs/disasm/disasm.h	2015-09-15 23:26:22 UTC (rev 3438)
@@ -1,7 +1,11 @@
 #ifndef _BX_DISASM_H_
 #define _BX_DISASM_H_
 
-#include "config.h"
+#if USE_BOCHS_CONFIG_H || COG
+# include "bochsconfig.h" /* generated by configure script from config.h.in */
+#else
+# include "config.h"      /* generated by configure script from config.h.in */
+#endif
 
 #define BX_DECODE_MODRM(modrm_byte, mod, opcode, rm) { \
   mod    = (modrm_byte >> 6) & 0x03; \

Modified: branches/Cog/processors/IA32/bochs/fpu/softfloat.h
===================================================================
--- branches/Cog/processors/IA32/bochs/fpu/softfloat.h	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/bochs/fpu/softfloat.h	2015-09-15 23:26:22 UTC (rev 3438)
@@ -32,7 +32,11 @@
  *            Stanislav Shwartsman [sshwarts at sourceforge net]
  * ==========================================================================*/
 
-#include <config.h>      /* generated by configure script from config.h.in */
+#if USE_BOCHS_CONFIG_H || COG
+# include "bochsconfig.h" /* generated by configure script from config.h.in */
+#else
+# include "config.h"      /* generated by configure script from config.h.in */
+#endif
 
 #ifndef _SOFTFLOAT_H_
 #define _SOFTFLOAT_H_

Modified: branches/Cog/processors/IA32/bochs/gui/textconfig.h
===================================================================
--- branches/Cog/processors/IA32/bochs/gui/textconfig.h	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/bochs/gui/textconfig.h	2015-09-15 23:26:22 UTC (rev 3438)
@@ -3,7 +3,11 @@
 /////////////////////////////////////////////////////////////////////////
 //
 
-#include "config.h"
+#if USE_BOCHS_CONFIG_H || COG
+# include "bochsconfig.h" /* generated by configure script from config.h.in */
+#else
+# include "config.h"      /* generated by configure script from config.h.in */
+#endif
 
 #if BX_USE_TEXTCONFIG
 

Modified: branches/Cog/processors/IA32/linuxbochs/conf.COG
===================================================================
--- branches/Cog/processors/IA32/linuxbochs/conf.COG	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/linuxbochs/conf.COG	2015-09-15 23:26:22 UTC (rev 3438)
@@ -49,4 +49,7 @@
 # clgd54xx == Cirrus Logic GD54xx video card
 
 # avoid conflict with squeak unix build's config.h
-ln -s config.h bochsconfig.h
+echo cp config.h bochsconfig.h
+cp config.h bochsconfig.h
+
+echo "and don't forget to run ../bochs/makeem"

Modified: branches/Cog/processors/IA32/macbochs/conf.COG
===================================================================
--- branches/Cog/processors/IA32/macbochs/conf.COG	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/macbochs/conf.COG	2015-09-15 23:26:22 UTC (rev 3438)
@@ -47,3 +47,9 @@
 # acpi == Advanced Configuration and Power Interface
 # pci == Peripheral Component Interconnect local bus
 # clgd54xx == Cirrus Logic GD54xx video card
+
+# avoid conflict with squeak unix build's config.h
+echo cp config.h bochsconfig.h
+cp config.h bochsconfig.h
+
+echo "and don't forget to run ../bochs/makeem"

Modified: branches/Cog/processors/IA32/winbochs/conf.COG
===================================================================
--- branches/Cog/processors/IA32/winbochs/conf.COG	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/processors/IA32/winbochs/conf.COG	2015-09-15 23:26:22 UTC (rev 3438)
@@ -48,3 +48,9 @@
 # acpi == Advanced Configuration and Power Interface
 # pci == Peripheral Component Interconnect local bus
 # clgd54xx == Cirrus Logic GD54xx video card
+
+# avoid conflict with squeak unix build's config.h
+echo cp config.h bochsconfig.h
+cp config.h bochsconfig.h
+
+echo "and don't forget to run ../bochs/makeem"

Modified: branches/Cog/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c
===================================================================
--- branches/Cog/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/src/plugins/BochsIA32Plugin/BochsIA32Plugin.c	2015-09-15 23:26:22 UTC (rev 3438)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1453 uuid: baf34f5d-4d8d-4f5f-b74a-1d76ecd08695
+	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
    from
-	BochsIA32Plugin Cog-eem.275 uuid: cf385fb7-06ee-451f-8752-c60bb4a6d8ed
+	BochsIA32Plugin Cog-eem.276 uuid: 275e1449-aee4-4bc6-9cb9-ebd2448d3dd7
  */
-static char __buildInfo[] = "BochsIA32Plugin Cog-eem.275 uuid: cf385fb7-06ee-451f-8752-c60bb4a6d8ed " __DATE__ ;
+static char __buildInfo[] = "BochsIA32Plugin Cog-eem.276 uuid: 275e1449-aee4-4bc6-9cb9-ebd2448d3dd7 " __DATE__ ;
 
 
 
@@ -44,7 +44,7 @@
 
 
 /*** Function Prototypes ***/
-static sqInt forceStopOnInterrupt(void);
+static void forceStopOnInterrupt(void);
 EXPORT(const char*) getModuleName(void);
 static sqInt positiveMachineIntegerFor(unsigned long value);
 EXPORT(sqInt) primitiveDisassembleAtInMemory(void);
@@ -119,15 +119,15 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"BochsIA32Plugin Cog-eem.275 (i)"
+	"BochsIA32Plugin Cog-eem.276 (i)"
 #else
-	"BochsIA32Plugin Cog-eem.275 (e)"
+	"BochsIA32Plugin Cog-eem.276 (e)"
 #endif
 ;
 
 
 	/* BochsPlugin>>#forceStopOnInterrupt */
-static sqInt
+static void
 forceStopOnInterrupt(void)
 {
 	if (getInterruptPending()) {
@@ -165,7 +165,7 @@
 	string for the instruction at address in memory.
  */
 
-	/* BochsPlugin>>#primitiveDisassembleAtInMemory */
+	/* BochsPlugin>>#primitiveDisassembleAt:InMemory: */
 EXPORT(sqInt)
 primitiveDisassembleAtInMemory(void)
 {
@@ -173,14 +173,13 @@
 	void *cpu;
 	sqInt cpuAlien;
 	sqInt instrLenOrErr;
-	sqInt log;
-	sqInt logLen;
+	char *log;
+	long logLen;
 	sqInt logObj;
-	sqInt logObjData;
+	char *logObjData;
 	char *memory;
 	sqInt resultObj;
 
-	logLen = 0;
 	address = (BytesPerOop == 4
 		? positive32BitValueOf(stackValue(1))
 		: positive64BitValueOf(stackValue(1)));
@@ -190,9 +189,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -231,12 +230,11 @@
 primitiveErrorAndLog(void)
 {
 	char *log;
-	sqInt logLen;
+	long logLen;
 	sqInt logObj;
 	char *logObjData;
 	sqInt resultObj;
 
-	logLen = 0;
 	log = getlog((&logLen));
 	resultObj = instantiateClassindexableSize(classArray(), 2);
 	if (resultObj == 0) {
@@ -270,7 +268,7 @@
 /*	<Integer> */
 /*	Flush the icache in the requested range */
 
-	/* BochsPlugin>>#primitiveFlushICacheFromTo */
+	/* BochsPlugin>>#primitiveFlushICacheFrom:To: */
 EXPORT(sqInt)
 primitiveFlushICacheFromTo(void)
 {
@@ -289,9 +287,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -335,9 +333,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -364,7 +362,7 @@
 	exception. 
  */
 
-	/* BochsPlugin>>#primitiveRunInMemoryMinAddressMaxAddressReadWrite */
+	/* BochsPlugin>>#primitiveRunInMemory:minimumAddress:maximumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveRunInMemoryMinAddressMaxAddressReadWrite(void)
 {
@@ -392,9 +390,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -426,7 +424,7 @@
 	exception. 
  */
 
-	/* BochsPlugin>>#primitiveRunInMemoryMinimumAddressReadWrite */
+	/* BochsPlugin>>#primitiveRunInMemory:minimumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveRunInMemoryMinimumAddressReadWrite(void)
 {
@@ -449,9 +447,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -482,7 +480,7 @@
 	following arguments defining valid addresses.
  */
 
-	/* BochsPlugin>>#primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite */
+	/* BochsPlugin>>#primitiveSingleStepInMemory:minimumAddress:maximumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void)
 {
@@ -510,9 +508,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -538,7 +536,7 @@
 	following arguments defining valid addresses.
  */
 
-	/* BochsPlugin>>#primitiveSingleStepInMemoryMinimumAddressReadWrite */
+	/* BochsPlugin>>#primitiveSingleStepInMemory:minimumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveSingleStepInMemoryMinimumAddressReadWrite(void)
 {
@@ -561,9 +559,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -640,6 +638,7 @@
 sqAssert(sqInt aBool)
 {
 	/* missing DebugCode */;
+	return aBool;
 }
 
 

Modified: branches/Cog/src/plugins/BochsX64Plugin/BochsX64Plugin.c
===================================================================
--- branches/Cog/src/plugins/BochsX64Plugin/BochsX64Plugin.c	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/src/plugins/BochsX64Plugin/BochsX64Plugin.c	2015-09-15 23:26:22 UTC (rev 3438)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1453 uuid: baf34f5d-4d8d-4f5f-b74a-1d76ecd08695
+	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
    from
-	BochsX64Plugin Cog-eem.275 uuid: cf385fb7-06ee-451f-8752-c60bb4a6d8ed
+	BochsX64Plugin Cog-eem.276 uuid: 275e1449-aee4-4bc6-9cb9-ebd2448d3dd7
  */
-static char __buildInfo[] = "BochsX64Plugin Cog-eem.275 uuid: cf385fb7-06ee-451f-8752-c60bb4a6d8ed " __DATE__ ;
+static char __buildInfo[] = "BochsX64Plugin Cog-eem.276 uuid: 275e1449-aee4-4bc6-9cb9-ebd2448d3dd7 " __DATE__ ;
 
 
 
@@ -44,7 +44,7 @@
 
 
 /*** Function Prototypes ***/
-static sqInt forceStopOnInterrupt(void);
+static void forceStopOnInterrupt(void);
 EXPORT(const char*) getModuleName(void);
 static sqInt positiveMachineIntegerFor(unsigned long value);
 EXPORT(sqInt) primitiveDisassembleAtInMemory(void);
@@ -119,15 +119,15 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"BochsX64Plugin Cog-eem.275 (i)"
+	"BochsX64Plugin Cog-eem.276 (i)"
 #else
-	"BochsX64Plugin Cog-eem.275 (e)"
+	"BochsX64Plugin Cog-eem.276 (e)"
 #endif
 ;
 
 
 	/* BochsPlugin>>#forceStopOnInterrupt */
-static sqInt
+static void
 forceStopOnInterrupt(void)
 {
 	if (getInterruptPending()) {
@@ -165,7 +165,7 @@
 	string for the instruction at address in memory.
  */
 
-	/* BochsPlugin>>#primitiveDisassembleAtInMemory */
+	/* BochsPlugin>>#primitiveDisassembleAt:InMemory: */
 EXPORT(sqInt)
 primitiveDisassembleAtInMemory(void)
 {
@@ -173,14 +173,13 @@
 	void *cpu;
 	sqInt cpuAlien;
 	sqInt instrLenOrErr;
-	sqInt log;
-	sqInt logLen;
+	char *log;
+	long logLen;
 	sqInt logObj;
-	sqInt logObjData;
+	char *logObjData;
 	char *memory;
 	sqInt resultObj;
 
-	logLen = 0;
 	address = (BytesPerOop == 4
 		? positive32BitValueOf(stackValue(1))
 		: positive64BitValueOf(stackValue(1)));
@@ -190,9 +189,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -231,12 +230,11 @@
 primitiveErrorAndLog(void)
 {
 	char *log;
-	sqInt logLen;
+	long logLen;
 	sqInt logObj;
 	char *logObjData;
 	sqInt resultObj;
 
-	logLen = 0;
 	log = getlog((&logLen));
 	resultObj = instantiateClassindexableSize(classArray(), 2);
 	if (resultObj == 0) {
@@ -270,7 +268,7 @@
 /*	<Integer> */
 /*	Flush the icache in the requested range */
 
-	/* BochsPlugin>>#primitiveFlushICacheFromTo */
+	/* BochsPlugin>>#primitiveFlushICacheFrom:To: */
 EXPORT(sqInt)
 primitiveFlushICacheFromTo(void)
 {
@@ -289,9 +287,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -335,9 +333,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -364,7 +362,7 @@
 	exception. 
  */
 
-	/* BochsPlugin>>#primitiveRunInMemoryMinAddressMaxAddressReadWrite */
+	/* BochsPlugin>>#primitiveRunInMemory:minimumAddress:maximumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveRunInMemoryMinAddressMaxAddressReadWrite(void)
 {
@@ -392,9 +390,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -426,7 +424,7 @@
 	exception. 
  */
 
-	/* BochsPlugin>>#primitiveRunInMemoryMinimumAddressReadWrite */
+	/* BochsPlugin>>#primitiveRunInMemory:minimumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveRunInMemoryMinimumAddressReadWrite(void)
 {
@@ -449,9 +447,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -482,7 +480,7 @@
 	following arguments defining valid addresses.
  */
 
-	/* BochsPlugin>>#primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite */
+	/* BochsPlugin>>#primitiveSingleStepInMemory:minimumAddress:maximumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void)
 {
@@ -510,9 +508,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -538,7 +536,7 @@
 	following arguments defining valid addresses.
  */
 
-	/* BochsPlugin>>#primitiveSingleStepInMemoryMinimumAddressReadWrite */
+	/* BochsPlugin>>#primitiveSingleStepInMemory:minimumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveSingleStepInMemoryMinimumAddressReadWrite(void)
 {
@@ -561,9 +559,9 @@
 	if (failed()) {
 		return null;
 	}
-	if (((cpu = ((longAt(cpuAlien + BaseHeaderSize)) > 0
+	if (((cpu = ((void *) (((longAt(cpuAlien + BaseHeaderSize)) > 0
 	? (cpuAlien + BaseHeaderSize) + BytesPerOop
-	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))) == 0) {
+	: longAt((cpuAlien + BaseHeaderSize) + BytesPerOop)))))) == 0) {
 		primitiveFailFor(PrimErrBadReceiver);
 		return null;
 	}
@@ -640,6 +638,7 @@
 sqAssert(sqInt aBool)
 {
 	/* missing DebugCode */;
+	return aBool;
 }
 
 

Modified: branches/Cog/src/plugins/GdbARMPlugin/GdbARMPlugin.c
===================================================================
--- branches/Cog/src/plugins/GdbARMPlugin/GdbARMPlugin.c	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/src/plugins/GdbARMPlugin/GdbARMPlugin.c	2015-09-15 23:26:22 UTC (rev 3438)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
    from
-	GdbARMPlugin Cog-eem.267 uuid: ff1bbadc-a019-45fb-954a-abfba8b25fdf
+	GdbARMPlugin Cog-eem.276 uuid: 275e1449-aee4-4bc6-9cb9-ebd2448d3dd7
  */
-static char __buildInfo[] = "GdbARMPlugin Cog-eem.267 uuid: ff1bbadc-a019-45fb-954a-abfba8b25fdf " __DATE__ ;
+static char __buildInfo[] = "GdbARMPlugin Cog-eem.276 uuid: 275e1449-aee4-4bc6-9cb9-ebd2448d3dd7 " __DATE__ ;
 
 
 
@@ -44,7 +44,7 @@
 
 
 /*** Function Prototypes ***/
-static sqInt forceStopOnInterrupt(void);
+static void forceStopOnInterrupt(void);
 EXPORT(const char*) getModuleName(void);
 EXPORT(sqInt) primitiveDisassembleAtInMemory(void);
 EXPORT(sqInt) primitiveErrorAndLog(void);
@@ -116,15 +116,15 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"GdbARMPlugin Cog-eem.267 (i)"
+	"GdbARMPlugin Cog-eem.276 (i)"
 #else
-	"GdbARMPlugin Cog-eem.267 (e)"
+	"GdbARMPlugin Cog-eem.276 (e)"
 #endif
 ;
 
 
 	/* GdbARMPlugin>>#forceStopOnInterrupt */
-static sqInt
+static void
 forceStopOnInterrupt(void)
 {
 	if (getInterruptPending()) {
@@ -153,7 +153,7 @@
 	string for the instruction at address in memory.
  */
 
-	/* GdbARMPlugin>>#primitiveDisassembleAtInMemory */
+	/* GdbARMPlugin>>#primitiveDisassembleAt:InMemory: */
 EXPORT(sqInt)
 primitiveDisassembleAtInMemory(void)
 {
@@ -258,7 +258,7 @@
 /*	<Integer> */
 /*	Flush the icache in the requested range */
 
-	/* GdbARMPlugin>>#primitiveFlushICacheFromTo */
+	/* GdbARMPlugin>>#primitiveFlushICacheFrom:To: */
 EXPORT(sqInt)
 primitiveFlushICacheFromTo(void)
 {
@@ -350,7 +350,7 @@
 	exception. 
  */
 
-	/* GdbARMPlugin>>#primitiveRunInMemoryMinAddressMaxAddressReadWrite */
+	/* GdbARMPlugin>>#primitiveRunInMemory:minimumAddress:maximumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveRunInMemoryMinAddressMaxAddressReadWrite(void)
 {
@@ -413,7 +413,7 @@
 	address AND the maximum executable address
  */
 
-	/* GdbARMPlugin>>#primitiveRunInMemoryMinimumAddressReadWrite */
+	/* GdbARMPlugin>>#primitiveRunInMemory:minimumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveRunInMemoryMinimumAddressReadWrite(void)
 {
@@ -470,7 +470,7 @@
 	hits an exception.
  */
 
-	/* GdbARMPlugin>>#primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite */
+	/* GdbARMPlugin>>#primitiveSingleStepInMemory:minimumAddress:maximumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveSingleStepInMemoryMinAddressMaxAddressReadWrite(void)
 {
@@ -531,7 +531,7 @@
 	following arguments defining valid addresses.
  */
 
-	/* GdbARMPlugin>>#primitiveSingleStepInMemoryMinimumAddressReadWrite */
+	/* GdbARMPlugin>>#primitiveSingleStepInMemory:minimumAddress:readOnlyBelow: */
 EXPORT(sqInt)
 primitiveSingleStepInMemoryMinimumAddressReadWrite(void)
 {
@@ -632,6 +632,7 @@
 sqAssert(sqInt aBool)
 {
 	/* missing DebugCode */;
+	return aBool;
 }
 
 

Modified: branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
===================================================================
--- branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c	2015-09-15 23:26:22 UTC (rev 3438)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.1446 uuid: 9ab44a24-1f54-4c21-b99a-3977d5ecc0a1
+	VMPluginCodeGenerator VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
    from
-	ThreadedARMFFIPlugin VMMaker.oscog-eem.1446 uuid: 9ab44a24-1f54-4c21-b99a-3977d5ecc0a1
+	ThreadedARMFFIPlugin VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
  */
-static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-eem.1446 uuid: 9ab44a24-1f54-4c21-b99a-3977d5ecc0a1 " __DATE__ ;
+static char __buildInfo[] = "ThreadedARMFFIPlugin VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8 " __DATE__ ;
 
 
 
@@ -151,6 +151,7 @@
 
 
 /*** Constants ***/
+#define Byte0Mask 0xFF
 #define DefaultMaxStackSize 16384
 #define ExternalFunctionArgTypesIndex 2
 #define ExternalFunctionFlagsIndex 1
@@ -456,9 +457,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"ARM32FFIPlugin VMMaker.oscog-eem.1446 (i)"
+	"ARM32FFIPlugin VMMaker.oscog-eem.1455 (i)"
 #else
-	"ARM32FFIPlugin VMMaker.oscog-eem.1446 (e)"
+	"ARM32FFIPlugin VMMaker.oscog-eem.1455 (e)"
 #endif
 ;
 
@@ -1122,7 +1123,8 @@
 						}
 						return 0;
 					}
-					if (isAlien) {
+					if (isAlien
+					 || (oopClass == (classExternalAddress()))) {
 						/* begin ffiPushPointer:in: */
 						pointer2 = pointerForOop(((longAt(oop + BaseHeaderSize)) > 0
 							? (oop + BaseHeaderSize) + BytesPerOop
@@ -1438,7 +1440,8 @@
 			}
 			return 0;
 		}
-		if (isAlien) {
+		if (isAlien
+		 || (oopClass == (classExternalAddress()))) {
 			/* begin ffiPushPointer:in: */
 			pointer2 = pointerForOop(((longAt(oop + BaseHeaderSize)) > 0
 				? (oop + BaseHeaderSize) + BytesPerOop
@@ -1840,13 +1843,7 @@
 			? (atomicType & 1
 					? signed64BitIntegerFor(intRet)
 					: positive64BitIntegerFor(intRet))
-			: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet & Byte0Mask));
 	l1:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	return methodReturnValue(oop);
@@ -2339,13 +2336,7 @@
 			? (atomicType & 1
 					? signed64BitIntegerFor(intRet)
 					: positive64BitIntegerFor(intRet))
-			: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet & Byte0Mask));
 	l5:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	result = methodReturnValue(oop3);
@@ -2459,13 +2450,7 @@
 		? (atomicType & 1
 				? signed64BitIntegerFor(retVal)
 				: positive64BitIntegerFor(retVal))
-		: characterObjectOf(retVal & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+		: characterObjectOf(retVal & Byte0Mask));
 }
 
 
@@ -4326,13 +4311,7 @@
 				? (atomicType & 1
 						? signed64BitIntegerFor(intRet)
 						: positive64BitIntegerFor(intRet))
-				: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+				: characterObjectOf(intRet & Byte0Mask));
 		l11:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 		}
 		result1 = methodReturnValue(oop3);
@@ -4783,13 +4762,7 @@
 			? (atomicType2 & 1
 					? signed64BitIntegerFor(intRet1)
 					: positive64BitIntegerFor(intRet1))
-			: characterObjectOf(intRet1 & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet1 & Byte0Mask));
 	l14:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	result2 = methodReturnValue(oop4);
@@ -5380,13 +5353,7 @@
 				? (atomicType & 1
 						? signed64BitIntegerFor(intRet)
 						: positive64BitIntegerFor(intRet))
-				: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+				: characterObjectOf(intRet & Byte0Mask));
 		l11:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 		}
 		result1 = methodReturnValue(oop3);
@@ -5843,13 +5810,7 @@
 			? (atomicType2 & 1
 					? signed64BitIntegerFor(intRet1)
 					: positive64BitIntegerFor(intRet1))
-			: characterObjectOf(intRet1 & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet1 & Byte0Mask));
 	l14:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	result2 = methodReturnValue(oop4);

Modified: branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
===================================================================
--- branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c	2015-09-15 02:00:26 UTC (rev 3437)
+++ branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c	2015-09-15 23:26:22 UTC (rev 3438)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.1446 uuid: 9ab44a24-1f54-4c21-b99a-3977d5ecc0a1
+	VMPluginCodeGenerator VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
    from
-	ThreadedIA32FFIPlugin VMMaker.oscog-eem.1446 uuid: 9ab44a24-1f54-4c21-b99a-3977d5ecc0a1
+	ThreadedIA32FFIPlugin VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8
  */
-static char __buildInfo[] = "ThreadedIA32FFIPlugin VMMaker.oscog-eem.1446 uuid: 9ab44a24-1f54-4c21-b99a-3977d5ecc0a1 " __DATE__ ;
+static char __buildInfo[] = "ThreadedIA32FFIPlugin VMMaker.oscog-eem.1455 uuid: 79b98152-ce26-4bf5-a737-3d8b41450be8 " __DATE__ ;
 
 
 
@@ -145,6 +145,7 @@
 
 
 /*** Constants ***/
+#define Byte0Mask 0xFF
 #define DefaultMaxStackSize 16384
 #define ExternalFunctionArgTypesIndex 2
 #define ExternalFunctionFlagsIndex 1
@@ -447,9 +448,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"IA32FFIPlugin VMMaker.oscog-eem.1446 (i)"
+	"IA32FFIPlugin VMMaker.oscog-eem.1455 (i)"
 #else
-	"IA32FFIPlugin VMMaker.oscog-eem.1446 (e)"
+	"IA32FFIPlugin VMMaker.oscog-eem.1455 (e)"
 #endif
 ;
 
@@ -1006,7 +1007,8 @@
 						(calloutState->currentArg = ((calloutState->currentArg)) + 4);
 						return 0;
 					}
-					if (isAlien) {
+					if (isAlien
+					 || (oopClass == (classExternalAddress()))) {
 						/* begin ffiPushPointer:in: */
 						pointer2 = pointerForOop(((longAt(oop + BaseHeaderSize)) > 0
 							? (oop + BaseHeaderSize) + BytesPerOop
@@ -1275,7 +1277,8 @@
 			(calloutState->currentArg = ((calloutState->currentArg)) + 4);
 			return 0;
 		}
-		if (isAlien) {
+		if (isAlien
+		 || (oopClass == (classExternalAddress()))) {
 			/* begin ffiPushPointer:in: */
 			pointer2 = pointerForOop(((longAt(oop + BaseHeaderSize)) > 0
 				? (oop + BaseHeaderSize) + BytesPerOop
@@ -1440,7 +1443,7 @@
 	/* begin atomicTypeOf: */
 	typeSpec = (calloutState->ffiRetHeader);
 	atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;
-	if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		floatRet = dispatchFunctionPointer(((double (*)()) procAddr));
 	}
 	else {
@@ -1601,7 +1604,7 @@
 		}
 		return oop;
 	}
-	if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		oop = floatObjectOf(floatRet);
 	}
 	else {
@@ -1652,13 +1655,7 @@
 			? (atomicType & 1
 					? signed64BitIntegerFor(intRet)
 					: positive64BitIntegerFor(intRet))
-			: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet & Byte0Mask));
 	l1:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	return methodReturnValue(oop);
@@ -1919,7 +1916,7 @@
 	/* begin atomicTypeOf: */
 	typeSpec = (calloutState->ffiRetHeader);
 	atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;
-	if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		floatRet = dispatchFunctionPointer(((double (*)()) (((void *) address))));
 	}
 	else {
@@ -2081,7 +2078,7 @@
 		result = oop3;
 		goto l7;
 	}
-	if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		oop3 = floatObjectOf(floatRet);
 	}
 	else {
@@ -2132,13 +2129,7 @@
 			? (atomicType & 1
 					? signed64BitIntegerFor(intRet)
 					: positive64BitIntegerFor(intRet))
-			: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet & Byte0Mask));
 	l5:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	result = methodReturnValue(oop3);
@@ -2252,13 +2243,7 @@
 		? (atomicType & 1
 				? signed64BitIntegerFor(retVal)
 				: positive64BitIntegerFor(retVal))
-		: characterObjectOf(retVal & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+		: characterObjectOf(retVal & Byte0Mask));
 }
 
 
@@ -3653,7 +3638,7 @@
 		/* begin atomicTypeOf: */
 		typeSpec = (calloutState->ffiRetHeader);
 		atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;
-		if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+		if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 			floatRet = dispatchFunctionPointer(((double (*)()) (((void *) address))));
 		}
 		else {
@@ -3815,7 +3800,7 @@
 			result1 = oop3;
 			goto l13;
 		}
-		if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+		if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 			oop3 = floatObjectOf(floatRet);
 		}
 		else {
@@ -3866,13 +3851,7 @@
 				? (atomicType & 1
 						? signed64BitIntegerFor(intRet)
 						: positive64BitIntegerFor(intRet))
-				: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+				: characterObjectOf(intRet & Byte0Mask));
 		l11:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 		}
 		result1 = methodReturnValue(oop3);
@@ -4092,7 +4071,7 @@
 	/* begin atomicTypeOf: */
 	typeSpec2 = (calloutState1->ffiRetHeader);
 	atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;
-	if ((((usqInt) atomicType2) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		floatRet1 = dispatchFunctionPointer(((double (*)()) (((void *) address1))));
 	}
 	else {
@@ -4254,7 +4233,7 @@
 		result2 = oop4;
 		goto l16;
 	}
-	if ((((usqInt) atomicType2) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		oop4 = floatObjectOf(floatRet1);
 	}
 	else {
@@ -4305,13 +4284,7 @@
 			? (atomicType2 & 1
 					? signed64BitIntegerFor(intRet1)
 					: positive64BitIntegerFor(intRet1))
-			: characterObjectOf(intRet1 & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet1 & Byte0Mask));
 	l14:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	result2 = methodReturnValue(oop4);
@@ -4669,7 +4642,7 @@
 		/* begin atomicTypeOf: */
 		typeSpec = (calloutState->ffiRetHeader);
 		atomicType = ((usqInt) (typeSpec & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;
-		if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+		if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 			floatRet = dispatchFunctionPointer(((double (*)()) (((void *) address))));
 		}
 		else {
@@ -4831,7 +4804,7 @@
 			result1 = oop3;
 			goto l13;
 		}
-		if ((((usqInt) atomicType) >> 1) == (FFITypeSingleFloat > 1)) {
+		if ((((usqInt) atomicType) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 			oop3 = floatObjectOf(floatRet);
 		}
 		else {
@@ -4882,13 +4855,7 @@
 				? (atomicType & 1
 						? signed64BitIntegerFor(intRet)
 						: positive64BitIntegerFor(intRet))
-				: characterObjectOf(intRet & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+				: characterObjectOf(intRet & Byte0Mask));
 		l11:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 		}
 		result1 = methodReturnValue(oop3);
@@ -5114,7 +5081,7 @@
 	/* begin atomicTypeOf: */
 	typeSpec2 = (calloutState1->ffiRetHeader);
 	atomicType2 = ((usqInt) (typeSpec2 & FFIAtomicTypeMask)) >> FFIAtomicTypeShift;
-	if ((((usqInt) atomicType2) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		floatRet1 = dispatchFunctionPointer(((double (*)()) (((void *) address1))));
 	}
 	else {
@@ -5276,7 +5243,7 @@
 		result2 = oop4;
 		goto l16;
 	}
-	if ((((usqInt) atomicType2) >> 1) == (FFITypeSingleFloat > 1)) {
+	if ((((usqInt) atomicType2) >> 1) == (((usqInt) FFITypeSingleFloat) >> 1)) {
 		oop4 = floatObjectOf(floatRet1);
 	}
 	else {
@@ -5327,13 +5294,7 @@
 			? (atomicType2 & 1
 					? signed64BitIntegerFor(intRet1)
 					: positive64BitIntegerFor(intRet1))
-			: characterObjectOf(intRet1 & (
-#if SPURVM
-	0xFFFFFFFFUL
-#else /* SPURVM */
-	0xFF
-#endif /* SPURVM */
-	)));
+			: characterObjectOf(intRet1 & Byte0Mask));
 	l14:	/* end ffiCreateIntegralResultOop:ofAtomicType:in: */;
 	}
 	result2 = methodReturnValue(oop4);



More information about the Vm-dev mailing list