[Win32] VM update (3.2 release candidate)

Ian Piumarta ian.piumarta at inria.fr
Tue May 7 05:43:45 UTC 2002


On Mon, 6 May 2002, John M McIntosh wrote:

> Sigh. Lets look at the MACROS figure out we've meddled with my copy 
> and dump this again Seems I got a JP_REG define in there which might 
> have lead to confusion as I was integrating Ian's changes. Then again 
> does Ian have a #define JP_REG at the bottom of his sqGnu.h?

Yes he does.  sqGnu.h:

#include "sq.h"

#define CASE(N) case N: _##N:
#define BREAK           goto *jumpTablePtr[currentBytecode]
#define PRIM_DISPATCH   goto *jumpTable[primitiveIndex]

...

#if defined(__i386__)
# define IP_REG asm("%esi")
# define SP_REG asm("%edi")
# define CB_REG /* asm("%ebx") ; avoid undue register pressure */
#endif

...

#ifndef JP_REG
# define JP_REG
#endif


gnuify:

(stage == 1) && /^$/ {
  print "interpret: adding bytecode dispatch table" > "/dev/stderr";
  print "    JUMP_TABLE;\n";
  print "    register void **jumpTablePtr JP_REG= jumpTable;";
  print "interpret: rewriting case labels and outer breaks" > "/dev/stderr";
  stage= 2;
  FS="[         :]+";
  next;
}


Ian





More information about the Squeak-dev mailing list