This is the mail archive of the
mailing list for the libc-ports project.
Re: [PATCH] [AARCH64]: Pointer mangling support for Aarch64
- From: Venkataramanan Kumar <venkataramanan dot kumar at linaro dot org>
- To: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- Cc: libc-ports at sourceware dot org, Patch Tracking <patch at linaro dot org>
- Date: Wed, 8 Jan 2014 16:02:06 +0530
- Subject: Re: [PATCH] [AARCH64]: Pointer mangling support for Aarch64
- Authentication-results: sourceware.org; auth=none
- References: <CAJK_mQ0EoE+_JQvSL+5=C_+Q6JgsV8hvXipy8OgR8+GYyYgt3A at mail dot gmail dot com> <87iotxm15i dot fsf at fleche dot redhat dot com> <CAJK_mQ2isVSQgbARrRT6KYGODUyCgAavnD-TTYVYK7_bUjb6LQ at mail dot gmail dot com> <CAFqB+Pzt2X9tcqCyzSBn0XcT62c09VUYikUHdNB6iuvrB8poWg at mail dot gmail dot com>
On 7 January 2014 17:47, Marcus Shawcroft <firstname.lastname@example.org> wrote:
> On 7 January 2014 11:05, Venkataramanan Kumar
> <email@example.com> 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.
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
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.