Granary / granary2

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

Don't use `XED_ENCODER_REQUEST_*` in `arch::Operand` #75

Open pgoodman opened 9 years ago

pgoodman commented 9 years ago

Instead, we should just have our own, Granary-specific enum. One purpose of this enum is that it should also serve to eliminate the various flags such as is_compound. Thus, compound and non-compound memory operands should be distinguished by the enumerator. Other flags should be transformed in this way.

pgoodman commented 9 years ago

Another nasty thing is that arch::Operand::reg is overloaded to have the same meaning as arch::Operand::mem::base. This is a historical artefact of base/index registers in compound memory operands not previously being VirtualRegisters and instead being xed_reg_enum_ts. This has since switched, and so the separation is uuuuugly.