[Vm-dev] VM Maker: VMMaker.oscog-eem.240.mcz

Eliot Miranda eliot.miranda at gmail.com
Fri Dec 21 17:40:48 UTC 2012


Hi Nicolas,

    I integrated David's integration of your changes from the most
up-to-date VMMaker.  If you'd like to send me what you think should be
there I'll compare, run the tests, and choose.  I had to change what was in
VMMaker a little to fix simulation, and I think the replacement of all
those "self cCode: 'magnitude >> 32'" occurrences with "magnitude >> 32",
since I fixed Slang's right-shift generation, is a marked improvement.  So
I suppose I'm saying that I'll review your code and if it works integrate
it, but it'll probably get tweaked so that simulation works, symbols are
used for c types, etc.


On Thu, Dec 20, 2012 at 3:26 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
> 2012/12/20  <commits at source.squeak.org>:
> >
> > Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> > http://source.squeak.org/VMMaker/VMMaker.oscog-eem.240.mcz
> >
> > ==================== Summary ====================
> >
> > Name: VMMaker.oscog-eem.240
> > Author: eem
> > Time: 20 December 2012, 12:21:03.98 pm
> > UUID: f72e2cd1-8b0e-45af-acd7-06ba9bbc2a50
> > Ancestors: VMMaker.oscog-eem.239
> >
>
> >
> > Remove obsolete use of cCode: 'magnitude >> 32' in the integer
> > conversion routines signed64BitIntegerFor: et al now that Slang
> > generates the correct cases for right-shift.
> >
>
> Hi Eliot, did you see code at
> http://code.google.com/p/cog/issues/detail?id=92 ?
> My version of signed64BitIntegerFor: is much simpler
>
> 1) define magnitude as unsigned
>         <var: 'magnitude' type: 'usqLong'>,
>
> 2) handle SmallInteger positive and negative value during the sign test
>         integerValue < 0
>                 ifTrue:[        integerValue >= 16r-40000000 ifTrue: [^self
> integerObjectOf: integerValue].
>                                 largeClass := self
> classLargeNegativeInteger.
>                                 magnitude := 0 - integerValue]
>                 ifFalse:[       integerValue <= 16r3FFFFFFF ifTrue: [^self
> integerObjectOf: integerValue].
>                                 largeClass := self
> classLargePositiveInteger.
>                                 magnitude := integerValue].
>
> I think the 3rd change maybe is not worth, it replaces
>                         (highWord := highWord >> 8) = 0 ifFalse:[sz := sz
> + 1].
>                         (highWord := highWord >> 8) = 0 ifFalse:[sz := sz
> + 1].
>                         (highWord := highWord >> 8) = 0 ifFalse:[sz := sz
> + 1]].
> with:
>                         (highWord >> 16) = 0 ifFalse:
>                                 [highWord := highWord >> 16.
>                                 sz := sz + 2].
>                         (highWord >> 8) = 0 ifFalse:[sz := sz + 1].
>
> Nicolas
>



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


More information about the Vm-dev mailing list