[Vm-dev] Re: [squeak-dev] VM performance discrepancy on Linux and Windows

Andreas Raab andreas.raab at gmx.de
Fri Apr 11 07:22:16 UTC 2008

Yoshiki Ohshima wrote:
> Apparently, %esi is used (exclusively) for IP, and %ebx keeps the next
> byte, and "jmp *" takes you to the next location stored in the table
> starts at 0x2780.

All of that comes straight out of sqGnu.h:

#define BC_CASE(N)		case N: _##N:
#define BC_BREAK		goto *jumpTable[currentBytecode]

#if defined(__i386__)
# define IP_REG asm("%esi")
# define SP_REG asm("%edi")
# define CB_REG asm("%ebx")

You might want to check if the gnuifier got confused over time - I had 
to update it to deal correctly with sqInt etc. gnu-interp.c should look 
like here:

sqInt interpret(void) {
     sqInt localReturnValue;
     sqInt localReturnContext;
     sqInt localHomeContext;
     register char* localSP SP_REG;
     register char* localIP IP_REG;
     register sqInt currentBytecode CB_REG;

		switch (currentBytecode) {
			/* pushReceiverVariableBytecode */

> %esi is almost used for IP but use %eax for fetching the next byte,
> jmp also seems to use %eax so right before it is spilled and the
> destination address is brought into %eax.

Sounds more like the static register assignments get ignored.

   - Andreas

More information about the Vm-dev mailing list