Re: Change call ABI on PA-RISC

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

 



On 2016-11-14 3:21 AM, Jeff Law wrote:
On 11/13/2016 12:48 PM, Helge Deller wrote:
On 13.11.2016 19:56, Jeff Law wrote:
On 11/13/2016 11:37 AM, Helge Deller wrote:
If you are going to change the ABI, maybe we can add more things as well? Which comes to my mind here is for example an optimized mcount() function which allows changing the return pointer (see -mmcount-ra-address on MIPS) ?

As in twiddling RP to return to a different point?

No, that's not the use case for me.

I was working on the ftrace functionality in the Linux kernel.
I'd need to look up the full details again, but as far as I remember one of the tracers wants to know the function to which the caller of mcount() would return,
so some kind of simple __builtin_return_address(2).
Ah. Isn't that going to be sitting at sp-20 or something like that. My PA is rusty, but my recollection is that's supposed to be at a fixed location in the frame.
The return address of the the function to which the caller of mcount() would return is passed to mcount() in %r26. The saved value in the frame is not directly useful as one lacks
the frame offset of the routine calling mcount.

In linux, we have a single space runtime and thus the import stubs don't modify the return address when shared library routines are called. So, the value passed in %r26 can be used
directly to lookup the calling function.

Dave

--
John David Anglin  dave.anglin@xxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux