On 10/22/2014 08:12 PM, Jeff Law wrote: > Yea, let's keep your approach. Just wanted to explore a bit since the > PA seems to have a variety of similar characteristics. Here's an updated version of the patch. I experimented a little with ptx calling conventions and ran into an arg that had to be moved with memcpy, which exposed an ordering problem - all call_args were added to the memcpy call. So the invocation of the hook had to be moved downwards a bit, and the calculation of the return value needs to happen after it (since nvptx_function_value needs to know whether we are actually trying to construct a call at the moment). Bootstrapped and tested on x86_64-linux, ok? Bernd