This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Arm] Stack pointer setup thumb


I have found relevant discussion on this
https://sourceware.org/ml/newlib/2008/msg00222.html (and here as well
http://sourceware-org.1504.n7.nabble.com/arm-elf-thumb-2-issue-in-newlib-or-gas-td181799.html)
Almost 11 years have passed =)

Alex

On Thu, Mar 7, 2019 at 9:14 PM Alexander Fedotov <alfedotov@gmail.com> wrote:
>
>
>
> On Thu, 7 Mar 2019 at 18:45, Nick Clifton <nickc@redhat.com> wrote:
>>
>> Hi Alex,
>>
>> > I hope you are have some memories on this fix :)
>> > https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=026f9d290f5fe85fe9bd3a56be378fc794e28473
>>
>> Not really :-(
>>
>> > Is this still relevant ?
>>
>> The whole patch, or just part of it ?
>
>
> That part below (with sp initialization)
>>
>>
>>
>> > The problem is that users complaining that it has different behavior
>> > in ARM and Thumb modes for one Cortex-R core. And they do expected
>> > that library will make some minimal initialization in both ISA
>> > versions.
>>
>> Well to be honest I really do not remember what prompted this patch in
>> the first place.  So if you have a fix which makes the users happy and
>> which does not break anything then I would say "go for it". :-)
>>
>> > Should we just remove this ?
>> > +#ifdef __thumb2__
>> > +       /* XXX Fill in stack assignments for interrupt modes.  */
>> > +#else
>>
>> Sure - I would have no problems with that.  The comment was more
>> of a suggestion that someone needs to make sure that the stack
>> pointer is set up before interrupts happen, but it does not have
>> to be in this particular piece of code.  Plus presumably this has
>> already been done, or else many more people would be complaining
>> about interrupts not working in Thumb mode.
>
>
> Yep. Basic idea is to have sp initialization for exceptions as well. Actually I already proposed a patch for this piece of code where I moved initialuzation in weak subroutine. But I saved this ifdef there as well. I will update patch then :)
>>
>>
>> Cheers
>>   Nick
>
>
> Thsnk you Nick !
> --
> Best regards,
> AF



-- 
Best regards,
AF


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]