On 03/28/2011 06:34 PM, Takuya Yoshikawa wrote:
From: Takuya Yoshikawa<[email protected]>

Recently, emulate_push family functions started to call writeback()
during their emulation.  This clearly shows that the usual writeback()
which is done at the end of x86_emulate_insn() cannot cover all cases.
Furthermore, suppressing writeback by changing dst operand's type is
not simple when conditional writeback must be taken care of.

This patch improves this situation a bit by making emulate_push()
itself do writeback and removes scattered writebacks from callers.

This is done by splitting the writeback for OP_MEM case out from
writeback() as a new helper function, writeback_to_mem(), and call it
directly from emulate_push().

I think it's easier to just write directly instead of going through 'struct operand'.

Probably emulate_push() should do the write (look at segmented_write() in my 'Emulator segment checks' patchset), and everything else can call that. 'struct operand' is for multiplexing register/memory accesses, which is not the case with the stack.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to