[Vm-dev] ARM Cog progress

Eliot Miranda eliot.miranda at gmail.com
Sun Jun 7 21:28:16 UTC 2015


Hi Nicolas,

On Sun, Jun 7, 2015 at 11:50 AM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

>
>
>
> 2015-06-07 20:24 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:
>
>>
>> Hi Holger,
>>
>> On Sun, Jun 7, 2015 at 12:32 AM, Holger Freyther <holger at freyther.de>
>> wrote:
>>
>>>
>>>
>>> > On 07 Jun 2015, at 01:25, tim Rowledge <tim at rowledge.org> wrote:
>>> >
>>> >
>>> > GCC is such fun.
>>>
>>> given the amount of warnings emitted during compilation, have you
>>> considered
>>> that it might be the input given to gcc that is the issue here? ;)
>>>
>>>
>> You're very welcome to make changes to plugins to reduce warnings.  I'm
>> focussed on the core VM, and as Tim has said there are almost no warnings
>> from that code.  There is one warning from the Cogit that is inappropriate
>> and I refuse to waste the code that would avoid it, and there are, I think,
>> 8 warnings from the 32-bit Stack/CoInterpreter which are in integer
>> conversion code which is conditionally compiled code not used in 32-bits.
>> So in the code I have responsibility for I have eliminated all but the
>> minimum of warnings.  I am not the author of the plugins and don't presume
>> to understand them all well enough to fix them.  I would appreciate your
>> help, rather than your criticism.
>>
>>
>>
> I'd like to help in this domain too.
> Unfortunately, eliminating warnings is a first step, but not enough (even
> with -Wall -Wextra ...)
> Many UB conditions are not detected (or the compiler would really be
> pedantic with false alarms).
> For example, like testing overflow in post-condition which is wrong since
> overflow is UB, anything could happen...
> see bytecodePrimeMultiply
> http://smallissimo.blogspot.fr/2015/04/the-more-or-less-defined-behavior-we.html
>

You're quite right, and one area that is crucial with a JIT is calls from
machine code into the C runtime, which must obey the ABI rules.  None of
the mistakes in this area will show up as C compiler warnings because they
are to do with the code the JIT generates.  ANother issue is instruction
cache flushing, and I suspect that's where the difference between the
900MHz Pi 2 that Tim is using, and that is crashing, and the apparently
reliable 700MHz B+ that I'm using is.



>
>
> I thing clang has some optional analyzer (as the one used in Xcode, but
> there might be more capabilities...)
>
> Nicolas
>
>
>>
>> --
>> best,
>> Eliot
>>
>>
>
>


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


More information about the Vm-dev mailing list