|
From: Konstantin T. <an...@ya...> - 2013-08-26 20:34:43
|
26.08.2013, 19:18, "Paolo Piselli" <ppi...@cs...>: > 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! Why not just use 32-bit build of valgrind instead? -- Regards, Konstantin |