|
From: Zhen Li <zeh...@rw...> - 2012-05-14 16:14:29
|
Hello developers, I'm now try to write a tool base on Valgrind. I have to insert a function which receive maximum 16 args into IRSB. However, I found this is not possible on amd64 and the message is "Now support only 6 args." I also tried to pack them in heap and just pass the pointer, but I found it also difficult to use lookupIRTemp() to find the real value of IRTemp in my code since it need to build an "env" first. Any potential solution to this? Thanks! P.S. I'm using Valgrind 3.7.0 on Xeon server. Regards, Zhen -- Zhen Li German Research School for Simulation Sciences GmbH Laboratory for Parallel Programming 52062 Aachen | Germany Tel +49 241 80 93970 Web www.grs-sim.de(http://www.grs-sim.de/) Members: Forschungszentrum Jülich GmbH | RWTH Aachen University |
|
From: Julian S. <js...@ac...> - 2012-05-15 08:09:47
|
> code since it need to build an "env" first. Any potential solution to > this? Thanks! There is no zero-effort solution :-( Probably the simplest and most general thing to do is to enhance the amd64 doHelperCall() function so that it can generate code to pass arguments on the stack as well as in registers. The limit of 6 is because the ELF x86_64 ABI passes the first 6 args in registers and the rest on the stack. You will need to look at the ELF x86_64 ABI document, which I think you can get from http://www.x86-64.org/documentation/abi.pdf J |