[Vm-dev] VM endianness

Eliot Miranda eliot.miranda at gmail.com
Wed Mar 18 19:10:55 UTC 2015


On Wed, Mar 18, 2015 at 10:54 AM, stephane ducasse <
stephane.ducasse at gmail.com> wrote:

>
>
>
>> In Pharo it is similar. However, we would like to have an image where
>> BitBlt and Form are not there.
>>
>
> Here's one that works on both Spur and V3.  It only works on a Cog or
> Stack VM (and hence is OK for Pharo) since it depends on Floats being
> stored in the platform order internally.
>
>
> | f |
> f := Float new.
> f at: 2 put: 1. "store the least significant word of the float with 1; on
> big endian machines this is the second word"
> Bitmap adoptInstance: f.
> f first = 1 ifTrue: [#little] ifFalse: [#big]
>
>
> Do you have a magic invocation that would not involved graphic objects?
> What would be cool is to have vm parameter or something like that. We want
> to reduce the dependencies in the core.
>

At least it doesn't use BitBlt.  Its got much less dependencies than the
existing code and is much simpler.  Isn't that worth something?


>
> Stef
>
>
>
>
>
>> El mié., 18 de mar. de 2015 a la(s) 5:52 p. m., David T. Lewis <
>> lewis at mail.msen.com> escribió:
>>
>>>
>>> It is easy to add a primitive for this, but it should not be necessary.
>>> See SmalltalkImage>>calcEndianness in Squeak.
>>>
>>> Dave
>>>
>>> >  Hello,
>>> >
>>> > Is there a primitive or a parameter that I can call from the image to
>>> know
>>> > the endianness of the processor / VM ?
>>> >
>>> > Thanks,
>>> >
>>> > Clement
>>> >
>>>
>>>
>>>
>>
>
>
> --
> best,
> Eliot
>
>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150318/547ef0ac/attachment-0001.htm


More information about the Vm-dev mailing list