Re: [DynInst_API:] Accessing Packed Floats


Date: Mon, 10 Oct 2016 10:53:36 -0500
From: John Detter <jdetter@xxxxxxxx>
Subject: Re: [DynInst_API:] Accessing Packed Floats

Blair,

Using BPatch_registerExpr should get the AST _expression_ of the register at the instrumentation point. You should be able to get the value of the register from that. If you are still having issues you can send me your code snippet and I can look at it if you want. I can also write up a quick example for you if you need it.

Let me know how it works out,

-- John


On 10/08/2016 11:53 AM, Blair Archibald wrote:
Hi John,

Sorry for the slow reply. Unfortunately I've lost the actual code I was using for this (switched to a new machine).

It was along the lines of using:

BPatch_registerExpr(Dyninst::MachRegister reg)

To access an XMM register and then trying various combinations of dereferecing (BPatch_deref) to try and access elements. I also tried not dereferencing to see what happened (nothing!). The idea was to then use this as an argument to a printf call.

What I found strange was that the newly generated code never had any mention of xmm0 in it at all.

I'll try and recreate the code soon. Before then, do you have any pointers of how I should be accessing elements. Is dereferencing into the BPatch_registerExpr the correct method?

Many thanks,
Blair

On 27 September 2016 at 17:23, John Detter <jdetter@xxxxxxxx> wrote:

Blair,

You should be able to do this using Dyninst. Could I see the code you're trying to use for this analysis?

-- John


On 09/27/2016 04:52 AM, Blair Archibald wrote:
Hi everyone,

I'm looking to do some analysis on (AVX) vectorised values stored in XMM/YMM. Is it possible to access the individual packed floats within these registers?

I've tried using BPatch_registerExpr to get the register I care about but I'm stuck trying to access the values. I thought something like *(regVal + 1) might work to get the second float but I've had no luck so far.

As an aside: I don't think YMM is configured correctly in the registerSpace and I had to manually add it to initialise64().

Any ideas if this is possible/how to do it?

Many thanks,
Blair


_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
[← Prev in Thread] Current Thread [Next in Thread→]