|
From: Philippe W. <phi...@sk...> - 2012-07-23 22:51:52
|
On Tue, 2012-07-24 at 00:20 +0200, Josef Weidendorfer wrote: > I assume for amd64, that would be amd64g_calculate_rflags_all(...) > (in VEX/priv/guest_amd64_helpers.c). However I am not sure if the VEX > registers to use as parameters are fixed (if so, there would be no need > to pass them all the time from generated code?). Yes, I suppose that cc_op, cc_dep1, cc_dep2, cc_ndep have all to be computed by the generated code, depending on what instruction has just been executed. If I understand correctly, Valgrind generated code will compute the flags for an instruction only if a following instruction in the same block is reading them ? > > > So, we would need a way to force VEX to always compute these flags. > > Maybe --vex-iropt-precise-memory-exns=yes can help for that ? > > That did not help, but "--vex-guest-max-insns=1" actually does! > Thanks for helping me to think in the right direction. > > Should we add this hint to the documentation somewhere? Yes, it looks a good idea to document that in gdbserver limitations. Are both --vex-guest-max-insns=1 and --vex-iropt-precise-memory-exns=yes needed for an as best as possible equivalence between Valgrind synthetic cpu and real hardware ? Or is --vex-guest-max-insns=1 also implying the effect of --vex-iropt-precise-memory-exns=yes ? An alternative might be to always put automatically these values to 1 and yes when --vgdb=full is given ? Philippe |