[Win32] VM update (3.2 release candidate)

Andreas Raab Andreas.Raab at gmx.de
Mon May 6 22:31:48 UTC 2002


John,

> I do not define JP_REG because as you point out registers are rare on 
> those intel things... Thus it's just void **jumpTablePtr = jumpTable; 
> and I let the compiler figure out what to do.

Hm ... I _seriously_ wonder what the code looks like if you don't use
your modifications. From what I can tell, the assembly code looks
exactly the way it should. But it should look that way with or without
your modification unless something went horribly wrong.

> Ok, this is from gcc I think it's the first case of the interp.c 
> switch onwards for a bit...

Yup, thanks. This bit of info is very helpful.

>          incl %esi
>          movzbl (%esi),%ebx

Okay, so it's using ebx as currentBytecode (the above means
"currentBytecode = byteAt(++localIP)" with currentBytecode = %ebx and
localIP = %esi).

>          addl $4,%edi
>          movl fum+80,%eax
>          movl 4(%eax),%eax
>          movl %eax,(%edi)

The only difference to the current code is that rather than using
"fum+80" it's using _receiver explicitly. No big difference (although I
would expect the immediate global access to be faster).

>          jmp *jumpTable.349(,%ebx,4)

And that's exactly the dispatch I'm seeing in my code. So from comparing
the two should be on equal grounds now (as indicated by the
benchmark/mhz comparison). But I still don't understand why this was so
much slower before. Hm....

Cheers,
  - Andreas




More information about the Squeak-dev mailing list