lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Porting GNU Smalltalk to lightning 2


From: Paulo César Pereira de Andrade
Subject: Re: [Lightning] Porting GNU Smalltalk to lightning 2
Date: Tue, 18 Nov 2014 23:41:44 -0200

2014-11-18 6:15 GMT-02:00 Holger Hans Peter Freyther <address@hidden>:
> On Mon, Nov 17, 2014 at 12:19:33PM -0200, Paulo César Pereira de Andrade 
> wrote:
>
>>   Please try it. If a test fails, please try running it manually with
>> something like:
>>
>> $ (cd check; ./lightning -mcpu=4 the-test.tst)
>>
>> that should force it to generate code that should work on any
>> armv5 board (I only tested lightning on armv5te or newer, but
>> have been only testing in armv7 for more than one year).
>
> It is armv5te. When do you decide to use thumb instruction and
> when not? I saw the code that reads /proc/cpuinfo to determine
> features

  Yes. For GNU/Linux it reads /proc/cpuinfo. After that, and for other
systems, it checks #ifdef __ARM_PCS_VFP, and if there is a math
coprocessor, because the abi uses float registers, it assumes armv7
and #ifdef __thumb2__ it also assumes thumb.

>> > This is for lightning itself?
>>
>> For GNU Smalltalk. The first patch just made it work for make check
>> (and that is why I suggested adding tests for 64 bit integers), the
>> second patch just used the multiplication and division by constant
>> by moving the constant to a register and using the code for "dynamic"
>> value.
>
> yes, but is that a limitation of GNU lightning or smalltalk? We
> have a lot more registers on AMD64 so the move of a constant to
> a register shouldn't hurt that much here?

  Virtually, the only gain could be if converting multiplication and
division to shift(s) and/or add/sub because the immediate value is
known. But most of the overhead is not in the generated instruction.
So, it should be fine to leave it for a later "minor" optimization to
extend the 32 bit immediate optimizations to work with 64 bit
immediates.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]