avatarone / news2e-qemu

Official QEMU mirror
Other
0 stars 1 forks source link

eflags vs mflags #4

Open zaddach opened 8 years ago

zaddach commented 8 years ago

Qemu has a variable called "eflags" in the CPUX86State env structure. This variable stores the value of the eflags register outside of translation blocks. Inside translation blocks, the eflags variable contains only static bits. CC and DF flags are located in the cc_op/cc_src/cc_src2/cc_dst fields and df.

S2E uses the "mflags" field instead, which is supposed to contain mode and control flags. Currently, mflags is not implemented in the merging-qemu-2.5 branch. One needs to check how mflags is different from eflags in the old version, if this difference still applied in Qemu 2.5, and adapt the behaviour correctly.