[Vm-dev] [VM-dev] What the difference in method format between 32 and 64 bits images?

Denis Kudriashov dionisiydk at gmail.com
Thu Apr 13 09:32:26 UTC 2017


Thank's Eliot. Now I have another question in another mail

2017-04-12 18:31 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:

>
> Hi Denis,
>
> On Wed, Apr 12, 2017 at 8:42 AM, Denis Kudriashov <dionisiydk at gmail.com>
> wrote:
>
>>
>> Hi
>>
>> I am testing serialization library and now I have problem with compiled
>> methods.
>> I try to materialise 64bits method in 32bits image and otherwise. Both is
>> not working (but in same image everything is fine).
>>
>> I investigated following difference with "Margitude>>between:and:" as
>> example:
>>
>> (Margitude>>between:and:) size.  "=> 64bits->46; 32bits->30"
>>
>> (Margitude>>between:and:)  header. "same 34078723 for 64 and 32 bits"
>>
>> (Margitude>>between:and:)  initialPC. "=> 64bits-> 33; 32bits->17"
>>
>>
>> Is there any formula to convert these values between 64 and 32 bits?
>>
>
> read CompiledCode's comment and initialPC.  The initialPC comes after n +
> 1 literals (the first word of a method is a header SmallInteger; after that
> are numLiterals literals).  So the initialPC is
>
> initialPC
> "Answer the program counter for the receiver's first bytecode."
>
> ^ (self numLiterals + 1) * Smalltalk wordSize + 1
>
>
>
>> Best regards,
>> Denis
>>
>>
>
>
> --
> _,,,^..^,,,_
> best, Eliot
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170413/47dee746/attachment.html>


More information about the Vm-dev mailing list