Hi, I'm working on a Valgrind tool targeting 32-bit guests that up to 
this point we have been running on 32-bit hosts.  I would like to also 
be able to compile to target 32-bit guest on 64-bit host.  So far, the 
largest difference that I have found is described in the comments of 
"doHelperCall" in host_amd64_isel.c:

"This function only deals with a tiny set of possibilities, which cover 
all helpers in practice.  The restrictions are that only arguments in 
registers are supported, hence only 6x64 integer bits in total can be 
passed.  In fact the only supported arg type is I64."

With this constraint in place, I was wondering if there were any 
particular best-practices for cross platform tool development.  For 
instance, we could promote all parameters for all tool callbacks to 
64-bit across all platforms to keep the code clean and uniform, or we 
could maintain parallel platform-specific callback compilation units 
that must be manually kept consistent across feature changes and bug 
fixes, or we could throw a bunch of #ifdefs in the source to change the 
function signatures and IExpr marshaling depending on platform.

Any thoughts are appreciated!

- Paolo


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to