[Win32] VM update (3.2 release candidate)

John M McIntosh johnmci at smalltalkconsulting.com
Mon May 6 22:08:23 UTC 2002


>
>
>Note that when using JP_REG instead of CB_REG we're really referencing
>currentBytecode as a stack variable and that seems to hurt a lot more
>than the extra indirection through jumpTable.
>
>Cheersm
>   - Andreas


Actually the code shipped from Ian

was

   print "#ifdef JP_REG";
   print "    register void **jumpTablePtr JP_REG= jumpTable;";
   print "#else";
   print "#define jumpTablePtr jumpTable";
   print "#endif";


which I changed to

   print "#ifdef JP_REG";
   print "    register void **jumpTablePtr JP_REG= jumpTable;";
   print "#else";
   print "    void **jumpTablePtr = jumpTable;"
   print "#endif";


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.

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

fum is the global pointer to the global structure. I'll let you 
compare & contrast with what is going on now...

         .long .L1260
.text
         .p2align 2,0x90
.L1005:
.stabn 68,0,6158,.LM1775-interpret
.LM1775:
         incl %esi
         movzbl (%esi),%ebx
.stabn 68,0,6161,.LM1776-interpret
.LM1776:
         addl $4,%edi
         movl fum+80,%eax
         movl 4(%eax),%eax
         movl %eax,(%edi)
.stabn 68,0,6162,.LM1777-interpret
.LM1777:
         jmp *jumpTable.349(,%ebx,4)
         .p2align 2,0x90
.L1006:
.stabn 68,0,6166,.LM1778-interpret
.LM1778:
         incl %esi
         movzbl (%esi),%ebx
.stabn 68,0,6169,.LM1779-interpret
.LM1779:
         addl $4,%edi
         movl fum+80,%eax
         movl 8(%eax),%eax
         movl %eax,(%edi)
.stabn 68,0,6170,.LM1780-interpret
.LM1780:
         jmp *jumpTable.349(,%ebx,4)
         .p2align 2,0x90
.L1007:
.stabn 68,0,6174,.LM1781-interpret
.LM1781:
         incl %esi
         movzbl (%esi),%ebx
.stabn 68,0,6177,.LM1782-interpret
.LM1782:
         addl $4,%edi
         movl fum+80,%eax
         movl 12(%eax),%eax
         movl %eax,(%edi)
.stabn 68,0,6178,.LM1783-interpret
.LM1783:
         jmp *jumpTable.349(,%ebx,4)
         .p2align 2,0x90
.L1008:
.stabn 68,0,6182,.LM1784-interpret
.LM1784:
         incl %esi
         movzbl (%esi),%ebx
.stabn 68,0,6185,.LM1785-interpret
.LM1785:
         addl $4,%edi
         movl fum+80,%eax
         movl 16(%eax),%eax
         movl %eax,(%edi)
.stabn 68,0,6186,.LM1786-interpret
.LM1786:
         jmp *jumpTable.349(,%ebx,4)

-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list