Hello
> > But is this true?
> It is true because a typical implementation of this function has no
> need to clobber registers. For instance, glibc's calls a kernel
> helper this way:
Ah. now I understand, you require to have a virtual memory system (or
similar) that is translating the call into a system call.
Without VM I still can use e.g.
svc #17
bx lr
as an __aeabi_read_tp() implementation.
The real work has to be done inside of the exception handler.
You are right, in this case no clobbering is needed.
> The linker is responsibe for converting bl to blx, or for inserting
> mode changing stubs. It is also responsible for long calls. Unless
> you're using a really old linker, I can't see why you would have any
> problems.
It's a while ago that I have had problems with long calls.
I did not realised that ld is doing that for me, great.
> Do you have a concrete problem?
I've had a problem with my __aeabi_read_tp() implementation.
This was "solved" by clobbering registers r1-r3.
Thank you for this information.
Now that I know that this is not a bug, I can decide what to do
, changing the compiler , or better changing my implementation.
regards
Thomas