]> git.proxmox.com Git - mirror_qemu.git/commit - target-i386/translate.c
target-i386: move eflags computation closer to gen_op_set_cc_op
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Oct 2012 22:18:55 +0000 (00:18 +0200)
committerRichard Henderson <rth@twiddle.net>
Mon, 18 Feb 2013 23:03:55 +0000 (15:03 -0800)
commit0ff6addd92979b9759efa1c0945526e6ac78ce5b
tree01324c611e3a3a99774dc193b813bc37934766c7
parent52320e15dbb0c2531501a924972e63cdb59742a7
target-i386: move eflags computation closer to gen_op_set_cc_op

This ensures the invariant that cpu_cc_op matches s->cc_op when calling
the helpers.  The next patches need this because gen_compute_eflags and
gen_compute_eflags_c will take care of setting cpu_cc_op.

Always compute EFLAGS first since it is needed whenever the shift is
non-zero, i.e. most of the time.  This makes it possible to remove some
writes of CC_OP_EFLAGS to cpu_cc_op and more importantly removes cases
where s->cc_op becomes CC_OP_DYNAMIC.  These are slow and we want to
avoid them: CC_OP_EFLAGS is quite efficient once we paid the initial
cost of computing the flags.

Finally, always follow gen_compute_eflags(cpu_cc_src) by setting s->cc_op
and discarding cpu_cc_dst.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-i386/translate.c