This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: [PATCH] [AARCH64]: Pointer mangling support for Aarch64


Hi Marcus,

On 7 January 2014 17:47, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:
> On 7 January 2014 11:05, Venkataramanan Kumar
> <venkataramanan.kumar@linaro.org> wrote:
>
>> I looked at x86 and powerpc ports. So for Aarch64
>> longjmp/longjmp_target probe expects
>>    *  first argument 8@address of jmpbuf in x0.
>>    *  second argument -4@return val in x1.
>>    *  third argument 8@ address of target in LR/X30.
>
> Hi, I'm not familiar with the inner workings of STAP probes, can you
> explain what the arguments of longjmp_target should be at a semantic
> level rather than the proposed location to get the values from?

I checked below link and found the argument format.
https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation

(Snip)
For compiler-generated code, each argument will be of the form N@OP.
For hand-written assembly, or for inline assembly in C or C++, the
initial N@ may be missing.
If N is present, it describes the size of the argument. It will be one of:

1  8 bits unsigned
-1 8 bits signed
2 16 bits unsigned
-2 16 bits signed
4 32 bits unsigned
-4 32 bits signed
8 64 bits unsigned
-8 64 bits signed
(Snip)

Also looking at x86 and powerpc ports.
They pass argument 1 - the address of jump buffer
                argument 2 - return value of __longjmp
                argument 3 - PC address or the jump target

For Aarch64, the longjmp/longjmp_target probe passed as below.
   *  first argument -  8@address of jmpbuf in x0.
   *  second argument-  -4@return val in x1.
   *  third argument-  8@ PC address or jump target target in LR/X30.

is that fine?

>
> Do we need probes in setjmp aswell?

Ok, I will add that as well.
I have not yet tested, the patch by enabling --enable-systemtap as it
needs std.h. This is missing in my cross build system.

>
> Cheers
> /Marcus


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