<br><br><div class="gmail_quote">On Thu, Feb 12, 2009 at 11:07 AM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="Ih2E3d"><br>
Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m assuming that in-memory the 64-bit VM has 64-bit oops, right? &nbsp;So the VM has to swizzle 32-bit pointers to 64-bit. &nbsp;I haven&#39;t come across this swizzling code yet. &nbsp;I thought that the swizzling was done by the system tracer. &nbsp;Where is the in-VM code to swizzle pointers to 64-bits?<br>

</blockquote>
<br></div>
oopForPointer/pointerForOop translate between OOPs and pointers. So you can translate from a 32bit Oop into a 64bit pointer by adding a base address and vice versa.</blockquote><div><br></div><div>AFAICT you can produce a 64-bit VM that runs a 32-bit image with this technique, but you can&#39;t get a VM that runs both.&nbsp;</div>
<div><br></div><div>- If one fetches 64-bits when converting an oop to an address one can load a 64-bit oop but not a 32-it one, because in fetching 64-bits one will fetch two oops, right?</div><div><br></div><div>- if one fetches 32-bits when converting an oop to an address one can load a 32-bit oop but not a 64-it one, because in fetching 32-bits one will incorrectly ignore the upper 32-bits of the oop, right? &nbsp;(Unless of course the upper 32-bits of all oops are zero, but that&#39;s not a 64-bit image, that&#39;s a 32-bit image masquerading as a waste of space).</div>
<div><br></div><div>So I don&#39;t see how this allows one to have a 64-bit VM that can run true 64-bit images. &nbsp;What am I missing?</div><div><br></div><div>On the other hand, start-up code that reads a 32-bit image and swizzles it to a full 64-bit image is perfectly sensible and quite easy in the Squeak context because (IIRC) the 64-bit format doesn&#39;t do things like widen the SmallInteger range, implement immediate Floats, etc. &nbsp;Its simply a matter of reading the data, writing two words for each oop and scaling each non-SmallInteger oop appropriately. &nbsp;But as I said I don&#39;t see this code anywhere.</div>
<div><br></div><div>David, since you&#39;ve been working on this perhaps you could clear-up the confusion.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Cheers,<br><font color="#888888">
 &nbsp;- Andreas<br>
</font></blockquote></div><br>