[Vm-dev] [commit][3313] CogVM source as per VMMaker.oscog-eem.1241

commits at squeakvm.org commits at squeakvm.org
Wed Apr 22 18:36:20 UTC 2015


Revision: 3313
Author:   eliot
Date:     2015-04-22 11:36:16 -0700 (Wed, 22 Apr 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1241

Change source file output for the Cogit so that cogit.c includes cogitARMv5.c
or cogitIA32.c as appropriate, using the same style as ThreadedFFIPlugin.

Add builds for the ARMv5 Cogit.

Changed the names of register allocation methods for more explict names, for
instance, allocateOneReg -> allocateRegForStackTop.

Cogit:
Change map generation and interpretation so that the displacements are in
codeGranularity units, and make the codeGranularity 4 on ARM.  Comment
machineCodeSize and maxSize.

Introduce UnfailingPrimitive and use it to avoid generating the interpreter
primitive call in Spur the Character>>asInteger primitive.

Revise Call/Jump terminology using CallFull/JumpFull for calls/jumps anywhere in
the address space.  Makes no difference to x86 but is operative on ARM.  ARM
call/branch ranges use immediate call/jump for all intra-zone transfers, and
5 instruction sequences only for trampoline and interpreter primitive calls.

- Change the code generation of == for Spur; only check for forwarders if
  operands differ.
- Change the code generation of == for sistaCogit
- change the counter reg to be allocated instead of being a fixed abstract reg
- fix a C code gen bug in code gen of #==
- fix a bug in #== where the arg was not unforwarded

Use new register allocation in #== with V3 in order to limit register moves.

Modified Paths:
--------------
    branches/Cog/build.linux32ARM/makeall
    branches/Cog/build.linux32ARM/makeproduct
    branches/Cog/nsspursrc/vm/cogit.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cogit.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cogit.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstack64src/vm/gcc3x-interp.c
    branches/Cog/spurstack64src/vm/interp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

Added Paths:
-----------
    branches/Cog/build.linux32ARM/squeak.cog.spur/
    branches/Cog/build.linux32ARM/squeak.cog.spur/build/
    branches/Cog/build.linux32ARM/squeak.cog.spur/build/mvm
    branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.ext
    branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.int
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/mvm
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.ext
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.int
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/mvm
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.ext
    branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.int
    branches/Cog/build.linux32ARM/squeak.cog.spur/makeallclean
    branches/Cog/build.linux32ARM/squeak.cog.spur/makealldirty
    branches/Cog/nsspursrc/vm/cogitARMv5.c
    branches/Cog/nsspursrc/vm/cogitIA32.c
    branches/Cog/spursrc/vm/cogitARMv5.c
    branches/Cog/spursrc/vm/cogitIA32.c
    branches/Cog/src/vm/cogitARMv5.c
    branches/Cog/src/vm/cogitIA32.c

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

Modified: branches/Cog/build.linux32ARM/makeall
===================================================================
--- branches/Cog/build.linux32ARM/makeall	2015-04-17 19:34:25 UTC (rev 3312)
+++ branches/Cog/build.linux32ARM/makeall	2015-04-22 18:36:16 UTC (rev 3313)
@@ -1,6 +1,6 @@
 #!/bin/bash
 trap 'exit 2' HUP INT PIPE TERM
-for d in squeak.*; do
+for d in newspeak.* squeak.*; do
 	if test -d "$d"; then
 		(cd $d;./makeallclean "$@")
 	else

Modified: branches/Cog/build.linux32ARM/makeproduct
===================================================================
--- branches/Cog/build.linux32ARM/makeproduct	2015-04-17 19:34:25 UTC (rev 3312)
+++ branches/Cog/build.linux32ARM/makeproduct	2015-04-22 18:36:16 UTC (rev 3313)
@@ -1,6 +1,6 @@
 #!/bin/bash
 trap 'exit 2' HUP INT PIPE TERM
-for d in newspeak.cog.spur squeak.cog.spur squeak.cog.v3; do
+for d in newspeak.cog.spur squeak.cog.spur squeak.cog.v3 squeak.stack.spur squeak.stack.v3; do
 	if test -d "$d"; then
 		(cd $d;./makeallclean "$@")
 	else

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build/mvm
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build/mvm	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build/mvm	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,32 @@
+#!/bin/bash
+# Spur VM with VM profiler and threaded heartbeat
+INSTALLDIR=cogspurlinuxht
+# Some gcc versions create a broken VM using -O2
+case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
+3.4.*)	OPT="-g -O1 -DNDEBUG -DDEBUGVM=0";;
+*)		OPT="-g -O2 -DNDEBUG -DDEBUGVM=0";;
+esac
+
+if [ $# -ge 1 ]; then
+	INSTALLDIR="$1"; shift
+fi
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
+		--with-vmversion=5.0 \
+		--with-src=spursrc --with-plugins=src/plugins \
+	CC="gcc -m32" \
+	CXX="g++ -m32" \
+	CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+rm -f vm/sqUnixMain.o # nuke version info
+rm -rf ../../../products/$INSTALLDIR
+# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG


Property changes on: branches/Cog/build.linux32ARM/squeak.cog.spur/build/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.ext
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.ext	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.ext	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,12 @@
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+B3DAcceleratorPlugin \
+BochsIA32Plugin \
+GdbARMPlugin \
+SqueakFFIPrims \
+SqueakSSL \
+LocalePlugin \
+UnicodePlugin \
+UnixOSProcessPlugin \
+UUIDPlugin \
+XDisplayControlPlugin

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.int
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.int	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build/plugins.int	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,37 @@
+# Copied, perhaps edited, from ../../src/examplePlugins.int
+INTERNAL_PLUGINS = \
+ADPCMCodecPlugin \
+AioPlugin \
+AsynchFilePlugin \
+B2DPlugin \
+BitBltPlugin \
+BMPReadWriterPlugin \
+CroquetPlugin \
+ZipPlugin \
+DropPlugin \
+DSAPrims \
+FFTPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+IA32ABI \
+JoystickTabletPlugin \
+JPEGReaderPlugin \
+JPEGReadWriter2Plugin \
+Klatt \
+LargeIntegers \
+Matrix2x3Plugin \
+MIDIPlugin \
+MiscPrimitivePlugin \
+Mpeg3Plugin \
+RePlugin \
+SecurityPlugin \
+SerialPlugin \
+SocketPlugin \
+SoundCodecPrims \
+SoundGenerationPlugin \
+SoundPlugin \
+StarSqueakPlugin \
+SurfacePlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/mvm
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/mvm	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/mvm	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,28 @@
+#!/bin/bash
+# assert VM with VM profiler and threaded heartbeat
+INSTALLDIR=assert/cogspurlinuxht
+OPT="-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0"
+
+if [ $# -ge 1 ]; then
+	INSTALLDIR="$1"; shift
+fi
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
+		--with-vmversion=5.0 \
+		--with-src=spursrc --with-plugins=src/plugins \
+	CC="gcc -m32" \
+	CXX="g++ -m32" \
+	CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+rm -f vm/sqUnixMain.o # nuke version info
+rm -rf ../../../products/$INSTALLDIR
+# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG


Property changes on: branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.ext
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.ext	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.ext	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,12 @@
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+B3DAcceleratorPlugin \
+BochsIA32Plugin \
+GdbARMPlugin \
+SqueakFFIPrims \
+SqueakSSL \
+LocalePlugin \
+UnicodePlugin \
+UnixOSProcessPlugin \
+UUIDPlugin \
+XDisplayControlPlugin

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.int
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.int	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build.assert/plugins.int	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,37 @@
+# Copied, perhaps edited, from ../../src/examplePlugins.int
+INTERNAL_PLUGINS = \
+ADPCMCodecPlugin \
+AioPlugin \
+AsynchFilePlugin \
+B2DPlugin \
+BitBltPlugin \
+BMPReadWriterPlugin \
+CroquetPlugin \
+ZipPlugin \
+DropPlugin \
+DSAPrims \
+FFTPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+IA32ABI \
+JoystickTabletPlugin \
+JPEGReaderPlugin \
+JPEGReadWriter2Plugin \
+Klatt \
+LargeIntegers \
+Matrix2x3Plugin \
+MIDIPlugin \
+MiscPrimitivePlugin \
+Mpeg3Plugin \
+RePlugin \
+SecurityPlugin \
+SerialPlugin \
+SocketPlugin \
+SoundCodecPrims \
+SoundGenerationPlugin \
+SoundPlugin \
+StarSqueakPlugin \
+SurfacePlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/mvm
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/mvm	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/mvm	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,28 @@
+#!/bin/bash
+# debug Spur VM with VM profiler and threaded heartbeat
+INSTALLDIR=debug/cogspurlinuxht
+OPT="-g3 -O0 -DDEBUGVM=1"
+
+if [ $# -ge 1 ]; then
+	INSTALLDIR="$1"; shift
+fi
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak \
+		--with-vmversion=5.0 \
+		--with-src=spursrc --with-plugins=src/plugins \
+	CC="gcc -m32" \
+	CXX="g++ -m32" \
+	CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+rm -f vm/sqUnixMain.o # nuke version info
+rm -rf ../../../products/$INSTALLDIR
+# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG


Property changes on: branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.ext
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.ext	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.ext	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,12 @@
+# Copied, perhaps edited, from ../../src/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+B3DAcceleratorPlugin \
+BochsIA32Plugin \
+GdbARMPlugin \
+SqueakFFIPrims \
+SqueakSSL \
+LocalePlugin \
+UnicodePlugin \
+UnixOSProcessPlugin \
+UUIDPlugin \
+XDisplayControlPlugin

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.int
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.int	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/build.debug/plugins.int	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,37 @@
+# Copied, perhaps edited, from ../../src/examplePlugins.int
+INTERNAL_PLUGINS = \
+ADPCMCodecPlugin \
+AioPlugin \
+AsynchFilePlugin \
+B2DPlugin \
+BitBltPlugin \
+BMPReadWriterPlugin \
+CroquetPlugin \
+ZipPlugin \
+DropPlugin \
+DSAPrims \
+FFTPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+IA32ABI \
+JoystickTabletPlugin \
+JPEGReaderPlugin \
+JPEGReadWriter2Plugin \
+Klatt \
+LargeIntegers \
+Matrix2x3Plugin \
+MIDIPlugin \
+MiscPrimitivePlugin \
+Mpeg3Plugin \
+RePlugin \
+SecurityPlugin \
+SerialPlugin \
+SocketPlugin \
+SoundCodecPrims \
+SoundGenerationPlugin \
+SoundPlugin \
+StarSqueakPlugin \
+SurfacePlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/makeallclean	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,6 @@
+#!/bin/sh
+trap 'exit 2' HUP INT PIPE TERM
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm "$@")
+done


Property changes on: branches/Cog/build.linux32ARM/squeak.cog.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32ARM/squeak.cog.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32ARM/squeak.cog.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32ARM/squeak.cog.spur/makealldirty	2015-04-22 18:36:16 UTC (rev 3313)
@@ -0,0 +1,6 @@
+#!/bin/sh
+trap 'exit 2' HUP INT PIPE TERM
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm "$@")
+done


Property changes on: branches/Cog/build.linux32ARM/squeak.cog.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Modified: branches/Cog/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c	2015-04-17 19:34:25 UTC (rev 3312)
+++ branches/Cog/nsspursrc/vm/cogit.c	2015-04-22 18:36:16 UTC (rev 3313)
@@ -1,23954 +1,16 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1207 uuid: 4a338677-029f-42ac-b38d-2bc5ecc213f1
-   from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1207 uuid: 4a338677-029f-42ac-b38d-2bc5ecc213f1
+	Cogit VMMaker.oscog-eem.1237 uuid: 0864d0ce-8b0f-4415-ab43-13e2581488d5
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1207 uuid: 4a338677-029f-42ac-b38d-2bc5ecc213f1 " __DATE__ ;
-char *__cogitBuildInfo = __buildInfo;
 
+#if defined(__ARM_ARCH__) || defined(__arm__) || defined(__arm32__) || defined(ARM32)
 
+#	include "cogitARMv5.c"
 
-#include <stddef.h>
-#include "sq.h"
-#include "sqCogStackAlignment.h"
-#include "dispdbg.h"
-#include "cogmethod.h"
-#include "nssendcache.h"
-#if COGMTVM
-#include "cointerpmt.h"
-#else
-#include "cointerp.h"
-#endif
-#include "cogit.h"
+#elif defined(_M_I386) || defined(_X86_) || defined(i386) || defined(i486) || defined(i586) || defined(i686) || defined(__i386__) || defined(__386__) || defined(X86) || defined(I386)
 
-typedef struct _AbstractInstruction {
-	unsigned char	opcode;
-	unsigned char	machineCodeSize;
-	unsigned char	maxSize;
-	unsigned long		operands [3];
-	unsigned long	address;
-	struct _AbstractInstruction *dependent;
-	unsigned char		machineCode [10];
- } AbstractInstruction;
+#	include "cogitIA32.c"
 
-#define CogIA32Compiler AbstractInstruction
-
-
-typedef struct {
-	AbstractInstruction *fakeHeader;
-	AbstractInstruction *fillInstruction;
-	sqInt	numArgs;
-	sqInt	numCopied;
-	sqInt	numInitialNils;
-	sqInt	startpc;
-	AbstractInstruction *entryLabel;
-	AbstractInstruction *stackCheckLabel;
-	sqInt	span;
- } BlockStart;
-
-#define CogBlockStart BlockStart
-
-
-typedef struct _BytecodeDescriptor {
-	sqInt (*generator )(void);
-	sqInt (*spanFunction )(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt);
-	sqInt (*needsFrameFunction )(sqInt);
-	signed char	stackDelta;
-	unsigned char	opcode;
-	unsigned char	numBytes;
-	unsigned		isBranchTrue : 1;
-	unsigned		isBranchFalse : 1;
-	unsigned		isReturn : 1;
-	unsigned		isBlockCreation : 1;
-	unsigned		isMapped : 1;
-	unsigned		isMappedInBlock : 1;
-	unsigned		isExtension : 1;
-	unsigned		hasIRC : 1;
- } BytecodeDescriptor;
-
-#define CogBytecodeDescriptor BytecodeDescriptor
-
-
-typedef struct {
-	sqInt	annotation;
-	AbstractInstruction *instruction;
- } InstructionAnnotation;
-
-#define CogInstructionAnnotation InstructionAnnotation
-
-
-typedef struct {
-	sqInt (*primitiveGenerator )(void);
-	sqInt	primNumArgs;
-	sqInt (*enabled )(sqInt);
- } PrimitiveDescriptor;
-
-#define CogPrimitiveDescriptor PrimitiveDescriptor
-
-
-typedef struct {
-	AbstractInstruction *targetInstruction;
-	sqInt	instructionIndex;
-	sqInt	simStackPtr;
- } BytecodeFixup;
-
-#define CogSSBytecodeFixup BytecodeFixup
-
-
-typedef struct {
-	char	type;
-	char	spilled;
-	char	annotateUse;
-	sqInt	registerr;
-	sqInt	offset;
-	sqInt	constant;
-	sqInt	bcptr;
- } CogSimStackEntry;
-
-
-typedef struct {
-	sqInt	isReceiverResultRegLive;
-	CogSimStackEntry *ssEntry;
- } CogSSOptStatus;
-
-
-
-/*** Constants ***/
-#define AddCqR 95
-#define AddCwR 102
-#define AddRdRd 110
-#define AddRR 88
-#define AlignmentNops 2
-#define AltBlockCreationBytecodeSize 3
-#define AltFirstSpecialSelector 80
-#define AndCqR 97
-#define AndCqRR 108
-#define AndCwR 104
-#define AndRR 90
-#define AnnotationShift 5
-#define Arg0Reg -7
-#define Arg1Reg -8
-#define ArithmeticShiftRightCqR 81
-#define ArithmeticShiftRightRR 82
-#define BadRegisterSet 1
-#define BlockCreationBytecodeSize 4
-#define BytecodeSetHasDirectedSuperSend 0
-#define Call 9
-#define CallFull 10
-#define CDQ 117
-#define ClassArrayCompactIndex 51
-#define ClassBlockClosureCompactIndex 37
-#define ClassFloatCompactIndex 34
-#define ClassMethodContextCompactIndex 36
-#define ClassReg -5
-#define ClosureFirstCopiedValueIndex 3
-#define ClosureIndex 4
-#define ClosureNumArgsIndex 2
-#define ClosureOuterContextIndex 0
-#define ClosureStartPCIndex 1
-#define CMBlock 3
-#define CMClosedPIC 4
-#define CMFree 1
-#define CMMaxUsageCount 7
-#define CMMethod 2
-#define CMOpenPIC 5
-#define CMPXCHGAwR 125
-#define CMPXCHGMwrR 126
-#define CmpCqR 94
-#define CmpCwR 101
-#define CmpRdRd 109
-#define CmpRR 87
-#define ConstZero 1
-#define ConvertRRd 116
-#define CPUID 120
-#define Debug DEBUGVM
-#define DisplacementMask 0x1F
-#define DisplacementX2N 0
-#define DivRdRd 113
-#define DPFPReg0 -9
-#define DPFPReg1 -10
-#define DPFPReg2 -11
-#define DPFPReg3 -12
-#define DPFPReg4 -13
-#define DPFPReg5 -14
-#define DPFPReg6 -15
-#define DPFPReg7 -16
-#define EAX 0
-#define EBP 5
-#define EBX 3
-#define ECX 1
-#define EDI 7
-#define EDX 2
-#define EncounteredUnknownBytecode -6
-#define ESI 6
-#define ESP 4
-#define Fill16 5
-#define Fill32 6
-#define FillFromWord 7
-#define FirstAnnotation 64
-#define FirstJump 14
-#define FirstShortJump 18
-#define FirstSpecialSelector 176
-#define FoxCallerSavedIP 4
-#define FoxMethod -4
-#define FoxMFReceiver -12
-#define FoxSavedFP 0
-#define FoxThisContext -8
-#define FPReg -1
-#define GCModeBecome 8
-#define GCModeFull 1
-#define GCModeNewSpace 2
-#define GPRegMax -3
-#define GPRegMin -8
-#define HasBytecodePC 4
-#define HeaderIndex 0
-#define IDIVR 118
-#define IMULRR 119
-#define InstanceSpecificationIndex 2
-#define InstructionPointerIndex 1
-#define InsufficientCodeSpace -2
-#define IsAbsPCReference 3
-#define IsAnnotationExtension 1
-#define IsDirectedSuperSend 9
-#define IsDisplacementX2N 0
-#define IsNSDynamicSuperSend 11
-#define IsNSSelfSend 10
-#define IsNSSendCall 6
-#define IsObjectReference 2
-#define IsRelativeCall 5
-#define IsSendCall 7
-#define IsSuperSend 8
-#define Jump 18
-#define JumpAbove 33
-#define JumpAboveOrEqual 32
-#define JumpBelow 31
-#define JumpBelowOrEqual 34
-#define JumpCarry 25
-#define JumpFPEqual 35
-#define JumpFPGreater 39
-#define JumpFPGreaterOrEqual 40
-#define JumpFPLess 37
-#define JumpFPLessOrEqual 38
-#define JumpFPNotEqual 36
-#define JumpFPOrdered 41
-#define JumpFPUnordered 42
-#define JumpFull 14
-#define JumpGreater 29
-#define JumpGreaterOrEqual 28
-#define JumpLess 27
-#define JumpLessOrEqual 30
-#define JumpLong 15
-#define JumpLongNonZero 17
-#define JumpLongZero 16
-#define JumpNegative 21
-#define JumpNoCarry 26
-#define JumpNonNegative 22
-#define JumpNonZero 20
-#define JumpNoOverflow 24
-#define JumpOverflow 23
-#define JumpR 12
-#define JumpZero 19
-#define Label 1
-#define LargeContextSlots 62
-#define LastJump 42
-#define LFENCE 121
-#define LinkReg -17
-#define LOCK 124
-#define LoadEffectiveAddressMwrR 78
-#define LogicalShiftLeftCqR 85
-#define LogicalShiftLeftRR 86
-#define LogicalShiftRightCqR 83
-#define LogicalShiftRightRR 84
-#define MapEnd 0
-#define MaxCompiledPrimitiveIndex 222
-#define MaxMethodSize 65535
-#define MaxNegativeErrorCode -8
-#define MaxNumArgs 15
-#define MaxStackAllocSize 1572864
-#define MaxStackCheckOffset 0xFFF
-#define MaxX2NDisplacement 992
-#define MethodCacheClass 2
-#define MethodCacheMask 0xFFC
-#define MethodCacheMethod 3
-#define MethodCacheSelector 1
-#define MethodIndex 3
-#define MethodTooBig -4
-#define MFENCE 122
-#define MFMethodFlagHasContextFlag 1
-#define MFMethodFlagIsBlockFlag 2
-#define ModReg 3
-#define ModRegInd 0
-#define ModRegRegDisp32 2
-#define ModRegRegDisp8 1
-#define MoveAwR 44
-#define MoveCqR 66
-#define MoveCwR 67
-#define MoveM16rR 54
-#define MoveM64rRd 71
-#define MoveMbrR 62
-#define MoveMwrR 48
-#define MoveRAw 45
-#define MoveRdM64r 72
-#define MoveRdRd 70
-#define MoveRMbr 63
-#define MoveRMwr 49
-#define MoveRR 43
-#define MoveRXbrR 65
-#define MoveRXwrR 51
-#define MoveXbrRR 64
-#define MoveXwrRR 50
-#define MULTIPLEBYTECODESETS 1
-#define MulRdRd 112
-#define NegateR 80
-#define NewspeakVM 1
-#define Nop 8
-#define NotFullyInitialized -1
-#define NSCClassTagIndex 0
-#define NSCEnclosingObjectIndex 1
-#define NSCTargetIndex 2
-#define NumObjRefsInRuntime 0
-#define NumOopsPerNSC 6
-#define NumSendTrampolines 4
-#define NumTrampolines 70
-#define OrCqR 98
-#define OrCwR 105
-#define OrRR 91
-#define PCReg -19
-#define PopR 73
-#define PrefetchAw 77
-#define PrimCallCollectsProfileSamples 8
-#define PrimCallDoNotJIT 32
-#define PrimCallMayCallBack 4
-#define PrimCallNeedsNewMethod 1
-#define PrimCallNeedsPrimitiveFunction 2
-#define PrimErrWritePastObject 17
-#define PushCq 75
-#define PushCw 76
-#define PushR 74
-#define ReceiverIndex 5
-#define ReceiverResultReg -3
-#define RetN 11
-#define RISCTempReg -18
-#define SelectorCannotInterpret 34
-#define SelectorDoesNotUnderstand 20
-#define SenderIndex 0
-#define SendNumArgsReg -6
-#define SFENCE 123
-#define ShouldNotJIT -8
-#define SIB1 0
-#define SIB4 2
-#define SistaVM 0
-#define SmallContextSlots 22
-#define SPReg -2
-#define SqrtRd 115
-#define SSBaseOffset 1
-#define SSConstant 2
-#define SSRegister 3
-#define SSSpill 4
-#define StackPointerIndex 2
-#define Stop 13
-#define SubCqR 96
-#define SubCwR 103
-#define SubRdRd 111
-#define SubRR 89
-#define TempReg -4
-#define UnimplementedPrimitive -7
-#define ValueIndex 1
-#define VarBaseReg -20
-#define XCHGAwR 127
-#define XCHGMwrR 128
-#define XCHGRR 129
-#define XMM0L 0
-#define XMM1L 2
-#define XMM2L 4
-#define XMM3L 6
-#define XMM4L 8
-#define XMM5L 10
-#define XMM6L 12
-#define XMM7L 14
-#define XorCwR 106
-#define XorRR 92
-#define YoungSelectorInPIC -5
-
-
-/*** Function Prototypes ***/
-
-
-#if !PRODUCTION && defined(__GNUC__) && !defined(NoDbgRegParms)
-# define NoDbgRegParms __attribute__ ((regparm (0)))
+#else
+#	error As yet no Cogit implementation appears to exist for your platform.
+#	error Consider implementing it, starting by adding a subclass of CogAbstractInstruction.
 #endif
-
-#if !defined(NoDbgRegParms)
-# define NoDbgRegParms /*empty*/
-#endif
-
-
-
-#if defined(__GNUC__) && !defined(NeverInline)
-# define NeverInline __attribute__ ((noinline))
-#endif
-
-#if !defined(NeverInline)
-# define NeverInline /*empty*/
-#endif
-
-static sqInt abstractRegisterForConcreteRegister(AbstractInstruction * self_in_abstractRegisterForConcreteRegister, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * addDependent(AbstractInstruction * self_in_addDependent, AbstractInstruction *anInstruction) NoDbgRegParms;
-static sqInt availableRegisterOrNilFor(AbstractInstruction * self_in_availableRegisterOrNilFor, sqInt liveRegsMask) NoDbgRegParms;
-static sqInt genAlignCStackSavingRegistersnumArgswordAlignment(AbstractInstruction * self_in_genAlignCStackSavingRegistersnumArgswordAlignment, sqInt saveRegs, sqInt numArgs, sqInt alignment) NoDbgRegParms;
-static AbstractInstruction * generateICacheFlush(AbstractInstruction * self_in_generateICacheFlush) NoDbgRegParms;
-static AbstractInstruction * genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister) NoDbgRegParms;
-static AbstractInstruction * getJmpTarget(AbstractInstruction * self_in_getJmpTarget) NoDbgRegParms;
-static sqInt isAFixup(AbstractInstruction * self_in_isAFixup, void *fixupOrAddress) NoDbgRegParms;
-static sqInt isAnInstruction(AbstractInstruction * self_in_isAnInstruction, AbstractInstruction *addressOrInstruction) NoDbgRegParms;
-static sqInt isJump(AbstractInstruction * self_in_isJump) NoDbgRegParms;
-static sqInt isLongJump(AbstractInstruction * self_in_isLongJump) NoDbgRegParms;
-static unsigned long labelOffset(AbstractInstruction * self_in_labelOffset) NoDbgRegParms;
-static sqInt numICacheFlushOpcodes(AbstractInstruction * self_in_numICacheFlushOpcodes) NoDbgRegParms;
-static AbstractInstruction * resolveJumpTarget(AbstractInstruction * self_in_resolveJumpTarget) NoDbgRegParms;
-static sqInt rewriteCallFullAttarget(AbstractInstruction * self_in_rewriteCallFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress) NoDbgRegParms;
-static sqInt rewriteJumpFullAttarget(AbstractInstruction * self_in_rewriteJumpFullAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress) NoDbgRegParms;
-static sqInt setLabelOffset(AbstractInstruction * self_in_setLabelOffset, sqInt aValue) NoDbgRegParms;
-static AbstractInstruction * updateLabel(AbstractInstruction * self_in_updateLabel, AbstractInstruction *labelInstruction) NoDbgRegParms;
-static sqInt wantsNearAddressFor(AbstractInstruction * self_in_wantsNearAddressFor, sqInt anObject) NoDbgRegParms;
-static CogMethod * cmHomeMethod(CogBlockMethod * self_in_cmHomeMethod) NoDbgRegParms;
-static sqInt isBranch(BytecodeDescriptor * self_in_isBranch) NoDbgRegParms;
-static sqInt isUnconditionalBranch(BytecodeDescriptor * self_in_isUnconditionalBranch) NoDbgRegParms;
-static sqInt callerSavedRegisterMask(AbstractInstruction * self_in_callerSavedRegisterMask) NoDbgRegParms;
-static sqInt callInstructionByteSize(AbstractInstruction * self_in_callInstructionByteSize) NoDbgRegParms;
-static sqInt callTargetFromReturnAddress(AbstractInstruction * self_in_callTargetFromReturnAddress, sqInt callSiteReturnAddress) NoDbgRegParms;
-static sqInt computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) NoDbgRegParms;
-static usqInt computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize) NoDbgRegParms;
-static sqInt concreteDPFPRegister(AbstractInstruction * self_in_concreteDPFPRegister, sqInt registerIndex) NoDbgRegParms;
-static sqInt concreteRegister(AbstractInstruction * self_in_concreteRegister, sqInt registerIndex) NoDbgRegParms;
-static sqInt concretizeAt(AbstractInstruction * self_in_concretizeAt, sqInt actualAddress) NoDbgRegParms;
-static usqInt concretizeFill16(AbstractInstruction * self_in_concretizeFill16) NoDbgRegParms;
-static usqInt concretizeFill32(AbstractInstruction * self_in_concretizeFill32) NoDbgRegParms;
-static usqInt concretizeFillFromWord(AbstractInstruction * self_in_concretizeFillFromWord) NoDbgRegParms;
-static sqInt cResultRegister(AbstractInstruction * self_in_cResultRegister) NoDbgRegParms;
-static void dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize) NoDbgRegParms;
-static AbstractInstruction * genDivRRQuoRem(AbstractInstruction * self_in_genDivRRQuoRem, sqInt abstractRegDivisor, sqInt abstractRegDividend, sqInt abstractRegQuotient, sqInt abstractRegRemainder) NoDbgRegParms;
-static AbstractInstruction * generateCheckFeatures(AbstractInstruction * self_in_generateCheckFeatures) NoDbgRegParms;
-static AbstractInstruction * generateLowLevelTryLock(AbstractInstruction * self_in_generateLowLevelTryLock, sqInt vmOwnerLockAddress) NoDbgRegParms;
-static AbstractInstruction * generateLowLevelUnlock(AbstractInstruction * self_in_generateLowLevelUnlock, sqInt vmOwnerLockAddress) NoDbgRegParms;
-static AbstractInstruction * genGetLeafCallStackPointerFunction(AbstractInstruction * self_in_genGetLeafCallStackPointerFunction) NoDbgRegParms;
-static sqInt genLoadCStackPointer(AbstractInstruction * self_in_genLoadCStackPointer) NoDbgRegParms;
-static sqInt genLoadCStackPointers(AbstractInstruction * self_in_genLoadCStackPointers) NoDbgRegParms;
-static sqInt genLoadStackPointers(AbstractInstruction * self_in_genLoadStackPointers) NoDbgRegParms;
-static AbstractInstruction * genMulRR(AbstractInstruction * self_in_genMulRR, sqInt regSource, sqInt regDest) NoDbgRegParms;
-static sqInt genPassConstasArgument(AbstractInstruction * self_in_genPassConstasArgument, sqInt constant, sqInt zeroRelativeArgIndex) NoDbgRegParms;
-static sqInt genPassRegasArgument(AbstractInstruction * self_in_genPassRegasArgument, sqInt abstractRegister, sqInt zeroRelativeArgIndex) NoDbgRegParms;
-static AbstractInstruction * genPushRegisterArgsForAbortMissNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForAbortMissNumArgs, sqInt numArgs) NoDbgRegParms;
-static AbstractInstruction * genPushRegisterArgsForNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForNumArgs, sqInt numArgs) NoDbgRegParms;
-static sqInt genRemoveNArgsFromStack(AbstractInstruction * self_in_genRemoveNArgsFromStack, sqInt n) NoDbgRegParms;
-static sqInt genRestoreRegs(AbstractInstruction * self_in_genRestoreRegs) NoDbgRegParms;
-static sqInt genRestoreRegsExcept(AbstractInstruction * self_in_genRestoreRegsExcept, sqInt abstractReg) NoDbgRegParms;
-static sqInt genSaveRegisters(AbstractInstruction * self_in_genSaveRegisters) NoDbgRegParms;
-static sqInt genSaveStackPointers(AbstractInstruction * self_in_genSaveStackPointers) NoDbgRegParms;
-static AbstractInstruction * genSubstituteReturnAddress(AbstractInstruction * self_in_genSubstituteReturnAddress, sqInt retpc) NoDbgRegParms;
-static sqInt hasLinkRegister(AbstractInstruction * self_in_hasLinkRegister) NoDbgRegParms;
-static sqInt hasSSE2Instructions(AbstractInstruction * self_in_hasSSE2Instructions) NoDbgRegParms;
-static sqInt hasSSEInstructions(AbstractInstruction * self_in_hasSSEInstructions) NoDbgRegParms;
-static sqInt implicitReceiveCacheAt(AbstractInstruction * self_in_implicitReceiveCacheAt, char *callSiteReturnAddress) NoDbgRegParms;
-static sqInt inlineCacheTagAt(AbstractInstruction * self_in_inlineCacheTagAt, sqInt callSiteReturnAddress) NoDbgRegParms;
-static sqInt instructionSizeAt(AbstractInstruction * self_in_instructionSizeAt, sqInt pc) NoDbgRegParms;
-static sqInt isCallPreceedingReturnPC(AbstractInstruction * self_in_isCallPreceedingReturnPC, sqInt mcpc) NoDbgRegParms;
-static sqInt isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc) NoDbgRegParms;
-static sqInt isPCDependent(AbstractInstruction * self_in_isPCDependent) NoDbgRegParms;
-static sqInt isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand) NoDbgRegParms;
-static AbstractInstruction * jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction) NoDbgRegParms;
-static sqInt jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize) NoDbgRegParms;
-static sqInt jumpLongConditionalByteSize(AbstractInstruction * self_in_jumpLongConditionalByteSize) NoDbgRegParms;
-static sqInt jumpLongTargetBeforeFollowingAddress(AbstractInstruction * self_in_jumpLongTargetBeforeFollowingAddress, sqInt mcpc) NoDbgRegParms;
-static sqInt jumpShortByteSize(AbstractInstruction * self_in_jumpShortByteSize) NoDbgRegParms;
-static sqInt jumpTargetPCAt(AbstractInstruction * self_in_jumpTargetPCAt, sqInt pc) NoDbgRegParms;
-static sqInt leafCallStackPointerDelta(AbstractInstruction * self_in_leafCallStackPointerDelta) NoDbgRegParms;
-static sqInt literalBeforeFollowingAddress(AbstractInstruction * self_in_literalBeforeFollowingAddress, sqInt followingAddress) NoDbgRegParms;
-static sqInt literalBeforeInlineCacheTagAt(AbstractInstruction * self_in_literalBeforeInlineCacheTagAt, sqInt callSiteReturnAddress) NoDbgRegParms;
-static sqInt loadLiteralByteSize(AbstractInstruction * self_in_loadLiteralByteSize) NoDbgRegParms;
-static sqInt machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes) NoDbgRegParms;
-static AbstractInstruction * maybeEstablishVarBase(AbstractInstruction * self_in_maybeEstablishVarBase) NoDbgRegParms;
-static sqInt modRMRO(AbstractInstruction * self_in_modRMRO, sqInt mod, sqInt regMode, sqInt regOpcode) NoDbgRegParms;
-static AbstractInstruction * nopsFromto(AbstractInstruction * self_in_nopsFromto, sqInt startAddr, sqInt endAddr) NoDbgRegParms;
-static sqInt numCheckFeaturesOpcodes(AbstractInstruction * self_in_numCheckFeaturesOpcodes) NoDbgRegParms;
-static sqInt numLowLevelLockOpcodes(AbstractInstruction * self_in_numLowLevelLockOpcodes) NoDbgRegParms;
-static AbstractInstruction * padIfPossibleWithNopsFromto(AbstractInstruction * self_in_padIfPossibleWithNopsFromto, sqInt startAddr, sqInt endAddr) NoDbgRegParms;
-static AbstractInstruction * relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta) NoDbgRegParms;
-static AbstractInstruction * relocateJumpBeforeFollowingAddressby(AbstractInstruction * self_in_relocateJumpBeforeFollowingAddressby, sqInt pc, sqInt delta) NoDbgRegParms;
-static AbstractInstruction * relocateMethodReferenceBeforeAddressby(AbstractInstruction * self_in_relocateMethodReferenceBeforeAddressby, sqInt pc, sqInt delta) NoDbgRegParms;
-static sqInt rewriteCallAttarget(AbstractInstruction * self_in_rewriteCallAttarget, usqInt callSiteReturnAddress, usqInt callTargetAddress) NoDbgRegParms;
-static sqInt rewriteInlineCacheAttagtarget(AbstractInstruction * self_in_rewriteInlineCacheAttagtarget, usqInt callSiteReturnAddress, sqInt cacheTag, usqInt callTargetAddress) NoDbgRegParms;
-static AbstractInstruction * rewriteInlineCacheTagat(AbstractInstruction * self_in_rewriteInlineCacheTagat, sqInt cacheTag, sqInt callSiteReturnAddress) NoDbgRegParms;
-static sqInt rewriteJumpLongAttarget(AbstractInstruction * self_in_rewriteJumpLongAttarget, sqInt callSiteReturnAddress, sqInt callTargetAddress) NoDbgRegParms;
-static sqInt setsConditionCodesFor(AbstractInstruction * self_in_setsConditionCodesFor, sqInt aConditionalJumpOpcode) NoDbgRegParms;
-static sqInt shiftSetsConditionCodesFor(AbstractInstruction * self_in_shiftSetsConditionCodesFor, sqInt aConditionalJumpOpcode) NoDbgRegParms;
-static sqInt sizeHasModrmat(AbstractInstruction * self_in_sizeHasModrmat, sqInt op, sqInt pc) NoDbgRegParms;
-static sqInt sizeImmediateGroup1at(AbstractInstruction * self_in_sizeImmediateGroup1at, sqInt op, sqInt pc) NoDbgRegParms;
-static usqInt sizePCDependentInstructionAt(AbstractInstruction * self_in_sizePCDependentInstructionAt, sqInt eventualAbsoluteAddress) NoDbgRegParms;
-static sqInt stackBytesForNumArgs(AbstractInstruction * self_in_stackBytesForNumArgs, sqInt numArgs) NoDbgRegParms;
-static sqInt stackPageInterruptHeadroomBytes(AbstractInstruction * self_in_stackPageInterruptHeadroomBytes) NoDbgRegParms;
-static AbstractInstruction * storeLiteralbeforeFollowingAddress(AbstractInstruction * self_in_storeLiteralbeforeFollowingAddress, sqInt literal, sqInt followingAddress) NoDbgRegParms;
-static sqInt sib(AbstractInstruction * self_in_sib, sqInt scale, sqInt indexReg, sqInt baseReg) NoDbgRegParms;
-static sqInt twoByteInstructionSizeAt(AbstractInstruction * self_in_twoByteInstructionSizeAt, sqInt pc) NoDbgRegParms;
-static sqInt unsignedShortAt(AbstractInstruction * self_in_unsignedShortAt, sqInt byteAddress) NoDbgRegParms;
-static AbstractInstruction * gAndCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * gArithmeticShiftRightRR(sqInt reg1, sqInt reg2) NoDbgRegParms;
-sqInt abortOffset(void);
-static sqInt abstractInstructionfollows(AbstractInstruction *theAbstractInstruction, AbstractInstruction *anAbstractInstruction) NoDbgRegParms;
-static void addCleanBlockStarts(void);
-void addCogMethodsToHeapMap(void);
-static sqInt addressIsInFixups(AbstractInstruction *address) NoDbgRegParms;
-static sqInt addressIsInInstructions(AbstractInstruction *address) NoDbgRegParms;
-static sqInt addressOfEndOfCaseinCPIC(sqInt n, CogMethod *cPIC) NoDbgRegParms;
-static sqInt alignUptoRoutineBoundary(sqInt anAddress) NoDbgRegParms;
-static sqInt allMachineCodeObjectReferencesValid(void);
-static sqInt allMethodsHaveCorrectHeader(void);
-static AbstractInstruction * annotateAbsolutePCRef(AbstractInstruction *abstractInstruction) NoDbgRegParms;
-static AbstractInstruction * annotateBytecode(AbstractInstruction *abstractInstruction) NoDbgRegParms;
-static AbstractInstruction * annotateobjRef(AbstractInstruction *abstractInstruction, sqInt anOop) NoDbgRegParms;
-static AbstractInstruction * annotatewith(AbstractInstruction *abstractInstruction, sqInt annotationFlag) NoDbgRegParms;
-static sqInt annotationForMcpcin(sqInt mcpc, CogMethod *cogHomeMethod) NoDbgRegParms;
-static void assertSaneJumpTarget(AbstractInstruction *jumpTarget) NoDbgRegParms;
-static sqInt blockCreationBytecodeSizeForHeader(sqInt methodHeader) NoDbgRegParms;
-static sqInt blockDispatchTargetsForperformarg(CogMethod *cogMethod, usqInt (*binaryFunction)(sqInt mcpc, sqInt arg), sqInt arg) NoDbgRegParms;
-sqInt bytecodePCForstartBcpcin(sqInt mcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
-static AbstractInstruction * CallNewspeakSend(sqInt callTarget) NoDbgRegParms;
-static AbstractInstruction * CallRTregistersToBeSavedMask(sqInt callTarget, sqInt registersToBeSaved) NoDbgRegParms;
-static AbstractInstruction * gCall(sqInt callTarget) NoDbgRegParms;
-static AbstractInstruction * gCmpCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * gCmpCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * gCmpRR(sqInt reg1, sqInt reg2) NoDbgRegParms;
-void callCogCodePopReceiver(void);
-void callCogCodePopReceiverAndClassRegs(void);
-sqInt ceCPICMissreceiver(CogMethod *cPIC, sqInt receiver);
-sqInt ceSICMiss(sqInt receiver);
-void checkAssertsEnabledInCogit(void);
-static sqInt checkIfValidOopRefAndTargetpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) NoDbgRegParms;
-static sqInt checkIfValidOopRefpccogMethod(sqInt annotation, char *mcpc, sqInt cogMethod) NoDbgRegParms;
-sqInt checkIntegrityOfObjectReferencesInCode(sqInt gcModes);
-static sqInt checkMaybeObjRefAt(sqInt mcpc) NoDbgRegParms;
-static sqInt checkValidObjectReferencesInClosedPIC(CogMethod *cPIC) NoDbgRegParms;
-char * codeEntryFor(char *address);
-char * codeEntryNameFor(char *address);
-sqInt cogCodeBase(void);
-sqInt cogCodeConstituents(void);
-static sqInt cogExtendPICCaseNMethodtagisMNUCase(CogMethod *cPIC, sqInt caseNMethod, sqInt caseNTag, sqInt isMNUCase) NoDbgRegParms;
-void cogitPostGCAction(sqInt gcMode);
-sqInt cogMethodDoesntLookKosher(CogMethod *cogMethod);
-CogMethod * cogMNUPICSelectorreceivermethodOperandnumArgs(sqInt selector, sqInt rcvr, sqInt methodOperand, sqInt numArgs);
-static CogMethod * cogOpenPICSelectornumArgs(sqInt selector, sqInt numArgs) NoDbgRegParms;
-static CogMethod * cogPICSelectornumArgsCase0MethodCase1MethodtagisMNUCase(sqInt selector, sqInt numArgs, CogMethod *case0CogMethod, sqInt case1MethodOrNil, sqInt case1Tag, sqInt isMNUCase) NoDbgRegParms;
-CogMethod * cogselector(sqInt aMethodObj, sqInt aSelectorOop);
-void compactCogCompiledCode(void);
-static AbstractInstruction * compileAbort(void);
-static sqInt compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex) NoDbgRegParms;
-static void compileBlockEntry(BlockStart *blockStart) NoDbgRegParms;
-static void compileCallFornumArgsargargargargresultRegsaveRegs(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt resultRegOrNil, sqInt saveRegs) NoDbgRegParms;
-static sqInt compileClosedPICPrototype(void);
-static AbstractInstruction * compileCPICEntry(void);
-static sqInt compileCPICCase0Case1MethodtagisMNUCasenumArgs(CogMethod *cPIC, CogMethod *case0CogMethod, sqInt case1Method, sqInt case1Tag, sqInt isMNUCase, sqInt numArgs) NoDbgRegParms;
-static void compileEntry(void);
-static sqInt compileMethodBody(void);
-static sqInt compileMNUCPICmethodOperandnumArgs(CogMethod *cPIC, sqInt methodOperand, sqInt numArgs) NoDbgRegParms;
-static sqInt compilePICAbort(sqInt numArgs) NoDbgRegParms;
-static sqInt compilePrimitive(void);
-static void compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil) NoDbgRegParms;
-static void computeEntryOffsets(void);
-static void computeMaximumSizes(void);
-static sqInt cPICHasForwardedClass(CogMethod *cPIC) NoDbgRegParms;
-static sqInt cPICHasFreedTargets(CogMethod *cPIC) NoDbgRegParms;
-static sqInt cPICHasTarget(CogMethod *cPIC, CogMethod *targetMethod) NoDbgRegParms;
-static AbstractInstruction * gDivRRQuoRem(sqInt rDivisor, sqInt rDividend, sqInt rQuotient, sqInt rRemainder) NoDbgRegParms;
-static sqInt endPCOf(sqInt aMethod) NoDbgRegParms;
-void enterCogCodePopReceiver(void);
-static sqInt extABytecode(void);
-static sqInt extBBytecode(void);
-static sqInt fillInBlockHeadersAt(sqInt startAddress) NoDbgRegParms;
-static CogMethod * fillInCPICHeadersizenumArgsnumCaseshasMNUCaseselector(CogMethod *pic, sqInt size, sqInt numArgs, sqInt numCases, sqInt hasMNUCase, sqInt selector) NoDbgRegParms;
-static CogMethod * fillInMethodHeadersizeselector(CogMethod *method, sqInt size, sqInt selector) NoDbgRegParms;
-static CogMethod * fillInOPICHeadersizenumArgsselector(CogMethod *pic, sqInt size, sqInt numArgs, sqInt selector) NoDbgRegParms;
-static usqInt findBlockMethodWithEntrystartBcpc(sqInt blockEntryMcpc, sqInt startBcpc) NoDbgRegParms;
-static sqInt findMapLocationForMcpcinMethod(sqInt targetMcpc, CogMethod *cogMethod) NoDbgRegParms;
-CogBlockMethod * findMethodForStartBcpcinHomeMethod(sqInt startbcpc, CogMethod *cogMethod);
-static sqInt findIsBackwardBranchMcpcBcpcMatchingMcpc(BytecodeDescriptor *descriptor, sqInt isBackwardBranch, char *mcpc, sqInt bcpc, void *targetMcpc) NoDbgRegParms;
-void followForwardedLiteralsIn(CogMethod *cogMethod);
-void followForwardedMethods(void);
-static sqInt followMaybeObjRefAt(sqInt mcpc) NoDbgRegParms;
-static sqInt followMethodReferencesInClosedPIC(CogMethod *cPIC) NoDbgRegParms;
-static void freePICsWithFreedTargets(void);
-void freeUnmarkedMachineCode(void);
-static sqInt genCheckForInterruptsTrampoline(void);
-static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2, sqInt regArg3, sqInt forCall, char *trampolineName))(void)  NoDbgRegParms;
-static void genEnilopmartReturn(sqInt forCall) NoDbgRegParms;
-static void generateCaptureCStackPointers(sqInt captureFramePointer) NoDbgRegParms;
-static void generateClosedPICPrototype(void);
-static CogMethod * generateCogMethod(sqInt selector) NoDbgRegParms;
-static sqInt generateInstructionsAt(sqInt eventualAbsoluteAddress) NoDbgRegParms;
-static sqInt generateMapAtstart(sqInt addressOrNull, sqInt startAddress) NoDbgRegParms;
-static void generateNewspeakRuntime(void);
-static void generateOpenPICPrototype(void);
-static void generateRunTimeTrampolines(void);
-static void generateStackPointerCapture(void);
-static void generateTrampolines(void);
-static void generateVMOwnerLockFunctions(void);
-static sqInt genGetLeafCallStackPointer(void);
-static sqInt genInnerPICAbortTrampoline(char *name) NoDbgRegParms;
-static sqInt genLoadCStackPointersForPrimCall(void);
-static sqInt genNonLocalReturnTrampoline(void);
-static sqInt genNSSendTrampolineFornumArgscalled(void *aRoutine, sqInt numArgs, char *aString) NoDbgRegParms;
-static sqInt genReturnTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0) NoDbgRegParms;
-static sqInt genSafeTrampolineForcalled(void *aRoutine, char *aString) NoDbgRegParms;
-static sqInt genSafeTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0) NoDbgRegParms;
-static sqInt genSafeTrampolineForcalledargarg(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1) NoDbgRegParms;
-static sqInt genSmalltalkToCStackSwitch(void);
-static sqInt genTrampolineForcalled(void *aRoutine, char *aString) NoDbgRegParms;
-static sqInt genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg) NoDbgRegParms;
-static sqInt genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg) NoDbgRegParms;
-static sqInt genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg) NoDbgRegParms;
-static sqInt genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil, sqInt appendBoolean) NoDbgRegParms;
-static AbstractInstruction * gen(sqInt opcode) NoDbgRegParms;
-static AbstractInstruction * genoperand(sqInt opcode, sqInt operand) NoDbgRegParms;
-static AbstractInstruction * genoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo) NoDbgRegParms;
-static AbstractInstruction * genoperandoperandoperand(sqInt opcode, sqInt operandOne, sqInt operandTwo, sqInt operandThree) NoDbgRegParms;
-static sqInt getLiteral(sqInt litIndex) NoDbgRegParms;
-static sqInt incrementUsageOfTargetIfLinkedSendmcpcignored(sqInt annotation, char *mcpc, sqInt superfluity) NoDbgRegParms;
-static sqInt initialClosedPICUsageCount(void);
-static void initializeBackend(void);
-void initializeCodeZoneFromupTo(sqInt startAddress, sqInt endAddress);
-static sqInt initialMethodUsageCount(void);
-static sqInt initialOpenPICUsageCount(void);
-static sqInt inverseBranchFor(sqInt opcode) NoDbgRegParms;
-static sqInt isBackwardBranchatextsin(BytecodeDescriptor *descriptor, sqInt pc, sqInt nExts, sqInt aMethodObj) NoDbgRegParms;
-static sqInt isPCMappedAnnotation(sqInt annotation) NoDbgRegParms;
-sqInt isPCWithinMethodZone(void *address);
-sqInt isSendReturnPC(sqInt retpc);
-static AbstractInstruction * gJumpFPEqual(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPGreaterOrEqual(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPGreater(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPLessOrEqual(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPLess(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gJumpFPNotEqual(void *jumpTarget) NoDbgRegParms;
-static AbstractInstruction * gLabel(void);
-static AbstractInstruction * gLogicalShiftLeftCqR(sqInt quickConstant, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * lastOpcode(void);
-void linkNSSendCacheclassTagenclosingObjecttargetcaller(NSSendCache *nsSendCache, sqInt classTag, sqInt enclosingObject, CogMethod *targetMethod, CogMethod *callingMethod);
-void linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver);
-static void loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc) NoDbgRegParms;
-static AbstractInstruction * gMoveAwR(sqInt address, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * gMoveCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms;
-static AbstractInstruction * gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg) NoDbgRegParms;
-static AbstractInstruction * gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg) NoDbgRegParms;
-static AbstractInstruction * gMoveRR(sqInt reg1, sqInt reg2) NoDbgRegParms;
-static AbstractInstruction * gMulRR(sqInt reg1, sqInt reg2) NoDbgRegParms;
-static sqInt mapEndFor(CogMethod *cogMethod) NoDbgRegParms;
-static sqInt mapForperformUntilarg(CogMethod *cogMethod, int (*functionSymbol)(sqInt annotation, char *mcpc, sqInt arg), sqInt arg) NoDbgRegParms;
-static sqInt mapObjectReferencesInClosedPIC(CogMethod *cPIC) NoDbgRegParms;
-static void mapObjectReferencesInGeneratedRuntime(void);
-static void mapObjectReferencesInMachineCodeForBecome(void);
-static void mapObjectReferencesInMachineCodeForFullGC(void);
-static void mapObjectReferencesInMachineCodeForYoungGC(void);
-void mapObjectReferencesInMachineCode(sqInt gcMode);
-void markAndTraceMachineCodeOfMarkedMethods(void);
-static void markAndTraceObjectReferencesInGeneratedRuntime(void);
-static sqInt markLiteralspcmethod(sqInt annotation, char *mcpc, sqInt cogMethod) NoDbgRegParms;
-void markMethodAndReferents(CogBlockMethod *aCogMethod);
-usqInt maxCogMethodAddress(void);
-static sqInt maybeAllocAndInitIRCs(void);
-static sqInt maybeFreeCogMethodDoesntLookKosher(CogMethod *cogMethod) NoDbgRegParms;
-static sqInt maybeGenerateCheckFeatures(void);
-static sqInt maybeGenerateICacheFlush(void);
-static void maybeMarkCountersIn(CogMethod *cogMethod) NoDbgRegParms;
-static sqInt mclassIsSmallInteger(sqInt ignoredPrimIndex) NoDbgRegParms;
-usqInt mcPCForBackwardBranchstartBcpcin(sqInt bcpc, sqInt startbcpc, CogBlockMethod *cogMethod);
-static sqInt methodhasSameCodeAscheckPenultimate(sqInt methodA, sqInt methodB, sqInt comparePenultimateLiteral) NoDbgRegParms;
-sqInt minCogMethodAddress(void);
-sqInt mnuOffset(void);
-static AbstractInstruction * gNegateR(sqInt reg) NoDbgRegParms;
-static sqInt needsFrameIfInBlock(sqInt stackDelta) NoDbgRegParms;
-static sqInt needsFrameNever(sqInt stackDelta) NoDbgRegParms;
-static sqInt noAssertMethodClassAssociationOf(sqInt methodPointer) NoDbgRegParms;
-static sqInt noCogMethodsMaximallyMarked(void);
-static sqInt noTargetsFreeInClosedPIC(CogMethod *cPIC) NoDbgRegParms;
-static sqInt outputInstructionsAt(sqInt startAddress) NoDbgRegParms;
-static sqInt outputInstructionsForGeneratedRuntimeAt(sqInt startAddress) NoDbgRegParms;
-static AbstractInstruction * gPopR(sqInt reg) NoDbgRegParms;
-static AbstractInstruction * gPushCw(sqInt wordConstant) NoDbgRegParms;
-sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
-sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
-static sqInt picAbortDiscriminatorValue(void);
-static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
-void printCogMethodFor(void *address);
-void printTrampolineTable(void);
-static sqInt processorHasDivQuoRemAndMClassIsSmallInteger(sqInt ignoredPrimIndex) NoDbgRegParms;
-static sqInt processorHasDivQuoRem(sqInt ignoredPrimIndex) NoDbgRegParms;
-static sqInt processorHasDoublePrecisionFloatingPointSupport(sqInt ignoredPrimIndex) NoDbgRegParms;
-static sqInt processorHasMultiplyAndMClassIsSmallInteger(sqInt ignoredPrimIndex) NoDbgRegParms;
-static sqInt processorHasMultiply(sqInt ignoredPrimIndex) NoDbgRegParms;
-static AbstractInstruction * gRetN(sqInt offset) NoDbgRegParms;
-static void recordGeneratedRunTimeaddress(char *aString, sqInt address) NoDbgRegParms;
-sqInt recordPrimTraceFunc(void);
-static void recordRunTimeObjectReferences(void);
-static sqInt registerMaskFor(sqInt reg) NoDbgRegParms;
-static sqInt registerMaskForand(sqInt reg1, sqInt reg2) NoDbgRegParms;
-static sqInt registerMaskForandand(sqInt reg1, sqInt reg2, sqInt reg3) NoDbgRegParms;
-static void relocateCallsAndSelfReferencesInMethod(CogMethod *cogMethod) NoDbgRegParms;
-static void relocateCallsInClosedPIC(CogMethod *cPIC) NoDbgRegParms;
-static sqInt relocateIfCallOrMethodReferencemcpcdelta(sqInt annotation, char *mcpc, sqInt delta) NoDbgRegParms;
-static sqInt relocateMethodsPreCompaction(void);
-static sqInt remapIfObjectRefpchasYoung(sqInt annotation, char *mcpc, sqInt hasYoungPtr) NoDbgRegParms;
-static AbstractInstruction * gSubCwR(sqInt wordConstant, sqInt reg) NoDbgRegParms;
-static sqInt scanForCleanBlocks(void);
-void setBreakMethod(sqInt anObj);
-void setPostCompileHook(void (*aFunction)(CogMethod *, void *));
-void setSelectorOfto(CogMethod *cogMethod, sqInt aSelectorOop);

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list