Granary / granary2

Dynamic binary translation framework for instrumenting x86-64 user space Linux programs
MIT License
39 stars 5 forks source link

Issue with arch::Instruction::is_save_restore #41

Closed pgoodman closed 10 years ago

pgoodman commented 10 years ago

There is an issue related to how the register scheduler or peephole optimizer (for save/restores) handles arch::Instruction::is_save_restore. In trying to set this flag to true in arch/x86-64/outline.cc for the argument copying stuff, it is clear that stuff screws up quickly because multiple VRs end up being mapped to the same slot! This is almost certainly related to some changes in my outline-call branch that make the VR system greedy w.r.t. virtual registers, but I haven't had time to think through the issue. Also of concern is whether or not this affects flag save/restore, as that uses the is_save_restore flag as well.

pgoodman commented 10 years ago

For the time being, all code related to this peephole optimization is never executed, because this flag is always left as false.