epsilon-devel
[Top][All Lists]
Advanced

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

Re: [poke 2.0] sourcery-arm-thumb2 issue


From: Jose E. Marchesi
Subject: Re: [poke 2.0] sourcery-arm-thumb2 issue
Date: Sat, 29 Jan 2022 01:19:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> On 2022-01-29 at 00:26 +0100, Romain Naour wrote:
>
>> I did a test build using poke 2.0:
>> https://gitlab.com/kubu93/buildroot/-/pipelines/458944376
>>
>> There is only one issue with the toolchain sourcery-arm-thumb2 generating 
>> thum2
>> instruction.
>
> Interesting.
>
> I think Mohammad tried to make me notice a similar thing the other
> night, but I am understanding only now.  It is easy to fix, in case you
> want to install a small change set yourself; otherwise we can wait for
> poke's next bugfix release.
>
>> Error: value of 13865506 too large for field of 2 bytes at 72848
>> Error: invalid swi expression
>
> Now, why in the world should I use a software interrupt instruction,
> which serves to crash on purpose?  Well, in order to notice when control
> reaches a point that is not supposed to reach.  The instruction comes
> from the expansion of _JITTER_ASM_CRASH , which on ARM (see
> machine/arm/jitter/machine/jitter-machine.h ) is defined as
>
>   "swi 13865506" //"mov r15, #0"
>
> The immediate is too large to fit in Thumb instructions.
>
> Now, why did I choose that ridiculous constant which is equal to 256³
> instead of something small?  Probably I wanted to be sure not to
> generate a valid kernel call by hazard.
>
> The solution is replacing the 13865506 literal with something small: I
> see from the documentation that any 16-bit “swi number” will fit -- I
> suppose unsigned.  Let us pick, arbitrarily, 1025.
>
> The fix is on Jitter master:
> http://git.ageinghacker.net/jitter/commit/?id=d715f2ea170099d537f28181cf825786a4b019ee
>
> Could you please confirm that this solves the problem?  José and the
> other poke friends: this can go into the next bugfix release.

Thanks.

Can you please update the jitter submodule reference in both master and
maint/poke-2?



reply via email to

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